// $Id: lprofmain-priv.h,v 1.6 2008/03/06 21:18:58 hvengel Exp $
//  Little cms - profiler construction set
//  Copyright (C) 1998-2001 Marti Maria
//  Copyright (C) 2007 Hal Engel
//
// THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
// EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
// WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
//
// IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
// INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
// OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
// WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
// LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
// OF THIS SOFTWARE.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// Version 1.11

#ifndef LPROFMAIN_PRIV_H
#define LPROFMAIN_PRIV_H

#include "vigra/impex.hxx"
#include <qrect.h>
#include <qassistantclient.h>
#include <Q3TextEdit>
//Added by qt3to4:
#include <Q3PointArray>
#include <Q3PtrList>
#include <lcmsprf.h>
#include <qtabwidget.h>
#include "lprofmain.h"
#include <QProgressBar>

// Anything listed here should only be used in files that are
// located in src/lprofqt.  As the routines in these files are
// decoupled items that are located here will be removed.
 
extern bool monCalOK;
extern bool monMeasOK;

extern char monmeasFile[256], moncalFile[256];

struct dialogSizes
{
    int
            reffileH, reffileW,
            monvalH, monvalW,
            profchH, profchW,
            profidH, profidW,
            profparmsH, profparmsW,
            profparmsmonH, profparmsmonW,
            lprofH, lprofW,
            moncalconH, moncalconW,
            moncalH, moncalW;

}; 

extern dialogSizes dsizes;

extern bool SelectWPpatch, firstClick;
extern QRect WPHotZone;

extern vigra::ImageImportInfo *image_data;

extern bool int16lprof, int32lprof, uint8lprof, fltpixlprof, dblpixlprof;

extern QString global_help_path;

extern QAssistantClient* help;

extern bool refinstOK;

extern PROFILERDATA sys;

const int measure_view_H=1500;
const int measure_view_V=1000;

extern uint last_tab;

extern Q3TextEdit* Console;
extern QProgressBar* ProgBar;

extern monVal monitorValues;

struct markPositions
{
    int  ur_x, ur_y;
    int ul_x, ul_y;
    int lr_x, lr_y;
    int ll_x, ll_y;
};  

extern markPositions Marks;

extern Q3PointArray grid_corners;

extern QString outprofile;

extern BOOL corners_ready;

extern int intent;

extern double clippedPatches, patchCount;

extern Q3PtrList<target_template> *targetList;

extern QString measfile;
extern QString templates;
extern QString mon_profile;
extern QString in_profile;
extern QString ref_dir;
extern QString temp_dir;
extern QString WorkTempFileName;
extern QString measurement_dir;
extern QString image_file_name;

// extern QSettings* lprofSettings;

extern Q3UrlOperator urlOpTempFile;

extern int copyNumTempFile;

void init_env();

void setupHelp(QString &g_path);

void setData(uint i);


int ConsolePrintf(const char *frm, int parms, char typ, ...);

int Gauger(const char * /*Label*/, int nMin, int nMax, int Pos);

void init_marks();

void add_target(target_template &in);

#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32))
#define __WIN32__
#endif

# ifdef __WIN32__
using std::min;
# else
    static int min (int a, int b)
{
    if (a < b) return a;
    return b;
}
# endif /* __WIN32__ */


#endif // LPROFMAIN_PRIV_H
 
