lprof-devel Mailing List for LProf open source ICC profiler (Page 6)
Brought to you by:
hvengel
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(36) |
Dec
(61) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(26) |
Feb
(125) |
Mar
(171) |
Apr
(129) |
May
(28) |
Jun
(31) |
Jul
|
Aug
(16) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(10) |
| 2007 |
Jan
(37) |
Feb
(16) |
Mar
(60) |
Apr
(151) |
May
(13) |
Jun
(106) |
Jul
(7) |
Aug
(11) |
Sep
(105) |
Oct
(219) |
Nov
(68) |
Dec
(7) |
| 2008 |
Jan
(401) |
Feb
(70) |
Mar
(26) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(1) |
Feb
(15) |
Mar
|
Apr
|
May
(17) |
Jun
(26) |
Jul
(35) |
Aug
(7) |
Sep
(3) |
Oct
|
Nov
|
Dec
(14) |
| 2010 |
Jan
(11) |
Feb
(6) |
Mar
(1) |
Apr
|
May
(3) |
Jun
(6) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Hal E. <hv...@us...> - 2008-03-08 18:47:38
|
Update of /cvsroot/lprof/lprof/src/lprofqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31183/lprofqt Modified Files: lprofmain.cpp Log Message: Make changing reference file reapply the template and pick the values automatically. Make sure title bar appears in calibration reports dialog on all platforms. Index: lprofmain.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain.cpp,v retrieving revision 1.185 retrieving revision 1.186 diff -C2 -d -r1.185 -r1.186 *** lprofmain.cpp 7 Mar 2008 16:29:01 -0000 1.185 --- lprofmain.cpp 8 Mar 2008 18:47:33 -0000 1.186 *************** *** 1062,1065 **** --- 1062,1066 ---- connect(ui->listViewPortsInsts, SIGNAL(selectionChanged()), this, SLOT(slotEnablecomboBoxDevice())); connect(ui->comboBoxDevice, SIGNAL(activated(int)), this, SLOT(slotUpdateInst())); + connect(ui->TargetSelector, SIGNAL(valueChanged()), this, SLOT(safeFarmeChanged())); connect( &urlOpTempFile, SIGNAL( finished( Q3NetworkOperation *) ), this, SLOT( templateFileCopied( Q3NetworkOperation * ) ) ); |
|
From: Hal E. <hv...@us...> - 2008-03-08 18:47:37
|
Update of /cvsroot/lprof/lprof/src/moncalcontrolqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31183/moncalcontrolqt Modified Files: moncalreports.cpp Log Message: Make changing reference file reapply the template and pick the values automatically. Make sure title bar appears in calibration reports dialog on all platforms. Index: moncalreports.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalcontrolqt/moncalreports.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** moncalreports.cpp 19 Feb 2008 21:02:49 -0000 1.2 --- moncalreports.cpp 8 Mar 2008 18:47:33 -0000 1.3 *************** *** 36,40 **** MonitorCalReports::MonitorCalReports(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax ) { setupUi(this); --- 36,40 ---- MonitorCalReports::MonitorCalReports(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title) { setupUi(this); |
|
From: Hal E. <hv...@us...> - 2008-03-07 16:29:07
|
Update of /cvsroot/lprof/lprof/src/parmsqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18054/parmsqt Modified Files: profileparms.cpp Log Message: Change the way the profiler parms dialog is instantiated. Index: profileparms.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/parmsqt/profileparms.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** profileparms.cpp 6 Mar 2008 21:18:59 -0000 1.60 --- profileparms.cpp 7 Mar 2008 16:29:01 -0000 1.61 *************** *** 293,296 **** --- 293,298 ---- } ValuesToControls(); + this -> raise(); + this -> setVisible(TRUE); this -> show(); } |
|
From: Hal E. <hv...@us...> - 2008-03-07 16:29:07
|
Update of /cvsroot/lprof/lprof/src/lprofqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18054/lprofqt Modified Files: lprofmain.cpp main.cpp Log Message: Change the way the profiler parms dialog is instantiated. Index: main.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/main.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** main.cpp 6 Mar 2008 21:18:59 -0000 1.41 --- main.cpp 7 Mar 2008 16:29:01 -0000 1.42 *************** *** 132,147 **** setup_spyd2(execPath); - ProfileParms profParms; - profParms.setModal(FALSE); - - profParms.show(); - profParms.hide(); - lprofMain w; w.show(); - - QObject::connect(&profParms, SIGNAL(signalPickRGB()), &w, SLOT(slotPickRGBPatch())); - QObject::connect(&profParms, SIGNAL(profileParmsOK()), &w, SLOT(slotUpdateProfileParmsText())); - QObject::connect(&w, SIGNAL(showProfileParms()), &profParms, SLOT(slotShow())); lprofApp -> connect( lprofApp, SIGNAL( lastWindowClosed() ), lprofApp, SLOT( quit() ) ); --- 132,137 ---- Index: lprofmain.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain.cpp,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** lprofmain.cpp 6 Mar 2008 21:18:58 -0000 1.184 --- lprofmain.cpp 7 Mar 2008 16:29:01 -0000 1.185 *************** *** 1007,1010 **** --- 1007,1011 ---- // Main app constructor. + ProfileParms* profP; lprofMain::lprofMain( QWidget* parent) *************** *** 1023,1026 **** --- 1024,1035 ---- ui = new Ui::lprofMainBase(); ui->setupUi(this); + profP = new ProfileParms(this); + // ProfileParms profParms(this); + profP -> setModal(FALSE); + profP -> hide(); + + connect(profP, SIGNAL(signalPickRGB()), this, SLOT(slotPickRGBPatch())); + connect(profP, SIGNAL(profileParmsOK()), this, SLOT(slotUpdateProfileParmsText())); + connect(this, SIGNAL(showProfileParms()), profP, SLOT(slotShow())); connect(ui->LoadBtn, SIGNAL(clicked()), this, SLOT(slotLoad())); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:06
|
Update of /cvsroot/lprof/lprof/src/lprofqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/lprofqt Modified Files: config.cpp griditem.cpp imageitem.cpp interfaces.cpp lprofmain-priv.cpp lprofmain-priv.h lprofmain.cpp lprofmain.h main.cpp slots.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: main.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/main.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** main.cpp 19 Feb 2008 21:02:47 -0000 1.40 --- main.cpp 6 Mar 2008 21:18:59 -0000 1.41 *************** *** 62,66 **** char execPath[512]; ! exec = getAppExecDir() + "/"; strcpy(execPath, exec.local8Bit()); if (setup_spyd2(execPath) == 0) --- 62,66 ---- char execPath[512]; ! exec = getAppExecDir() + QString::fromLocal8Bit("/"); strcpy(execPath, exec.local8Bit()); if (setup_spyd2(execPath) == 0) *************** *** 91,99 **** // but also so the help system can locate the help files. // Otherwise it would be inside of the if below ! prefix_path.truncate(prefix_path.find( QString("/build") )); ! prefix_path = prefix_path + QString("/data"); if ( dir->exists(prefix_path) ) { ! prefix_path = prefix_path + QString("/"); } else --- 91,99 ---- // but also so the help system can locate the help files. // Otherwise it would be inside of the if below ! prefix_path.truncate(prefix_path.find( QString::fromLocal8Bit("/build") )); ! prefix_path = prefix_path + QString::fromLocal8Bit("/data"); if ( dir->exists(prefix_path) ) { ! prefix_path = prefix_path + QString::fromLocal8Bit("/"); } else *************** *** 102,111 **** // not in the build directory so need to check for the /data subfolder of the bundle prefix_path = a; ! prefix_path = prefix_path + QString("/data/"); # else // not in the build directory so need to check for and remove /bin prefix_path = a; prefix_path.truncate(prefix_path.length()-3); ! prefix_path = prefix_path + QString("share/lprof/data/"); # endif /* __APPLE__ */ } --- 102,111 ---- // not in the build directory so need to check for the /data subfolder of the bundle prefix_path = a; ! prefix_path = prefix_path + QString::fromLocal8Bit("/data/"); # else // not in the build directory so need to check for and remove /bin prefix_path = a; prefix_path.truncate(prefix_path.length()-3); ! prefix_path = prefix_path + QString::fromLocal8Bit("share/lprof/data/"); # endif /* __APPLE__ */ } *************** *** 124,133 **** QTranslator translator( 0 ); ! // QString translations = ":/translations/lprof_" + (QString) QTextCodec::locale(); ! translator.load( (QString)"lprof_" + (QString) QTextCodec::locale(), ":/" ); lprofApp -> installTranslator( &translator ); ! QString temp = getAppExecDir() + "/"; ! strcpy(execPath, temp.local8Bit()); setup_spyd2(execPath); --- 124,133 ---- QTranslator translator( 0 ); ! // QString::fromLocal8Bit translations = ":/translations/lprof_" + (QString::fromLocal8Bit) QTextCodec::locale(); ! translator.load( QString::fromLocal8Bit("lprof_") + QString::fromLocal8Bit(QTextCodec::locale()), QString::fromLocal8Bit(":/") ); lprofApp -> installTranslator( &translator ); ! QString temp = getAppExecDir() + QString::fromLocal8Bit("/"); ! strcpy(execPath, temp.toLocal8Bit()); setup_spyd2(execPath); Index: slots.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/slots.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** slots.cpp 19 Feb 2008 21:02:48 -0000 1.3 --- slots.cpp 6 Mar 2008 21:18:59 -0000 1.4 *************** *** 109,134 **** // qDebug("lprofMain::slotLoad"); zeroProgressBars(); ! QString dir = lprofSettings -> readEntry("/LPROF/Files/last_load_dir", QDir::homeDirPath()); fn = Q3FileDialog::getOpenFileName( dir, ! tr(QString("Image files (*.gif *.png *.jpg *.bmp *.pbm *.pgm *.pnm *.sun *.tif *.tiff *.viff *.GIF *.PNG *.JPG *.BMP *.PBM *.PGM *.PNM *.SUN *.TIF *.TIFF *.VIFF)\nAll files (*.*)")), this, "", ! tr(QString("Select target image"))); [...1081 lines suppressed...] else ! ui->MonMeasurementSheet -> setFilename(""); if (monCalOK) ! ui->MonCalibrationSheet -> setFilename(moncalFile); else ! ui->MonCalibrationSheet -> setFilename(""); slotIsAllReady(); } --- 1148,1158 ---- monCal.exec(); if (monMeasOK) ! ui->MonMeasurementSheet -> setFilename(QString::fromLocal8Bit(monmeasFile)); else ! ui->MonMeasurementSheet -> setFilename(QString::fromLocal8Bit("")); if (monCalOK) ! ui->MonCalibrationSheet -> setFilename(QString::fromLocal8Bit(moncalFile)); else ! ui->MonCalibrationSheet -> setFilename(QString::fromLocal8Bit("")); slotIsAllReady(); } Index: imageitem.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/imageitem.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** imageitem.cpp 19 Feb 2008 21:02:42 -0000 1.3 --- imageitem.cpp 6 Mar 2008 21:18:58 -0000 1.4 *************** *** 50,54 **** QFile in(InputProfile), out(OutputProfile); ! qDebug("ImageItem::TransformImage InputProfile = " + InputProfile); if (in.exists() && out.exists()) --- 50,54 ---- QFile in(InputProfile), out(OutputProfile); ! qDebug("ImageItem::TransformImage InputProfile = " + InputProfile.toLocal8Bit()); if (in.exists() && out.exists()) *************** *** 148,156 **** if (!vigra::isImage(file)) { ! QMessageBox mb( QTranslator::tr(QString("Load image failure")), ! QTranslator::tr(QString("This image format is unsupported by LPROF ") + ! "on your system. Sorry. Supported ones " + ! "are BMP, GIF, JPEG, PNG, PBM, PGM, " + ! "PNM, PPM, SUN, TIFF and VIFF."), QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, --- 148,153 ---- if (!vigra::isImage(file)) { ! QMessageBox mb( QTranslator::tr("Load image failure"), ! QTranslator::tr("This image format is unsupported by LPROF on your system. Sorry. Supported ones are BMP, GIF, JPEG, PNG, PBM, PGM, PNM, PPM, SUN, TIFF and VIFF."), QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, *************** *** 166,172 **** if (!(image_data->isColor())) { ! QMessageBox mb( QTranslator::tr(QString("Load image failure")), ! QTranslator::tr(QString("This image is not a color RGB image. ") + ! "Only color images are supported at this time."), QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, --- 163,168 ---- if (!(image_data->isColor())) { ! QMessageBox mb( QTranslator::tr("Load image failure"), ! QTranslator::tr("This image is not a color RGB image. Only color images are supported at this time."), QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, *************** *** 177,187 **** } ! image_file_name = (QString) ImageFile; ! QString pixtype = (QString) image_data->getPixelType(); ! int16lprof = (pixtype.contains( "INT16") > 0); ! int32lprof = (pixtype.contains( "INT32") > 0); ! uint8lprof = (pixtype.contains( "UINT8") > 0); ! fltpixlprof = (pixtype.contains( "FLOAT") > 0); ! dblpixlprof = (pixtype.contains( "DOUBLE") > 0); // try again --- 173,183 ---- } ! image_file_name = ImageFile; ! QString pixtype = QString::fromLocal8Bit(image_data->getPixelType()); ! int16lprof = (pixtype.contains(QString::fromLocal8Bit("INT16")) > 0); ! int32lprof = (pixtype.contains(QString::fromLocal8Bit("INT32")) > 0); ! uint8lprof = (pixtype.contains(QString::fromLocal8Bit("UINT8")) > 0); ! fltpixlprof = (pixtype.contains(QString::fromLocal8Bit("FLOAT")) > 0); ! dblpixlprof = (pixtype.contains(QString::fromLocal8Bit("DOUBLE")) > 0); // try again Index: lprofmain-priv.h =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain-priv.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lprofmain-priv.h 19 Feb 2008 21:02:42 -0000 1.5 --- lprofmain-priv.h 6 Mar 2008 21:18:58 -0000 1.6 *************** *** 78,82 **** extern bool int16lprof, int32lprof, uint8lprof, fltpixlprof, dblpixlprof; ! extern QString* global_help_path; extern QAssistantClient* help; --- 78,82 ---- extern bool int16lprof, int32lprof, uint8lprof, fltpixlprof, dblpixlprof; ! extern QString global_help_path; extern QAssistantClient* help; *************** *** 136,140 **** void init_env(); ! void setupHelp(QString* g_path); void setData(uint i); --- 136,140 ---- void init_env(); ! void setupHelp(QString &g_path); void setData(uint i); Index: lprofmain.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain.cpp,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -d -r1.183 -r1.184 *** lprofmain.cpp 1 Mar 2008 23:41:49 -0000 1.183 --- lprofmain.cpp 6 Mar 2008 21:18:58 -0000 1.184 *************** *** 148,152 **** // after issuing an error message fo the user. QString message; ! message = (QString) getErrorMessage(); QMessageBox mb( QTranslator::tr("Problem Getting List of Measurement Devices."), message + QTranslator::tr("This error indicates some type of problem with accessing the devices or the Serial or USB ports on this machine. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB, serial port access and access rights to these device."), --- 148,152 ---- // after issuing an error message fo the user. QString message; ! message = QString::fromLocal8Bit(getErrorMessage()); QMessageBox mb( QTranslator::tr("Problem Getting List of Measurement Devices."), message + QTranslator::tr("This error indicates some type of problem with accessing the devices or the Serial or USB ports on this machine. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB, serial port access and access rights to these device."), *************** *** 184,190 **** { // not USB device ! temp = (QString)coms -> paths[position]->path; ! start = temp.find('(',0, TRUE) + 1; ! end = temp.find(')', 0, TRUE); port = temp.mid(0, start -1); --- 184,190 ---- { // not USB device ! temp = QString::fromLocal8Bit(coms -> paths[position]->path); ! start = temp.find(QChar::fromAscii('('), 0, TRUE) + 1; ! end = temp.find(QChar::fromAscii(')'), 0, TRUE); port = temp.mid(0, start -1); *************** *** 197,203 **** { temp.sprintf("/LPROF/serial_instruments/port%i", j); ! strcpy(tempInst.port, lprofSettings->readEntry(temp, "").ascii()); ! if (QString (sys.hdr.instArray[k].port) == ! QString (tempInst.port)) { sys.hdr.instArray[k].inst = instUnknown; --- 197,203 ---- { temp.sprintf("/LPROF/serial_instruments/port%i", j); ! strcpy(tempInst.port, lprofSettings->readEntry(temp, QString::fromLocal8Bit("")).toLocal8Bit()); ! if (QString::fromLocal8Bit(sys.hdr.instArray[k].port) == ! QString::fromLocal8Bit(tempInst.port)) { sys.hdr.instArray[k].inst = instUnknown; *************** *** 232,240 **** instD.Inst == instSpectrocam) { ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); } else { ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)) + QTranslator::tr(" - Wrong type"); instD.deviceFlag = wrongType; } --- 232,240 ---- instD.Inst == instSpectrocam) { ! instD.name = instD.port + QString::fromLocal8Bit(" ") + QString::fromLocal8Bit(inst_name(instD.Inst)); } else { ! instD.name = instD.port + QString::fromLocal8Bit(" ") + QString::fromLocal8Bit(inst_name(instD.Inst)) + QTranslator::tr(" - Wrong type"); instD.deviceFlag = wrongType; } *************** *** 252,265 **** instD.Inst == instI1Pro) { ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); } else { ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)) + QTranslator::tr(" - Wrong type"); instD.deviceFlag = wrongType; } } else if (instCap == all) ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); } else --- 252,265 ---- instD.Inst == instI1Pro) { ! instD.name = instD.port + QString::fromLocal8Bit(" ") + QString::fromLocal8Bit(inst_name(instD.Inst)); } else { ! instD.name = instD.port + QString::fromLocal8Bit(" ") + QString::fromLocal8Bit(inst_name(instD.Inst)) + QTranslator::tr(" - Wrong type"); instD.deviceFlag = wrongType; } } else if (instCap == all) ! instD.name = instD.port + QString::fromLocal8Bit(" ") + QString::fromLocal8Bit(inst_name(instD.Inst)); } else *************** *** 281,285 **** int number; ! sys.hdr.validInst = lprofSettings->readNumEntry( "/LPROF/numbers/instCount", 0); populatePortArray(); spyd2FirmwareOK = TRUE; --- 281,285 ---- int number; ! sys.hdr.validInst = lprofSettings->readNumEntry( QString::fromLocal8Bit("/LPROF/numbers/instCount"), 0); populatePortArray(); spyd2FirmwareOK = TRUE; *************** *** 292,296 **** // after issuing an error message fo the user. QString message; ! message = (QString) getErrorMessage(); QMessageBox mb( QTranslator::tr("Problem Getting List of Measurement Devices."), message + QTranslator::tr("This error indicates some type of problem with accessing the devices or the Serial or USB ports on this machine. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB, serial port access and access rights to these device."), --- 292,296 ---- // after issuing an error message fo the user. QString message; ! message = QString::fromLocal8Bit( getErrorMessage()); QMessageBox mb( QTranslator::tr("Problem Getting List of Measurement Devices."), message + QTranslator::tr("This error indicates some type of problem with accessing the devices or the Serial or USB ports on this machine. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB, serial port access and access rights to these device."), *************** *** 311,321 **** for (i=0; i < number; i++) { ! temp = (QString)coms -> paths[i]->path; ! start = temp.find('(',0, TRUE) + 1; ! end = temp.find(')', 0, TRUE); instName = temp.mid(start, end - start); port = temp.mid(0, start -1); instlist[i].deviceFlag = OK; ! if ((coms -> paths[i]-> dev != NULL) || (port.left(3) == "hid")) { // USB device // qDebug(port + " " + instName); --- 311,321 ---- for (i=0; i < number; i++) { ! temp = QString::fromLocal8Bit(coms -> paths[i]->path); ! start = temp.find(QString::fromLocal8Bit("("), 0, TRUE) + 1; ! end = temp.find(QString::fromLocal8Bit(")"), 0, TRUE); instName = temp.mid(start, end - start); port = temp.mid(0, start -1); instlist[i].deviceFlag = OK; ! if ((coms -> paths[i]-> dev != NULL) || (coms -> paths[i]-> hev != NULL)) { // USB device // qDebug(port + " " + instName); *************** *** 324,328 **** instlist[i].dupType = FALSE; instlist[i].Inst = coms -> paths[i]-> itype; ! if (instName == "ColorVision Spyder2") { // check Spyder 2 to make sure the firmware is available --- 324,328 ---- instlist[i].dupType = FALSE; instlist[i].Inst = coms -> paths[i]-> itype; ! if (instName == QString::fromLocal8Bit("ColorVision Spyder2")) { // check Spyder 2 to make sure the firmware is available *************** *** 345,349 **** for (int j=0; j < count; j++) { ! if (QString (sys.hdr.instArray[j].port) == port) { instlist[i].Inst = sys.hdr.instArray[j].inst; --- 345,349 ---- for (int j=0; j < count; j++) { ! if (QString::fromLocal8Bit(sys.hdr.instArray[j].port) == port) { instlist[i].Inst = sys.hdr.instArray[j].inst; *************** *** 423,427 **** bool found = FALSE, notOK = FALSE, OK = FALSE; ! sys.hdr.validInst = lprofSettings->readNumEntry( "/LPROF/numbers/instCount", 0); populatePortArray(); --- 423,427 ---- bool found = FALSE, notOK = FALSE, OK = FALSE; ! sys.hdr.validInst = lprofSettings->readNumEntry( QString::fromLocal8Bit("/LPROF/numbers/instCount"), 0); populatePortArray(); *************** *** 429,433 **** for (j=0; j < sys.hdr.validPorts; j++) { ! if (QString(sys.hdr.instArray[j].port) == newPort) { position = sys.hdr.instArray[j].pos; --- 429,433 ---- for (j=0; j < sys.hdr.validPorts; j++) { ! if (QString::fromLocal8Bit(sys.hdr.instArray[j].port) == newPort) { position = sys.hdr.instArray[j].pos; *************** *** 513,517 **** { sys.hdr.instArray[index].inst = itype; ! strcpy(sys.hdr.instArray[index].port, item -> text(1)); } else --- 513,517 ---- { sys.hdr.instArray[index].inst = itype; ! strcpy(sys.hdr.instArray[index].port, item -> text(1).toLocal8Bit()); } else *************** *** 541,545 **** // qDebug("instCount = %i", sys.hdr.validInst); ! lprofSettings->writeEntry( "/LPROF/numbers/instCount", sys.hdr.validInst); // qDebug("save settings for serial devices and ports"); --- 541,545 ---- // qDebug("instCount = %i", sys.hdr.validInst); ! lprofSettings->writeEntry( QString::fromLocal8Bit("/LPROF/numbers/instCount"), sys.hdr.validInst); // qDebug("save settings for serial devices and ports"); *************** *** 547,551 **** { temp.sprintf("/LPROF/serial_instruments/port%i", j); ! lprofSettings->writeEntry(temp, QString(sys.hdr.instArray[j].port)); temp.sprintf("/LPROF/serial_instruments/instType%i", j); lprofSettings->writeEntry(temp, sys.hdr.instArray[j].inst); --- 547,551 ---- { temp.sprintf("/LPROF/serial_instruments/port%i", j); ! lprofSettings->writeEntry(temp, sys.hdr.instArray[j].port); temp.sprintf("/LPROF/serial_instruments/instType%i", j); lprofSettings->writeEntry(temp, sys.hdr.instArray[j].inst); *************** *** 555,559 **** void lprofMain::populatePortandInstListView() { ! sys.hdr.validInst = lprofSettings->readNumEntry( "/LPROF/numbers/instCount", 0); populatePortArray(); QString portnum, insttype; --- 555,559 ---- void lprofMain::populatePortandInstListView() { ! sys.hdr.validInst = lprofSettings->readNumEntry( QString::fromLocal8Bit("/LPROF/numbers/instCount"), 0); populatePortArray(); QString portnum, insttype; *************** *** 580,592 **** if (sys.hdr.instArray[i].inst != instUnknown) { ! if (validateIntrument(QString(sys.hdr.instArray[i].port), sys.hdr.instArray[i].inst)) ! status = QString(tr("Device verified.")); else ! status = QString(tr("Device failed verification.")); } else ! status = QString(tr("No device installed.")); (void) new Q3ListViewItem(ui->listViewPortsInsts, portnum, ! sys.hdr.instArray[i].port, ui->comboBoxDevice -> currentText(), status, insttype); } --- 580,592 ---- if (sys.hdr.instArray[i].inst != instUnknown) { ! if (validateIntrument(QString::fromLocal8Bit(sys.hdr.instArray[i].port), sys.hdr.instArray[i].inst)) ! status = tr("Device verified."); else ! status = tr("Device failed verification."); } else ! status = tr("No device installed."); (void) new Q3ListViewItem(ui->listViewPortsInsts, portnum, ! QString::fromLocal8Bit(sys.hdr.instArray[i].port), ui->comboBoxDevice -> currentText(), status, insttype); } *************** *** 695,699 **** { case 's': ! Buffer = Buffer.arg(va_arg(args, char *)); break; case 'd': --- 695,699 ---- { case 's': ! Buffer = Buffer.arg(QString::fromLocal8Bit(va_arg(args, char *))); break; case 'd': *************** *** 893,897 **** } ! cmsxIT8SaveToFile(it8, measfile); cmsxIT8Free(it8); } --- 893,897 ---- } ! cmsxIT8SaveToFile(it8, measfile.toLocal8Bit()); cmsxIT8Free(it8); } *************** *** 941,947 **** #ifdef __WIN32__ ! pos = fn.findRev('\\', -1, FALSE); #else ! pos = fn.findRev('/', -1, FALSE); #endif --- 941,947 ---- #ifdef __WIN32__ ! pos = fn.findRev(QString::fromLocal8Bit("\\"), -1, FALSE); #else ! pos = fn.findRev(QString::fromLocal8Bit("/"), -1, FALSE); #endif *************** *** 951,955 **** // but we should not allow writing to root // in any case ! if (fn.left(1) == "/" && pos < 1) OK = FALSE; else --- 951,955 ---- // but we should not allow writing to root // in any case ! if (fn.left(1) == QString::fromLocal8Bit("/") && pos < 1) OK = FALSE; else *************** *** 971,982 **** if (OK) { ! if ((fn.findRev(".i") == (fn.length() - 4) || ! fn.findRev(".I") == (fn.length() - 4)) && // .i or ,I && ! (fn.findRev("C", -2 ) == (fn.length() - 2) || ! fn.findRev("c", -2 ) == (fn.length() - 2)) && // c or C && ! ((fn.findRev("C" ) == (fn.length() - 1) || ! fn.findRev("c") == (fn.length() - 1)) || // c or C ! (fn.findRev("M" ) == (fn.length() - 1) || ! fn.findRev("m" ) == (fn.length() -1 )))) // or m or M { // the directory and extension are OK --- 971,982 ---- if (OK) { ! if ((fn.findRev(QString::fromLocal8Bit(".i")) == (fn.length() - 4) || ! fn.findRev(QString::fromLocal8Bit(".I")) == (fn.length() - 4)) && // .i or ,I && ! (fn.findRev(QString::fromLocal8Bit("C"), -2 ) == (fn.length() - 2) || ! fn.findRev(QString::fromLocal8Bit("c"), -2 ) == (fn.length() - 2)) && // c or C && ! ((fn.findRev(QString::fromLocal8Bit("C") ) == (fn.length() - 1) || ! fn.findRev(QString::fromLocal8Bit("c")) == (fn.length() - 1)) || // c or C ! (fn.findRev(QString::fromLocal8Bit("M")) == (fn.length() - 1) || ! fn.findRev(QString::fromLocal8Bit("m")) == (fn.length() -1 )))) // or m or M { // the directory and extension are OK *************** *** 986,990 **** { // direcotry OK but extesion is not ! if (!fn.find('.', pos) == -1) // There is an extension so this is a user error that we can not fix { OK = FALSE; --- 986,990 ---- { // direcotry OK but extesion is not ! if (!fn.find(QString::fromLocal8Bit("."), pos) == -1) // There is an extension so this is a user error that we can not fix { OK = FALSE; *************** *** 995,999 **** { // No extesion add it ! fn = fn + ".icc"; OK = TRUE; } --- 995,999 ---- { // No extesion add it ! fn = fn + QString::fromLocal8Bit(".icc"); OK = TRUE; } *************** *** 1011,1016 **** : QDialog( parent, "", 0, Qt::WType_TopLevel | Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title), ! FigEditor( 0 ), Canvas( 0 ), CanvasFrameLayout( 0 ), TheGrid( 0 ), TheImage( 0 ), ! CurrentTemplate( "" ), CurrentSafeFrame( 0 ), fn( "" ) { // qDebug("lprofMain::lprofMain"); --- 1011,1022 ---- : QDialog( parent, "", 0, Qt::WType_TopLevel | Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title), ! FigEditor( 0 ), ! Canvas( 0 ), ! CanvasFrameLayout( 0 ), ! TheGrid( 0 ), ! TheImage( 0 ), ! CurrentTemplate( QString::fromLocal8Bit("")), ! CurrentSafeFrame( 0 ), ! fn( QString::fromLocal8Bit("")) { // qDebug("lprofMain::lprofMain"); *************** *** 1087,1094 **** ui->ComboBoxIntent -> clear(); ! ui->ComboBoxIntent -> insertItem(tr((QString)"Perceptual")); ! ui->ComboBoxIntent -> insertItem(tr((QString)"Relative colorimetric")); ! ui->ComboBoxIntent -> insertItem(tr((QString)"Saturation")); ! ui->ComboBoxIntent -> insertItem(tr((QString)"Absolute")); init_mon(); --- 1093,1100 ---- ui->ComboBoxIntent -> clear(); ! ui->ComboBoxIntent -> insertItem(per); ! ui->ComboBoxIntent -> insertItem(relcolor); ! ui->ComboBoxIntent -> insertItem(sat); ! ui->ComboBoxIntent -> insertItem(Absolute); init_mon(); *************** *** 1109,1113 **** // init_targetlist(); last_tab=0; ! global_help_path = new QString; setupHelp(global_help_path); sys.hdr.ProfilerTab = ui->TabProfiler -> currentPageIndex(); --- 1115,1119 ---- // init_targetlist(); last_tab=0; ! // global_help_path = new QString; setupHelp(global_help_path); sys.hdr.ProfilerTab = ui->TabProfiler -> currentPageIndex(); *************** *** 1145,1155 **** if (cTarget != QString::null) ! strcpy(sys.hdr.ReferenceSheet, cTarget.local8Bit()); ! strcpy(sys.hdr.MeasurementSheet, measfile); if (ui->radioButtonCandMFile -> isOn()) { ! strcpy(sys.hdr.MonMeasurementSheet, (const char*)ui->MonMeasurementSheet->getFilename().local8Bit()); ! strcpy(sys.hdr.MonCalibrationSheet, (const char*)ui->MonCalibrationSheet->getFilename().local8Bit()); } else --- 1151,1161 ---- if (cTarget != QString::null) ! strcpy(sys.hdr.ReferenceSheet, cTarget.toLocal8Bit()); ! strcpy(sys.hdr.MeasurementSheet, measfile.toLocal8Bit()); if (ui->radioButtonCandMFile -> isOn()) { ! strcpy(sys.hdr.MonMeasurementSheet, (const char*)ui->MonMeasurementSheet->getFilename().toLocal8Bit()); ! strcpy(sys.hdr.MonCalibrationSheet, (const char*)ui->MonCalibrationSheet->getFilename().toLocal8Bit()); } else *************** *** 1159,1168 **** } ! strcpy(sys.hdr.OutputProfileFile, (const char*) ui->OutputFileEdit -> text().local8Bit()); ! strcpy(sys.hdr.MonOutputProfileFile, (const char*) ui->OutputFileEdit_Mon -> text().local8Bit()); sys.hdr.cur_ref = ui->TargetSelector->getCurrItem(); strcpy(sys.hdr.template_dir, templates.local8Bit()); strcpy(sys.hdr.mon_profile_dir, (const char*) ui->MonitorProfileSelector->Dir.local8Bit()); ! strcpy(sys.hdr.mon_profile_file_name, (const char*)ui->MonitorProfileSelector->getFilename().local8Bit()); } --- 1165,1174 ---- } ! strcpy(sys.hdr.OutputProfileFile, (const char*) ui->OutputFileEdit -> text().toLocal8Bit()); ! strcpy(sys.hdr.MonOutputProfileFile, (const char*) ui->OutputFileEdit_Mon -> text().toLocal8Bit()); sys.hdr.cur_ref = ui->TargetSelector->getCurrItem(); strcpy(sys.hdr.template_dir, templates.local8Bit()); strcpy(sys.hdr.mon_profile_dir, (const char*) ui->MonitorProfileSelector->Dir.local8Bit()); ! strcpy(sys.hdr.mon_profile_file_name, (const char*)ui->MonitorProfileSelector->getFilename().toLocal8Bit()); } *************** *** 1170,1174 **** { // qDebug(QString(sys.hdr.Description).left(14)); ! if (QString(sys.hdr.Description).left(14) == QString("no description")) { QMessageBox mb( QTranslator::tr("LProf ICC Profiler"), --- 1176,1180 ---- { // qDebug(QString(sys.hdr.Description).left(14)); ! if (QString::fromLocal8Bit(sys.hdr.Description).left(14) == QString::fromLocal8Bit("no description")) { QMessageBox mb( QTranslator::tr("LProf ICC Profiler"), *************** *** 1205,1211 **** Console = ui->ProgressConsole; Console -> setTextFormat( Qt::LogText); ! strcpy(sys.hdr.temp_file, WorkTempFileName); ! SetGoButton(tr(QString("Profiling... please wait")), FALSE); /* TRANSLATOR Text displayed in the messages widget */ ConsolePrintf("Working hard...", 0, 'c'); --- 1211,1217 ---- Console = ui->ProgressConsole; Console -> setTextFormat( Qt::LogText); ! strcpy(sys.hdr.temp_file, WorkTempFileName.toLocal8Bit()); ! SetGoButton(tr("Profiling... please wait"), FALSE); /* TRANSLATOR Text displayed in the messages widget */ ConsolePrintf("Working hard...", 0, 'c'); *************** *** 1218,1223 **** if (cTarget != QString::null) ! strcpy(sys.hdr.ReferenceSheet, cTarget.local8Bit()); ! strcpy(sys.hdr.MeasurementSheet, measfile); // qDebug("about to call cmsxScannerProfilerDo"); --- 1224,1229 ---- if (cTarget != QString::null) ! strcpy(sys.hdr.ReferenceSheet, cTarget.toLocal8Bit()); ! strcpy(sys.hdr.MeasurementSheet, measfile.toLocal8Bit()); // qDebug("about to call cmsxScannerProfilerDo"); *************** *** 1235,1242 **** Gauger("Init...", 0, 100, 100); /* TRANSLATOR Text displayed in the messages widget */ ! ConsolePrintf("Profile '%1' DONE!", 1, 's', sys.hdr.OutputProfileFile); lprofApp -> restoreOverrideCursor(); } ! SetGoButton(tr(QString("Ready to GO!")), TRUE); --- 1241,1249 ---- Gauger("Init...", 0, 100, 100); /* TRANSLATOR Text displayed in the messages widget */ ! QString temp = temp.fromLocal8Bit(sys.hdr.OutputProfileFile); ! ConsolePrintf("Profile '%1' DONE!", 1, 's', temp.toLocal8Bit()); lprofApp -> restoreOverrideCursor(); } ! SetGoButton(tr("Ready to GO!"), TRUE); *************** *** 1252,1260 **** Console -> setTextFormat( Qt::LogText); ! strcpy(sys.hdr.temp_file, WorkTempFileName); OutputFileNameChangedMon(); ! SetGoButton(tr(QString("Profiling... please wait")), FALSE); /* TRANSLATOR Text displayed in the messages widget */ ConsolePrintf("Working hard...", 0, 'c'); --- 1259,1267 ---- Console -> setTextFormat( Qt::LogText); ! strcpy(sys.hdr.temp_file, WorkTempFileName.toLocal8Bit()); OutputFileNameChangedMon(); ! SetGoButton(tr("Profiling... please wait"), FALSE); /* TRANSLATOR Text displayed in the messages widget */ ConsolePrintf("Working hard...", 0, 'c'); *************** *** 1271,1276 **** else if (ui->radioButtonCandMFile -> isOn()) { ! strcpy(sys.hdr.MonMeasurementSheet, ui->MonMeasurementSheet->getFilename().local8Bit()); ! strcpy(sys.hdr.MonCalibrationSheet, ui->MonCalibrationSheet->getFilename().local8Bit()); } else --- 1278,1283 ---- else if (ui->radioButtonCandMFile -> isOn()) { ! strcpy(sys.hdr.MonMeasurementSheet, ui->MonMeasurementSheet->getFilename().toLocal8Bit()); ! strcpy(sys.hdr.MonCalibrationSheet, ui->MonCalibrationSheet->getFilename().toLocal8Bit()); } else *************** *** 1296,1300 **** } ! SetGoButton_2(tr(QString("Ready to GO!")), TRUE); if (sys.hdr.WhitePointParams.location==WP_LOC_RGB) slotUpdateProfileParmsText(); --- 1303,1307 ---- } ! SetGoButton_2(tr("Ready to GO!"), TRUE); if (sys.hdr.WhitePointParams.location==WP_LOC_RGB) slotUpdateProfileParmsText(); Index: griditem.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/griditem.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** griditem.cpp 19 Feb 2008 21:02:42 -0000 1.3 --- griditem.cpp 6 Mar 2008 21:18:58 -0000 1.4 *************** *** 201,229 **** patchCount = 0.0; QRect OurViewport; - // qDebug("GridItem::Pick"); cmsHTRANSFORM hInputXFORM; cmsHPROFILE hLab = NULL, hInputProfile = NULL; ! // Will not compile with QT_NO_ASCII_CAST turned on ! // when changed to ! // const char* cInputProfile = InputProfileName.local8Bit(); ! // Will get runtime errors for bad file name ! // Needs to be fixed ! ! QFile inProf(InputProfileName); ! const char* cInputProfile = InputProfileName; ! ! if (cInputProfile && inProf.exists()) { ! ! hLab = cmsCreateLabProfile(NULL); ! hInputProfile = cmsOpenProfileFromFile(cInputProfile, "r"); ! hInputXFORM = cmsCreateTransform(hInputProfile, TYPE_RGB_DBL, ! hLab, TYPE_Lab_16, INTENT_ABSOLUTE_COLORIMETRIC, ! cmsFLAGS_NOTPRECALC); } - else hInputXFORM = NULL; ComputeViewport(OurViewport, sx, sy); - vigra::DRGBImage in(image_data->width(), image_data->height()); vigra::importImage(*image_data, destImage(in)); --- 201,224 ---- patchCount = 0.0; QRect OurViewport; cmsHTRANSFORM hInputXFORM; cmsHPROFILE hLab = NULL, hInputProfile = NULL; ! if (InputProfileName.isEmpty()) ! hInputXFORM = NULL; ! else { ! QFile inProf(InputProfileName); ! if (inProf.exists()) ! { ! hLab = cmsCreateLabProfile(NULL); ! hInputProfile = cmsOpenProfileFromFile(InputProfileName.toLocal8Bit(), "r"); ! hInputXFORM = cmsCreateTransform(hInputProfile, TYPE_RGB_DBL, ! hLab, TYPE_Lab_16, INTENT_ABSOLUTE_COLORIMETRIC, ! cmsFLAGS_NOTPRECALC); ! } ! else ! hInputXFORM = NULL; } ComputeViewport(OurViewport, sx, sy); vigra::DRGBImage in(image_data->width(), image_data->height()); vigra::importImage(*image_data, destImage(in)); *************** *** 234,239 **** else if (int32lprof) mult = 255.0/4294967295.0; else mult = 255.0; // floating point type images ! ! QList<GridLayout>::iterator itEnd = Layout.end(); for ( QList<GridLayout>::iterator it = Layout.begin(); it != itEnd; ++it ) --- 229,233 ---- else if (int32lprof) mult = 255.0/4294967295.0; else mult = 255.0; // floating point type images ! QList<GridLayout>::iterator itEnd = Layout.end(); for ( QList<GridLayout>::iterator it = Layout.begin(); it != itEnd; ++it ) *************** *** 312,316 **** } } - Patch.p.dwFlags = PATCH_HAS_POS|PATCH_HAS_PIXELS|PATCH_HAS_RGB| PATCH_HAS_STD_RGB|PATCH_HAS_CHISQ; --- 306,309 ---- *************** *** 335,339 **** if (b.Mean() > (255.0 - b.Std())) clippedPatches++; ! if (hInputXFORM) { --- 328,332 ---- if (b.Mean() > (255.0 - b.Std())) clippedPatches++; ! if (hInputXFORM) { *************** *** 365,369 **** } } ! if (hInputXFORM) { --- 358,362 ---- } } ! if (hInputXFORM) { Index: lprofmain.h =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain.h,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** lprofmain.h 19 Feb 2008 21:02:47 -0000 1.51 --- lprofmain.h 6 Mar 2008 21:18:59 -0000 1.52 *************** *** 54,58 **** QAssistantClient* getHelp(); ! QString* get_global_help_path(); extern QSettings* lprofSettings; --- 54,58 ---- QAssistantClient* getHelp(); ! QString get_global_help_path(); extern QSettings* lprofSettings; Index: config.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/config.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config.cpp 19 Feb 2008 21:02:42 -0000 1.6 --- config.cpp 6 Mar 2008 21:18:58 -0000 1.7 *************** *** 60,66 **** #if defined (__APPLE__) ! const QString lprofBaseDir = "/Library/Application Support/lprof"; #else ! const QString lprofBaseDir = "/.lprof"; #endif --- 60,66 ---- #if defined (__APPLE__) [...1112 lines suppressed...] ! + profile ! + QString::fromLocal8Bit("/text/manufacturer"), ! QString::fromLocal8Bit(sys.hdr.Manufacturer)).toLocal8Bit()); ! strcpy(sys.hdr.Model, ! lprofSettings->readEntry(QString::fromLocal8Bit("LPROF/profile-") ! + profile ! + QString::fromLocal8Bit("/text/model"), ! QString::fromLocal8Bit(sys.hdr.Model)).toLocal8Bit()); ! strcpy(sys.hdr.Copyright, ! lprofSettings->readEntry(QString::fromLocal8Bit("LPROF/profile-") ! + profile ! + QString::fromLocal8Bit("/text/copyright"), ! QString::fromLocal8Bit(sys.hdr.Copyright)).toLocal8Bit()); ! strcpy(sys.hdr.Description, ! lprofSettings->readEntry(QString::fromLocal8Bit("LPROF/profile-") ! + profile ! + QString::fromLocal8Bit("/text/description"), ! QString::fromLocal8Bit(sys.hdr.Description)).toLocal8Bit()); } Index: lprofmain-priv.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain-priv.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lprofmain-priv.cpp 19 Feb 2008 21:02:42 -0000 1.3 --- lprofmain-priv.cpp 6 Mar 2008 21:18:58 -0000 1.4 *************** *** 22,26 **** bool int16lprof, int32lprof, uint8lprof, fltpixlprof, dblpixlprof; ! QString* global_help_path; QAssistantClient* help; --- 22,26 ---- bool int16lprof, int32lprof, uint8lprof, fltpixlprof, dblpixlprof; ! QString global_help_path; QAssistantClient* help; Index: interfaces.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/interfaces.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** interfaces.cpp 30 Nov 2007 06:28:58 -0000 1.4 --- interfaces.cpp 6 Mar 2008 21:18:58 -0000 1.5 *************** *** 42,46 **** } ! QString* get_global_help_path() { --- 42,46 ---- } ! QString get_global_help_path() { *************** *** 64,73 **** // qDebug("checkP::get"); ! out.items.ref_dir=(QString) ref_dir; out.items.cur_ref = sys.hdr.cur_ref; ! out.items.profile=(QString) sys.hdr.OutputProfileFile; ! out.items.msheet=(QString) sys.hdr.MeasurementSheet; ! out.items.mon_profile_dir=(QString) sys.hdr.mon_profile_dir; ! out.items.mon_profile_file_name=(QString) sys.hdr.mon_profile_file_name; } --- 64,73 ---- // qDebug("checkP::get"); ! out.items.ref_dir=ref_dir; out.items.cur_ref = sys.hdr.cur_ref; ! out.items.profile=QString::fromLocal8Bit( sys.hdr.OutputProfileFile); ! out.items.msheet=QString::fromLocal8Bit( sys.hdr.MeasurementSheet); ! out.items.mon_profile_dir=QString::fromLocal8Bit( sys.hdr.mon_profile_dir); ! out.items.mon_profile_file_name=QString::fromLocal8Bit( sys.hdr.mon_profile_file_name); } *************** *** 142,146 **** void targetTemplate::put(targetTemplate &in) { ! if (in.items.targetFile!=""&&in.items.templateFile!="") { add_target(in.items); --- 142,146 ---- void targetTemplate::put(targetTemplate &in) { ! if (in.items.targetFile != QString::fromLocal8Bit("") && in.items.templateFile != QString::fromLocal8Bit("")) { add_target(in.items); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:05
|
Update of /cvsroot/lprof/lprof/src/moncalqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/moncalqt Modified Files: monitorcal.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: monitorcal.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalqt/monitorcal.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** monitorcal.cpp 2 Mar 2008 01:10:14 -0000 1.60 --- monitorcal.cpp 6 Mar 2008 21:18:59 -0000 1.61 *************** *** 4068,4075 **** { userMessage = true; ! heading = tr((QString) "Calibration Complete."); ! message = tr((QString) "Calibration Complete."); if (calibrationCondition == inst_calc_message) ! message = QString::fromAscii(id); done = true; instrumentCode = inst_ok; --- 4068,4075 ---- { userMessage = true; ! heading = tr("Calibration Complete."); ! message = tr("Calibration Complete."); if (calibrationCondition == inst_calc_message) ! message = QString::fromLocal8Bit(id); done = true; instrumentCode = inst_ok; *************** *** 4081,4086 **** if ((instrumentCode & inst_mask) == inst_unsupported) { ! heading = tr((QString) "Calibration Not Suppotred"); ! message = tr((QString) "This device does not need or support calibration"); instrumentCode = inst_unsupported; done = true; --- 4081,4086 ---- if ((instrumentCode & inst_mask) == inst_unsupported) { ! heading = tr( "Calibration Not Suppotred"); ! message = tr( "This device does not need or support calibration"); instrumentCode = inst_unsupported; done = true; *************** *** 4089,4097 **** else { ! heading = tr((QString) "Calibration Failed"); ! message = tr((QString)"Calibration failed with ") + ! QString::fromAscii(deviceToCalibrate->inst_interp_error(deviceToCalibrate, instrumentCode)) + " " + ! QString::fromAscii(deviceToCalibrate->interp_error(deviceToCalibrate, instrumentCode)) + ! tr((QString)" Click OK to retry and Abort to stop calibarion."); userMessage = true; } --- 4089,4097 ---- else { ! heading = tr( "Calibration Failed"); ! message = tr("Calibration failed with ") + ! QString::fromLocal8Bit(deviceToCalibrate->inst_interp_error(deviceToCalibrate, instrumentCode)) + QString::fromLocal8Bit(" ") + ! QString::fromLocal8Bit(deviceToCalibrate->interp_error(deviceToCalibrate, instrumentCode)) + ! tr(" Click OK to retry and Abort to stop calibarion."); userMessage = true; } *************** *** 4105,4110 **** userMessage = true; disp = false; ! heading = tr((QString) "Reflective White Calibration Needed"); ! message = tr((QString)"Do a reflective white calibration then click OK to continue, or Abort to stop calibration."); break; --- 4105,4110 ---- userMessage = true; disp = false; ! heading = tr( "Reflective White Calibration Needed"); ! message = tr("Do a reflective white calibration then click OK to continue, or Abort to stop calibration."); break; *************** *** 4112,4117 **** userMessage = true; disp = false; ! heading = tr((QString) "Transmissive White Calibration Needed"); ! message = tr((QString)"Do a transmissive white calibration then click OK to continue, or Abort to stop calibration."); break; --- 4112,4117 ---- userMessage = true; disp = false; ! heading = tr( "Transmissive White Calibration Needed"); ! message = tr("Do a transmissive white calibration then click OK to continue, or Abort to stop calibration."); break; *************** *** 4119,4124 **** userMessage = true; disp = false; ! heading = tr((QString) "Transmissive Dark Calibration Needed"); ! message =tr((QString)"Do a transmissive dark calibration then click OK to continue, or Abort to stop calibration."); break; --- 4119,4124 ---- userMessage = true; disp = false; ! heading = tr( "Transmissive Dark Calibration Needed"); ! message =tr("Do a transmissive dark calibration then click OK to continue, or Abort to stop calibration."); break; *************** *** 4126,4133 **** userMessage = true; disp = false; ! heading = tr((QString) "Reflective White Calibration Needed"); ! message = tr((QString)"Place the instrument on its reflective white reference ") ! + QString::fromAscii(id) ! + tr((QString)" and then click OK to continue or Abort to stop calibration."); break; --- 4126,4133 ---- userMessage = true; disp = false; ! heading = tr( "Reflective White Calibration Needed"); ! message = tr("Place the instrument on its reflective white reference ") ! + QString::fromLocal8Bit(id) ! + tr(" and then click OK to continue or Abort to stop calibration."); break; *************** *** 4135,4142 **** userMessage = true; disp = false; ! heading = tr((QString) "Reflective White Calibration Needed"); ! message = tr((QString)"Place the instrument on its reflective white reference ") ! + QString::fromAscii(id) ! + tr((QString) "then click Ok to continue, or Abort to stop calibration."); break; --- 4135,4142 ---- userMessage = true; disp = false; ! heading = tr( "Reflective White Calibration Needed"); ! message = tr("Place the instrument on its reflective white reference ") ! + QString::fromLocal8Bit(id) ! + tr( "then click Ok to continue, or Abort to stop calibration."); break; *************** *** 4144,4149 **** userMessage = true; disp = false; ! heading = tr((QString) "Reflective Dark Calibration Needed"); ! message = tr((QString)"Place the instrument in the dark, not in contact with any surface, and then click Ok to continue, or Abort to stop calibration."); break; --- 4144,4149 ---- userMessage = true; disp = false; ! heading = tr( "Reflective Dark Calibration Needed"); ! message = tr("Place the instrument in the dark, not in contact with any surface, and then click Ok to continue, or Abort to stop calibration."); break; *************** *** 4151,4156 **** userMessage = true; disp = false; ! heading = tr((QString) "Emissive Dark Calibration Needed"); ! message = tr((QString)"Place the instrument on a dark surface, and then click Ok to continue, or Abort to stop calibration."); break; --- 4151,4156 ---- userMessage = true; disp = false; ! heading = tr( "Emissive Dark Calibration Needed"); ! message = tr("Place the instrument on a dark surface, and then click Ok to continue, or Abort to stop calibration."); break; *************** *** 4158,4163 **** userMessage = true; disp = false; ! heading = tr((QString) "Transmissive White Calibration Needed"); ! message = tr((QString)"Place the instrument on its transmissive white source, and then click Ok to continue, or Abort to stop calibration."); break; --- 4158,4163 ---- userMessage = true; disp = false; ! heading = tr( "Transmissive White Calibration Needed"); ! message = tr("Place the instrument on its transmissive white source, and then click Ok to continue, or Abort to stop calibration."); break; *************** *** 4165,4170 **** userMessage = true; disp = false; ! heading = tr((QString) "Transmissive Dark Calibration Needed"); ! message = tr((QString)"Use the appropriate tramissive blocking to block the transmission path, and then click Ok to continue, or Abort to stop calibration."); break; --- 4165,4170 ---- userMessage = true; disp = false; ! heading = tr( "Transmissive Dark Calibration Needed"); ! message = tr("Use the appropriate tramissive blocking to block the transmission path, and then click Ok to continue, or Abort to stop calibration."); break; *************** *** 4172,4177 **** userMessage = true; disp = false; ! heading = tr((QString) "Filter Change Needed"); ! message = tr((QString)"Change filter on instrument to ") + QString::fromAscii(id) + tr((QString)" and then click Ok to continue, or Abort to stop calibration."); break; --- 4172,4177 ---- userMessage = true; disp = false; ! heading = tr( "Filter Change Needed"); ! message = tr("Change filter on instrument to ") + QString::fromLocal8Bit(id) + tr(" and then click Ok to continue, or Abort to stop calibration."); break; *************** *** 4179,4184 **** userMessage = true; disp = false; ! message = tr((QString)"Click Ok to continue, or Abort to stop calibration."); ! heading = QString::fromAscii(id); break; --- 4179,4184 ---- userMessage = true; disp = false; ! message = tr("Click Ok to continue, or Abort to stop calibration."); ! heading = QString::fromLocal8Bit(id); break; *************** *** 4227,4231 **** default: // Something isn't being handled ! message = tr((QString)"Unhandled Calibration Condition"); QMessageBox::critical(this, QTranslator::tr("Calibration Failed."), message); qDebug("slotCalibrate unhandled calibrationCondition case 0x%x, err 0x%x\n", calibrationCondition, inst_internal_error); --- 4227,4231 ---- default: // Something isn't being handled ! message = tr("Unhandled Calibration Condition"); QMessageBox::critical(this, QTranslator::tr("Calibration Failed."), message); qDebug("slotCalibrate unhandled calibrationCondition case 0x%x, err 0x%x\n", calibrationCondition, inst_internal_error); *************** *** 4271,4275 **** // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return (QString) getenv(qtdir); } --- 4271,4275 ---- // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return QString::fromLocal8Bit(getenv(qtdir)); } *************** *** 4434,4438 **** bool MonitorCal::initInstrument() { ! QString temp = ""; comport=1; verb = 0; --- 4434,4438 ---- bool MonitorCal::initInstrument() { ! QString temp = QString::fromLocal8Bit(""); comport=1; verb = 0; *************** *** 4455,4459 **** // after issuing an error message fo the user. QString message; ! message = (QString) getErrorMessage(); QMessageBox::critical(this, QTranslator::tr("Problem Initializing the device port."), message + QTranslator::tr("This error indicates some type of problem with accessing the device. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB access and access rights to this device.")); --- 4455,4459 ---- // after issuing an error message fo the user. QString message; ! message = QString::fromLocal8Bit(getErrorMessage()); QMessageBox::critical(this, QTranslator::tr("Problem Initializing the device port."), message + QTranslator::tr("This error indicates some type of problem with accessing the device. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB access and access rights to this device.")); *************** *** 4464,4470 **** { qDebug("initIntrument(): failed new_inst()"); ! messageText -> insertParagraph(tr((QString)"Unknown, inappropriate or no instrument detected"), -1); QMessageBox::critical(this, QTranslator::tr("Failed to Initialize the Device"), ! "Failed to initialize device. Call to new_inst failed."); // (QString) it->inst_interp_error(it, rv) + " " // + (QString) it->interp_error(it, rv)); --- 4464,4470 ---- { qDebug("initIntrument(): failed new_inst()"); ! messageText -> insertParagraph(tr("Unknown, inappropriate or no instrument detected"), -1); QMessageBox::critical(this, QTranslator::tr("Failed to Initialize the Device"), ! tr("Failed to initialize device. Call to new_inst failed.")); // (QString) it->inst_interp_error(it, rv) + " " // + (QString) it->interp_error(it, rv)); *************** *** 4478,4486 **** // qDebug("initIntrument(): failed init_coms()"); messageText -> insertParagraph(tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + " + " ! + QString::fromAscii(it->inst_interp_error(it, rv)) + ")", -1); QMessageBox::critical(this, QTranslator::tr("Failed to Initialize the Device"), tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + ")"); return notOK; } --- 4478,4486 ---- // qDebug("initIntrument(): failed init_coms()"); messageText -> insertParagraph(tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") ! + QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(" + ") ! + QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(")"), -1); QMessageBox::critical(this, QTranslator::tr("Failed to Initialize the Device"), tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") ! + QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(")")); return notOK; } *************** *** 4504,4514 **** messageText -> insertParagraph(tr("init_inst returned ") + ! QString::fromAscii(it->inst_interp_error(it, rv)) ! + "(" + QString::fromAscii(it->interp_error(it, rv)) + ")" + tr(" Instrument initialization failed!"), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), ! QString::fromAscii(it->inst_interp_error(it, rv)) ! + "(" + QString::fromAscii(it->interp_error(it, rv)) + ")" + tr(" Instrument initialization failed!")); return notOK; --- 4504,4518 ---- messageText -> insertParagraph(tr("init_inst returned ") + ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) ! + QString::fromLocal8Bit("(") ! + QString::fromLocal8Bit(it->interp_error(it, rv)) ! + QString::fromLocal8Bit(")") + tr(" Instrument initialization failed!"), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) ! + QString::fromLocal8Bit("(") ! + QString::fromLocal8Bit(it->interp_error(it, rv)) ! + QString::fromLocal8Bit(")") + tr(" Instrument initialization failed!")); return notOK; *************** *** 4555,4564 **** { messageText -> insertParagraph(tr("Failed to set emission display mode. ") + ! QString::fromAscii(it->inst_interp_error(it, rv)) + " " + ! QString::fromAscii(it->interp_error(it, rv)), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), tr("Failed to set emission display mode. ") + ! QString::fromAscii(it->inst_interp_error(it, rv)) + " " + ! QString::fromAscii(it->interp_error(it, rv))); return notOK; } --- 4559,4568 ---- { messageText -> insertParagraph(tr("Failed to set emission display mode. ") + ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(" ") + ! QString::fromLocal8Bit(it->interp_error(it, rv)), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), tr("Failed to set emission display mode. ") + ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(" ") + ! QString::fromLocal8Bit(it->interp_error(it, rv))); return notOK; } *************** *** 4589,4600 **** { messageText -> insertParagraph(tr("Setting trigger mode failed with error : ") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + " " ! + QString::fromAscii(it->interp_error(it, rv)), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), tr("Setting trigger mode failed with error : ") + ! QString::fromAscii(it->inst_interp_error(it, rv)) + ! " " + ! QString::fromAscii(it->interp_error(it, rv))); return notOK; } --- 4593,4605 ---- { messageText -> insertParagraph(tr("Setting trigger mode failed with error : ") ! + QString::fromLocal8Bit(it->inst_interp_error(it, rv)) ! + QString::fromLocal8Bit(" ") ! + QString::fromLocal8Bit(it->interp_error(it, rv)), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), tr("Setting trigger mode failed with error : ") + ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + ! QString::fromLocal8Bit(" ") + ! QString::fromLocal8Bit(it->interp_error(it, rv))); return notOK; } *************** *** 4664,4673 **** // after issuing an error message fo the user. QString message; ! message = QString::fromAscii(getErrorMessage()); QMessageBox::critical(this, QTranslator::tr("Problem Taking Measureemnt."), QTranslator::tr("Meter library error message is ") + message + QTranslator::tr(" This error might indicate some type of problem with accessing the device.")); ! qDebug(message); XYZ.X = -99999.99; --- 4669,4678 ---- // after issuing an error message fo the user. QString message; ! message = QString::fromLocal8Bit(getErrorMessage()); QMessageBox::critical(this, QTranslator::tr("Problem Taking Measureemnt."), QTranslator::tr("Meter library error message is ") + message + QTranslator::tr(" This error might indicate some type of problem with accessing the device.")); ! qDebug(message.toLocal8Bit()); XYZ.X = -99999.99; *************** *** 4686,4698 **** { messageText -> insertParagraph (tr("read_sample returned '") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + "' (" ! + QString::fromAscii(it->interp_error(it, rv)) + ")", -1); ! qDebug(tr("read_sample returned '") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + "' (" ! + QString::fromAscii(it->interp_error(it, rv)) + ")"); // Deal with a misread if ((rv & inst_mask) == inst_misread) { ! messageText -> insertParagraph (tr((QString)"Spot read failed due to misread"), -1); --- 4691,4703 ---- { messageText -> insertParagraph (tr("read_sample returned '") ! + QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit("' (") ! + QString::fromLocal8Bit(it->interp_error(it, rv)) + QString::fromLocal8Bit(")"), -1); ! qDebug((tr("read_sample returned '") ! + QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit("' (") ! + QString::fromLocal8Bit(it->interp_error(it, rv)) + QString::fromLocal8Bit(")")).toLocal8Bit()); // Deal with a misread if ((rv & inst_mask) == inst_misread) { ! messageText -> insertParagraph (tr("Spot read failed due to misread"), -1); *************** *** 4718,4722 **** // Issue error message /* Communication problem */ ! messageText -> insertParagraph (tr((QString)"Read failed due to communication problem."), -1); // if ((rv = it->init_coms(it, comport, br, 15.0)) != inst_ok) { --- 4723,4727 ---- // Issue error message /* Communication problem */ ! messageText -> insertParagraph (tr("Read failed due to communication problem."), -1); // if ((rv = it->init_coms(it, comport, br, 15.0)) != inst_ok) { *************** *** 4731,4736 **** { messageText -> insertParagraph(tr("Got fatal error '") ! + QString::fromAscii(it->inst_interp_error(it, rv)) ! + "' (" + QString::fromAscii(it->interp_error(it, rv)) + ")", -1); } } --- 4736,4743 ---- { messageText -> insertParagraph(tr("Got fatal error '") ! + QString::fromLocal8Bit(it->inst_interp_error(it, rv)) ! + QString::fromLocal8Bit("' (") ! + QString::fromLocal8Bit(it->interp_error(it, rv)) ! + QString::fromLocal8Bit(")"), -1); } } *************** *** 4742,4748 **** if (val.sp.spec_n <= 0) { ! // messageText -> insertParagraph(tr((QString)"Instrument didn't return spectral data"), -1); if (val.XYZ_v == 0 && val.aXYZ_v == 0) ! messageText -> insertParagraph(tr((QString)"Instrument didn't return XYZ value"), -1); if (val.XYZ_v != 0) --- 4749,4755 ---- if (val.sp.spec_n <= 0) { ! // messageText -> insertParagraph(tr("Instrument didn't return spectral data"), -1); if (val.XYZ_v == 0 && val.aXYZ_v == 0) ! messageText -> insertParagraph(tr("Instrument didn't return XYZ value"), -1); if (val.XYZ_v != 0) *************** *** 5112,5119 **** vdt = comp_ct(&vdt_de, target, 0, 1, white); /* Compute VDT */ ! QString temp = QString("%1K").arg(vdt, 0, 'f', 1); TemperatureLabel -> setText(temp); ! temp = QString("%1").arg(DeltaE(XYZ, targetXYZ), 0, 'f', 2); deltaE -> setText(temp); --- 5119,5126 ---- vdt = comp_ct(&vdt_de, target, 0, 1, white); /* Compute VDT */ ! QString temp = QString::fromLocal8Bit("%1K").arg(vdt, 0, 'f', 1); TemperatureLabel -> setText(temp); ! temp = QString::fromLocal8Bit("%1").arg(DeltaE(XYZ, targetXYZ), 0, 'f', 2); deltaE -> setText(temp); *************** *** 5168,5182 **** progressBar -> setProgress(4); ! QString temp1 = tr(QString("Display gamma = %1\n")).arg(gamma, 0, 'f', 2); ! QString temp2 = tr(QString("Black level = %1 cd/m^2\n")).arg(readXYZ[0].Y*100, 0, 'f', 5); ! QString temp3 = QString (tr("White level = %1 cd/m^2\n")).arg(readXYZ[2].Y*100, 0, 'f', 1); ! QString temp5 = tr(QString("Contrast ratio = %1:1\n")) .arg(readXYZ[2].Y/readXYZ[0].Y, 0, 'f', 0); ! QString temp6 = QString (tr("White chromaticity coordinates %1, %2\n")) .arg(whitepoint[0], 0, 'f', 4).arg(whitepoint[1], 0, 'f', 4); ! QString temp7 = tr(QString("White Correlated Color Temperature = %1K, DE to locus = %2\n")).arg(cct, 0, 'f', 0).arg(cct_de, 0, 'f', 2); ! QString temp8 = tr(QString("White Correlated Daylight Temperature = %1K, DE to locus = %2\n")).arg(cdt, 0, 'f', 0).arg(cdt_de, 0, 'f', 2); ! QString temp9 = tr(QString("White Visual Color Temperature = %1K, DE to locus = %2\n")).arg(vct, 0, 'f', 0).arg(vct_de, 0, 'f', 2); ! QString temp10 = tr(QString("White Visual Daylight Temperature = %1K, DE to locus = %2")).arg(vdt, 0, 'f', 0).arg(vdt_de, 0, 'f', 2); QMessageBox::information( this, tr("Display Calibration Report"), temp1 + temp2 + temp3 + temp5 + temp6 + temp7 + temp8 + temp9 + temp10); } --- 5175,5189 ---- progressBar -> setProgress(4); ! QString temp1 = tr("Display gamma = %1\n").arg(gamma, 0, 'f', 2); ! QString temp2 = tr("Black level = %1 cd/m^2\n").arg(readXYZ[0].Y*100, 0, 'f', 5); ! QString temp3 = tr("White level = %1 cd/m^2\n").arg(readXYZ[2].Y*100, 0, 'f', 1); ! QString temp5 = tr("Contrast ratio = %1:1\n") .arg(readXYZ[2].Y/readXYZ[0].Y, 0, 'f', 0); ! QString temp6 = tr("White chromaticity coordinates %1, %2\n") .arg(whitepoint[0], 0, 'f', 4).arg(whitepoint[1], 0, 'f', 4); ! QString temp7 = tr("White Correlated Color Temperature = %1K, DE to locus = %2\n").arg(cct, 0, 'f', 0).arg(cct_de, 0, 'f', 2); ! QString temp8 = tr("White Correlated Daylight Temperature = %1K, DE to locus = %2\n").arg(cdt, 0, 'f', 0).arg(cdt_de, 0, 'f', 2); ! QString temp9 = tr("White Visual Color Temperature = %1K, DE to locus = %2\n").arg(vct, 0, 'f', 0).arg(vct_de, 0, 'f', 2); ! QString temp10 = tr("White Visual Daylight Temperature = %1K, DE to locus = %2").arg(vdt, 0, 'f', 0).arg(vdt_de, 0, 'f', 2); QMessageBox::information( this, tr("Display Calibration Report"), temp1 + temp2 + temp3 + temp5 + temp6 + temp7 + temp8 + temp9 + temp10); } *************** *** 5674,5678 **** cmsFreeSampledCurve(resampledCurves[2]); ! QString mess = tr("Calibration file ") + (QString) calfile + tr(" has been created."); messageText -> insertParagraph(mess, -1); QMessageBox::information( this, tr("Display Calibration File Created"), tr("The calibration process has completed")); --- 5681,5685 ---- cmsFreeSampledCurve(resampledCurves[2]); ! QString mess = tr("Calibration file ") + QString::fromLocal8Bit(calfile) + tr(" has been created."); messageText -> insertParagraph(mess, -1); QMessageBox::information( this, tr("Display Calibration File Created"), tr("The calibration process has completed")); *************** *** 5784,5788 **** if (cd.data.OK) { ! QString mess = tr("Measurement file ") + (QString) measfile + tr(" has been created."); messageText -> insertParagraph(mess, -1); QMessageBox::information( this, tr("Display Measurement File Created"), tr("The display measurement process has completed")); --- 5791,5795 ---- if (cd.data.OK) { ! QString mess = tr("Measurement file ") + QString::fromLocal8Bit(measfile) + tr(" has been created."); messageText -> insertParagraph(mess, -1); QMessageBox::information( this, tr("Display Measurement File Created"), tr("The display measurement process has completed")); *************** *** 5959,5963 **** sp2cief[i] = NULL; ! messageText -> setText(" "); pixmapColor -> setUpdatesEnabled( TRUE ); getInData(); --- 5966,5970 ---- sp2cief[i] = NULL; ! messageText -> setText(QString::fromLocal8Bit(" ")); pixmapColor -> setUpdatesEnabled( TRUE ); getInData(); *************** *** 6061,6078 **** progressBar -> setProgress(size + 8); ! QString temp1 = tr(QString("Display gamma = %1\n")).arg(gamma, 0, 'f', 2); ! QString temp1_1 = tr(QString("Display red gamma = %1\n")).arg(Rgamma, 0, 'f', 2); ! QString temp1_2 = tr(QString("Display green gamma = %1\n")).arg(Rgamma, 0, 'f', 2); ! QString temp1_3 = tr(QString("Display blue gamma = %1\n")).arg(Rgamma, 0, 'f', 2); ! QString temp2 = tr(QString("Black level = %1 cd/m^2\n")).arg(readXYZ.Y*100, 0, 'f', 5); ! QString temp3 = tr(QString("White level = %1 cd/m^2\n")).arg(locusXYZ[size - 1].Y*100, 0, 'f', 1); ! QString temp5 = tr(QString("Contrast ratio = %1:1\n")) .arg(locusXYZ[size - 1].Y/readXYZ.Y, 0, 'f', 0); ! QString temp6 = QString (tr("White chromaticity coordinates %1, %2\n")) .arg(whitepoint[0], 0, 'f', 4).arg(whitepoint[1], 0, 'f', 4); ! QString temp7 = tr(QString("White Correlated Color Temperature = %1K, DE to locus = %2\n")).arg(cct, 0, 'f', 0).arg(cct_de, 0, 'f', 2); ! QString temp8 = tr(QString("White Correlated Daylight Temperature = %1K, DE to locus = %2\n")).arg(cdt, 0, 'f', 0).arg(cdt_de, 0, 'f', 2); ! QString temp9 = tr(QString("White Visual Color Temperature = %1K, DE to locus = %2\n")).arg(vct, 0, 'f', 0).arg(vct_de, 0, 'f', 2); ! QString temp10 = tr(QString("White Visual Daylight Temperature = %1K, DE to locus = %2\n\n")).arg(vdt, 0, 'f', 0).arg(vdt_de, 0, 'f', 2); for (int i=0; i<size-1; i++) { --- 6068,6085 ---- progressBar -> setProgress(size + 8); ! QString temp1 = tr("Display gamma = %1\n").arg(gamma, 0, 'f', 2); ! QString temp1_1 = tr("Display red gamma = %1\n").arg(Rgamma, 0, 'f', 2); ! QString temp1_2 = tr("Display green gamma = %1\n").arg(Rgamma, 0, 'f', 2); ! QString temp1_3 = tr("Display blue gamma = %1\n").arg(Rgamma, 0, 'f', 2); ! QString temp2 = tr("Black level = %1 cd/m^2\n").arg(readXYZ.Y*100, 0, 'f', 5); ! QString temp3 = tr("White level = %1 cd/m^2\n").arg(locusXYZ[size - 1].Y*100, 0, 'f', 1); ! QString temp5 = tr("Contrast ratio = %1:1\n") .arg(locusXYZ[size - 1].Y/readXYZ.Y, 0, 'f', 0); ! QString temp6 = tr("White chromaticity coordinates %1, %2\n") .arg(whitepoint[0], 0, 'f', 4).arg(whitepoint[1], 0, 'f', 4); ! QString temp7 = tr("White Correlated Color Temperature = %1K, DE to locus = %2\n").arg(cct, 0, 'f', 0).arg(cct_de, 0, 'f', 2); ! QString temp8 = tr("White Correlated Daylight Temperature = %1K, DE to locus = %2\n").arg(cdt, 0, 'f', 0).arg(cdt_de, 0, 'f', 2); ! QString temp9 = tr("White Visual Color Temperature = %1K, DE to locus = %2\n").arg(vct, 0, 'f', 0).arg(vct_de, 0, 'f', 2); ! QString temp10 = tr("White Visual Daylight Temperature = %1K, DE to locus = %2\n\n").arg(vdt, 0, 'f', 0).arg(vdt_de, 0, 'f', 2); for (int i=0; i<size-1; i++) { *************** *** 6096,6100 **** rgb = (int) (((double) i) * 15.875); ! Delta_E_lines[i] = tr(QString("At RGB= %1 DE to locus = %2\n")).arg(rgb).arg(DeltaE(locusXYZ[i],targetXYZ) , 0, 'f', 4); // qDebug(Delta_E_lines[i]); // Delta_E_lines[i] = tr(QString("At RGB= %1 DE to locus = %2\n")).arg(rgb).arg(dE , 0, 'f', 5); --- 6103,6107 ---- rgb = (int) (((double) i) * 15.875); ! Delta_E_lines[i] = tr("At RGB= %1 DE to locus = %2\n").arg(rgb).arg(DeltaE(locusXYZ[i],targetXYZ) , 0, 'f', 4); // qDebug(Delta_E_lines[i]); // Delta_E_lines[i] = tr(QString("At RGB= %1 DE to locus = %2\n")).arg(rgb).arg(dE , 0, 'f', 5); *************** *** 6131,6135 **** void MonitorCal::slotHelpButton() { ! QString path = get_global_help_path()->local8Bit() + "/monmeasurement.html"; // qDebug(path); getHelp()->openAssistant (); --- 6138,6142 ---- void MonitorCal::slotHelpButton() { ! QString path = get_global_help_path() + QString::fromLocal8Bit("/monmeasurement.html"); // qDebug(path); getHelp()->openAssistant (); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:04
|
Update of /cvsroot/lprof/lprof/src/reference_inst_qt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/reference_inst_qt Modified Files: installreffile.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: installreffile.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/reference_inst_qt/installreffile.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** installreffile.cpp 19 Feb 2008 21:03:01 -0000 1.55 --- installreffile.cpp 6 Mar 2008 21:18:59 -0000 1.56 *************** *** 87,91 **** else { ! qDebug("Month not found = " + m); return 0; } --- 87,91 ---- else { ! qDebug((QString::fromLocal8Bit("Month not found = ") + m).toLocal8Bit()); return 0; [...1071 lines suppressed...] cmsIT8SetPropertyStr(hIT8, "MANUFACTURER", (const char *) "X-Rite"); ! cmsIT8SaveToFile(hIT8, (const char *) files.items.targetFile.local8Bit()); // QDir::cleanDirPath( files.items.targetFile ); --- 1064,1078 ---- // Modify fields in reference file so that this shows up correctly in UI ! LCMSHANDLE hIT8 = cmsIT8LoadFromFile((const char *) files.items.targetFile.toLocal8Bit()); cmsIT8SetPropertyStr(hIT8, "ORIGINATOR", (const char *) "LProf Reference File Installer"); ! if (LogoDescriptor == QString::fromLocal8Bit("")) ! LogoDescriptor = QString::fromLocal8Bit("Unknown - no decriptor found"); ! if (LogoSerial == QString::fromLocal8Bit("")) ! LogoSerial = QString::fromLocal8Bit("Unknown - no serial found"); ! cmsIT8SetPropertyStr(hIT8, "DESCRIPTOR", (const char *) LogoDescriptor.toLocal8Bit()); ! cmsIT8SetPropertyStr(hIT8, "SERIAL", (const char *) LogoSerial.toLocal8Bit()); ! cmsIT8SetPropertyStr(hIT8, "CREATED", (const char *) LogoSerial.toLocal8Bit()); cmsIT8SetPropertyStr(hIT8, "MANUFACTURER", (const char *) "X-Rite"); ! cmsIT8SaveToFile(hIT8, (const char *) files.items.targetFile.toLocal8Bit()); // QDir::cleanDirPath( files.items.targetFile ); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:04
|
Update of /cvsroot/lprof/lprof/src/parmsqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/parmsqt Modified Files: profileparms.cpp profileparmsmon.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: profileparmsmon.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/parmsqt/profileparmsmon.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** profileparmsmon.cpp 19 Feb 2008 21:02:51 -0000 1.4 --- profileparmsmon.cpp 6 Mar 2008 21:18:59 -0000 1.5 *************** *** 45,49 **** // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return (QString) getenv(qtdir); } --- 45,49 ---- // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return QString::fromLocal8Bit(getenv(qtdir)); } *************** *** 114,130 **** source_or_dest_VC_groupBox -> setTitle (tr("Assumed display viewing conditions")); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[sRGB]), 0); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[sRGBannexD]), 1); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[iso9241]), 2); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[projDark]), 3); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[projDim]), 4); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[userdef]), 5); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p2_pcs]), 0); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[userdef]), 1); } ProfileParmsMon::ProfileParmsMon(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax ) { setupUi(this); --- 114,130 ---- source_or_dest_VC_groupBox -> setTitle (tr("Assumed display viewing conditions")); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[sRGB].toLocal8Bit()), 0); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[sRGBannexD].toLocal8Bit()), 1); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[iso9241].toLocal8Bit()), 2); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[projDark].toLocal8Bit()), 3); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[projDim].toLocal8Bit()), 4); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[userdef].toLocal8Bit()), 5); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p2_pcs].toLocal8Bit()), 0); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[userdef].toLocal8Bit()), 1); } ProfileParmsMon::ProfileParmsMon(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title) { setupUi(this); *************** *** 484,488 **** void ProfileParmsMon::slotHelpButton() { ! QString path = get_global_help_path()->local8Bit() + "/profile-parms.html"; // qDebug(path); getHelp()->openAssistant (); --- 484,489 ---- void ProfileParmsMon::slotHelpButton() { ! QString global_help_path = get_global_help_path(); ! QString path = global_help_path + QString::fromLocal8Bit("/profile-parms.html"); // qDebug(path); getHelp()->openAssistant (); Index: profileparms.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/parmsqt/profileparms.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** profileparms.cpp 1 Mar 2008 23:47:14 -0000 1.59 --- profileparms.cpp 6 Mar 2008 21:18:59 -0000 1.60 *************** *** 48,52 **** // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return (QString) getenv(qtdir); } --- 48,52 ---- // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return QString::fromLocal8Bit(getenv(qtdir)); } *************** *** 152,173 **** PCSVCcomboBox -> clear(); source_or_dest_VC_groupBox -> setTitle (tr("Assumed viewing conditions for the captured medium")); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p2]), 0); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[cie1161995]), 1); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p1]), 2); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[brightOutdoors]), 3); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[cutSheet]), 4); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[userdef]), 5); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p2_pcs]), 0); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[cie1161995]), 1); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p1]), 2); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[sRGB]), 3); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[sRGBannexD]), 4); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[iso9241]), 5); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[userdef]), 6); } ProfileParms::ProfileParms(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Dialog) { setupUi(this); --- 152,173 ---- PCSVCcomboBox -> clear(); source_or_dest_VC_groupBox -> setTitle (tr("Assumed viewing conditions for the captured medium")); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p2].toLocal8Bit()), 0); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[cie1161995].toLocal8Bit()), 1); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p1].toLocal8Bit()), 2); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[brightOutdoors].toLocal8Bit()), 3); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[cutSheet].toLocal8Bit()), 4); ! deviceVCcomboBox -> insertItem (tr(VCqStringValues[userdef].toLocal8Bit()), 5); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p2_pcs].toLocal8Bit()), 0); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[cie1161995].toLocal8Bit()), 1); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[iso3664p1].toLocal8Bit()), 2); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[sRGB].toLocal8Bit()), 3); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[sRGBannexD].toLocal8Bit()), 4); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[iso9241].toLocal8Bit()), 5); ! PCSVCcomboBox -> insertItem (tr(VCqStringValues[userdef].toLocal8Bit()), 6); } ProfileParms::ProfileParms(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Dialog | Qt::WStyle_Title) { setupUi(this); *************** *** 767,771 **** void ProfileParms::slotHelpButton() { ! QString path = get_global_help_path()->local8Bit() + "/profile-parms.html"; // qDebug(path); getHelp()->openAssistant (); --- 767,771 ---- void ProfileParms::slotHelpButton() { ! QString path = get_global_help_path() + QString::fromLocal8Bit("/profile-parms.html"); // qDebug(path); getHelp()->openAssistant (); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:04
|
Update of /cvsroot/lprof/lprof/src/moncalcontrolqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/moncalcontrolqt Modified Files: moncalcontrol.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: moncalcontrol.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalcontrolqt/moncalcontrol.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** moncalcontrol.cpp 22 Feb 2008 00:16:17 -0000 1.36 --- moncalcontrol.cpp 6 Mar 2008 21:18:59 -0000 1.37 *************** *** 110,114 **** { const char* qtdir= "QTDIR"; ! return (QString) getenv(qtdir); } --- 110,114 ---- { const char* qtdir= "QTDIR"; ! return QString::fromLocal8Bit(getenv(qtdir)); } *************** *** 158,164 **** { QMessageBox mb( QTranslator::tr("Prepare to Read Ambient Lighting"), ! (QString) "Prepare the measurement device for an ambient light reading. " + ! (QString) "Please put the ambient light head on device if it has one. " + ! (QString) "When ready push the OK button.", QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, --- 158,162 ---- { QMessageBox mb( QTranslator::tr("Prepare to Read Ambient Lighting"), ! QTranslator::tr("Prepare the measurement device for an ambient light reading. Please put the ambient light head on device if it has one. When ready push the OK button."), QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, *************** *** 174,178 **** // after issuing an error message fo the user. QString message; ! message = (QString) getErrorMessage(); QMessageBox mb( QTranslator::tr("Problem Initializing the device port."), message + QTranslator::tr("This error indicates some type of problem with accessing the device. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB access and access rights to this device."), --- 172,176 ---- // after issuing an error message fo the user. QString message; ! message = QString::fromLocal8Bit(getErrorMessage()); QMessageBox mb( QTranslator::tr("Problem Initializing the device port."), message + QTranslator::tr("This error indicates some type of problem with accessing the device. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB access and access rights to this device."), *************** *** 193,197 **** if (!rv == inst_ok) { ! QMessageBox::critical(this, QTranslator::tr("Meter Error"), "There was a problem during the ambient light measurement."); } else // reading was OK --- 191,195 ---- if (!rv == inst_ok) { ! QMessageBox::critical(this, QTranslator::tr("Meter Error"), QTranslator::tr("There was a problem during the ambient light measurement.")); } else // reading was OK *************** *** 205,209 **** if (val.XYZ_v == 0 && val.aXYZ_v == 0) { ! qDebug(tr((QString)"Instrument didn't return XYZ value")); } --- 203,207 ---- if (val.XYZ_v == 0 && val.aXYZ_v == 0) { ! qDebug(tr("Instrument didn't return XYZ value").toLocal8Bit()); } *************** *** 226,230 **** temp = icx_XYZ2ill_ct(XYZ, icxIT_Dtemp, icxOT_CIE_1931_2, NULL, instXYZ, NULL, 1); ! QString tempStr = QString ("The ambient color temperature is %1 degrees Kelvin\nWith a luminosity of %2 Cd/m^2 or approx. %2 lux").arg(temp, 5, 'f', 0).arg(instXYZ[1], 4, 'f', 1).arg(instXYZ[1]*16.6666666666667, 6, 'f', 1); QMessageBox::critical(this, QTranslator::tr("Ambient Lighting Reading"), tempStr); --- 224,228 ---- temp = icx_XYZ2ill_ct(XYZ, icxIT_Dtemp, icxOT_CIE_1931_2, NULL, instXYZ, NULL, 1); ! QString tempStr = QTranslator::tr("The ambient color temperature is %1 degrees Kelvin\nWith a luminosity of %2 Cd/m^2 or approx. %2 lux").arg(temp, 5, 'f', 0).arg(instXYZ[1], 4, 'f', 1).arg(instXYZ[1]*16.6666666666667, 6, 'f', 1); QMessageBox::critical(this, QTranslator::tr("Ambient Lighting Reading"), tempStr); *************** *** 236,240 **** else { ! QMessageBox::critical(this, QTranslator::tr("Meter Error"), (QString) "Meter does not support ambient light readings."); } // clean up as needed. --- 234,238 ---- else { ! QMessageBox::critical(this, QTranslator::tr("Meter Error"), QTranslator::tr("Meter does not support ambient light readings.")); } // clean up as needed. *************** *** 245,249 **** bool MonitorCalControl::initInstrumentAmbient() { ! QString temp = ""; int verb = 0; int mydebug=0; --- 243,247 ---- bool MonitorCalControl::initInstrumentAmbient() { ! QString temp = QString::fromLocal8Bit(""); int verb = 0; int mydebug=0; *************** *** 267,271 **** // after issuing an error message fo the user. QString message; ! message = (QString) getErrorMessage(); QMessageBox mb( QTranslator::tr("Problem Initializing the device port."), message + QTranslator::tr("This error indicates some type of problem with accessing the device. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB access and access rights to this device."), --- 265,269 ---- // after issuing an error message fo the user. QString message; ! message = QString::fromLocal8Bit(getErrorMessage()); QMessageBox mb( QTranslator::tr("Problem Initializing the device port."), message + QTranslator::tr("This error indicates some type of problem with accessing the device. A likely cause is not having access rights to the device. Check your permissions to make sure you have USB access and access rights to this device."), *************** *** 282,286 **** { QMessageBox mb( QTranslator::tr("Failed to Initialize the Device"), ! "Failed to initialize device. Call to new_inst failed.", QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, --- 280,284 ---- { QMessageBox mb( QTranslator::tr("Failed to Initialize the Device"), ! QTranslator::tr("Failed to initialize device. Call to new_inst failed."), QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, *************** *** 294,300 **** if ((rv = it->init_coms(it, cd.data.selectedInst.position + 1, br, fc_nc, 15.0)) != inst_ok) { ! QMessageBox::critical(this, QTranslator::tr("Meter Error"), (QString) tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") + ! (QString) it->inst_interp_error(it, rv) + " " + ! (QString) it->inst_interp_error(it, rv) + ")"); return notOK; } --- 292,298 ---- if ((rv = it->init_coms(it, cd.data.selectedInst.position + 1, br, fc_nc, 15.0)) != inst_ok) { ! QMessageBox::critical(this, QTranslator::tr("Meter Error"), tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") + ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(" ") + ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(")")); return notOK; } *************** *** 313,318 **** QMessageBox mb( QTranslator::tr("Problem Initializing Instrument."), ! (QString) it->inst_interp_error(it, rv) ! + "(" + (QString) it->interp_error(it, rv) + ")" + tr(" Instrument initialization failed!"), QMessageBox::Critical, --- 311,316 ---- QMessageBox mb( QTranslator::tr("Problem Initializing Instrument."), ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) ! + QString::fromLocal8Bit("(") + QString::fromLocal8Bit(it->interp_error(it, rv)) + QString::fromLocal8Bit(")") + tr(" Instrument initialization failed!"), QMessageBox::Critical, *************** *** 340,345 **** QMessageBox::critical(this,QTranslator::tr("Meter Error"), tr("Failed to set ambient measurement mode. ") + ! (QString) it->inst_interp_error(it, rv) + " " + ! (QString) it->interp_error(it, rv)); return notOK; } --- 338,343 ---- QMessageBox::critical(this,QTranslator::tr("Meter Error"), tr("Failed to set ambient measurement mode. ") + ! QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(" ") + ! QString::fromLocal8Bit(it->interp_error(it, rv))); return notOK; } *************** *** 349,354 **** QMessageBox::critical(this, QTranslator::tr("Meter Error"), tr("Setting trigger mode failed with error : ") ! + (QString) it->inst_interp_error(it, rv) + " " ! + (QString) it->interp_error(it, rv)); return notOK; } --- 347,352 ---- QMessageBox::critical(this, QTranslator::tr("Meter Error"), tr("Setting trigger mode failed with error : ") ! + QString::fromLocal8Bit(it->inst_interp_error(it, rv)) + QString::fromLocal8Bit(" ") ! + QString::fromLocal8Bit(it->interp_error(it, rv))); return notOK; } *************** *** 563,583 **** QString startDir; QString filter; ! QString command = getAppExecDir() + "/spyd2enlprof"; #if defined (Q_WS_MAC) ! startDir = "/Applications/Spyder2express 2.2/Spyder2express.app/Contents/MacOSClassic/"; #elif defined (Q_WS_WIN) ! startDir = "C:/Program Files/ColorVision/Spyder2express/"; #else ! startDir = "/"; #endif ! filter = "Spyder 2 Files (Spyder.lib; CVSpyder.dll; setup.exe)"; ! Q3FileDialog fd(startDir, filter, this, tr("Locate Firmware"), TRUE); fd.show(); fd.exec(); if (!fd.selectedFile().isEmpty()) ! command = command + " " + fd.selectedFile(); ! system(command); ! qDebug(command); ! if (!QFile::exists(getAppExecDir() + "/" + "spyd2PLD.bin")) QMessageBox::critical(this, QTranslator::tr("Error"), tr("Firmware file creation failed.")); } --- 561,581 ---- QString startDir; QString filter; ! QString command = getAppExecDir() + QString::fromLocal8Bit("/spyd2enlprof"); #if defined (Q_WS_MAC) ! startDir = QString::fromLocal8Bit("/Applications/Spyder2express 2.2/Spyder2express.app/Contents/MacOSClassic/"); #elif defined (Q_WS_WIN) ! startDir = QString::fromLocal8Bit("C:/Program Files/ColorVision/Spyder2express/"); #else ! startDir = QString::fromLocal8Bit("/"); #endif ! filter = QString::fromLocal8Bit("Spyder 2 Files (Spyder.lib; CVSpyder.dll; setup.exe)"); ! Q3FileDialog fd(startDir, filter, this, tr("Locate Firmware").toLocal8Bit(), TRUE); fd.show(); fd.exec(); if (!fd.selectedFile().isEmpty()) ! command = command + QString::fromLocal8Bit(" ") + fd.selectedFile(); ! system(command.toLocal8Bit()); ! qDebug(command.toLocal8Bit()); ! if (!QFile::exists(getAppExecDir() + QString::fromLocal8Bit("/") + QString::fromLocal8Bit("spyd2PLD.bin"))) QMessageBox::critical(this, QTranslator::tr("Error"), tr("Firmware file creation failed.")); } *************** *** 585,589 **** else QMessageBox::warning(this, tr("Spyder2 Firmware Missing"), ! tr("Please install the firmware for your Spyder 2. See the Spyder 2 section of the help files for details. Your Spyder 2 will not function until the firmware is installed. The current user does not have authority to write the firmware file to the correct location. To install the firmware you will need write access to ") + getAppExecDir() + ".\n"); } --- 583,587 ---- else QMessageBox::warning(this, tr("Spyder2 Firmware Missing"), ! tr("Please install the firmware for your Spyder 2. See the Spyder 2 section of the help files for details. Your Spyder 2 will not function until the firmware is installed. The current user does not have authority to write the firmware file to the correct location. To install the firmware you will need write access to ") + getAppExecDir()); } *************** *** 661,665 **** MonitorCalControl::MonitorCalControl(QWidget *parent ) ! : Q3Wizard(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax ) { setupUi(this); --- 659,663 ---- MonitorCalControl::MonitorCalControl(QWidget *parent ) ! : Q3Wizard(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title) { setupUi(this); *************** *** 699,703 **** { // need to issue an error message ! QString Message = QString(tr("Display color depth is %1. ")).arg(depth, 0) + QString(tr("It should be at least 24 for proper color management of your display.")); QMessageBox::critical( this, tr("Display Color Depth Error"), Message); --- 697,701 ---- { // need to issue an error message ! QString Message = tr("Display color depth is %1. ").arg(depth, 0) + tr("It should be at least 24 for proper color management of your display."); QMessageBox::critical( this, tr("Display Color Depth Error"), Message); *************** *** 743,747 **** void MonitorCalControl::slotHelpButton() { ! QString path = get_global_help_path()->local8Bit() + "/moncalcontrol.html"; getHelp()->openAssistant (); getHelp()->showPage(path); --- 741,745 ---- void MonitorCalControl::slotHelpButton() { ! QString path = get_global_help_path()+ QString::fromLocal8Bit("/moncalcontrol.html"); getHelp()->openAssistant (); getHelp()->showPage(path); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:03
|
Update of /cvsroot/lprof/lprof/src/libqtlcmswidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/libqtlcmswidgets Modified Files: qtcietonge.cpp qtlcmswidgets.cpp qtlcmswidgets.h Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: qtlcmswidgets.h =================================================================== RCS file: /cvsroot/lprof/lprof/src/libqtlcmswidgets/qtlcmswidgets.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** qtlcmswidgets.h 19 Feb 2008 21:02:40 -0000 1.14 --- qtlcmswidgets.h 6 Mar 2008 21:18:58 -0000 1.15 *************** *** 132,136 **** IT8Selector(QWidget* parent=0, const char* name=0, Qt::WFlags f=0) : ! BaseSelector(tr("Target"), "", "*.txt *.TXT *.IT8 *.it8 *.q60 *.Q60", FALSE, FALSE, parent, name, f) {} --- 132,136 ---- IT8Selector(QWidget* parent=0, const char* name=0, Qt::WFlags f=0) : ! BaseSelector(tr("Target"), QString::fromLocal8Bit(""), QString::fromLocal8Bit("*.txt *.TXT *.IT8 *.it8 *.q60 *.Q60"), FALSE, FALSE, parent, name, f) {} *************** *** 147,151 **** IT8SelectorWithFileDialog(QWidget* parent=0, const char* name=0, Qt::WFlags f=0) : ! BaseSelector(tr("IT8 Target"), "", "*.txt *.TXT *.IT8 *.it8 *.q60 *.Q60", FALSE, TRUE, parent, name, f) {} --- 147,151 ---- IT8SelectorWithFileDialog(QWidget* parent=0, const char* name=0, Qt::WFlags f=0) : ! BaseSelector(tr("IT8 Target"), QString::fromLocal8Bit(""), QString::fromLocal8Bit("*.txt *.TXT *.IT8 *.it8 *.q60 *.Q60"), FALSE, TRUE, parent, name, f) {} *************** *** 170,174 **** IT8FileSelector(QWidget* parent=0, const char* name=0, Qt::WFlags f=0) : ! BaseSelector(tr("IT8 target"), "", "*.*", TRUE, TRUE, parent, name, f) {} --- 170,174 ---- IT8FileSelector(QWidget* parent=0, const char* name=0, Qt::WFlags f=0) : ! BaseSelector(tr("IT8 target"), QString::fromLocal8Bit(""), QString::fromLocal8Bit("*.*"), TRUE, TRUE, parent, name, f) {} *************** *** 188,192 **** ICCProfileSelector(QWidget* parent=0, const char* name=0, Qt::WFlags f=0) : ! BaseSelector(tr("ICC Profile"), "", "*.icc *.icm *.ICC *.ICM", FALSE, TRUE, parent, name, f) { RestrictClass = -1; RestrictColorspace = -1;} --- 188,192 ---- ICCProfileSelector(QWidget* parent=0, const char* name=0, Qt::WFlags f=0) : ! BaseSelector(tr("ICC Profile"), QString::fromLocal8Bit(""), QString::fromLocal8Bit("*.icc *.icm *.ICC *.ICM"), FALSE, TRUE, parent, name, f) { RestrictClass = -1; RestrictColorspace = -1;} Index: qtcietonge.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/libqtlcmswidgets/qtcietonge.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** qtcietonge.cpp 19 Feb 2008 21:02:40 -0000 1.2 --- qtcietonge.cpp 6 Mar 2008 21:18:58 -0000 1.3 *************** *** 163,167 **** void cmsxCIETonge::BiasedText(QPainter &painter, int x, int y, const char* Txt) { ! painter.drawText(QPoint(xBias + x, y), Txt); } --- 163,167 ---- void cmsxCIETonge::BiasedText(QPainter &painter, int x, int y, const char* Txt) { ! painter.drawText(QPoint(xBias + x, y), QString::fromLocal8Bit(Txt)); } *************** *** 258,270 **** for (y = 1; y <= 9; y += 1) { ! char s[20]; int xstart = (y * (pxcols - 1)) / 10; int ystart = (y * (pxrows - 1)) / 10; ! sprintf(s, "0.%d", y); painter.drawLine(xstart + xBias, pxrows - Grids(1), xstart + xBias, pxrows - Grids(4)); painter.drawText(QPoint(xstart - Grids(11) + xBias, pxrows + Grids(15)), s); ! sprintf(s, "0.%d", 10 - y); painter.drawLine(xBias, ystart, Grids(3) + xBias, ystart); painter.drawText(QPoint(Grids(-25) + xBias, ystart + Grids(5)), s); --- 258,270 ---- for (y = 1; y <= 9; y += 1) { ! QString s; int xstart = (y * (pxcols - 1)) / 10; int ystart = (y * (pxrows - 1)) / 10; ! s.sprintf("0.%d", y); painter.drawLine(xstart + xBias, pxrows - Grids(1), xstart + xBias, pxrows - Grids(4)); painter.drawText(QPoint(xstart - Grids(11) + xBias, pxrows + Grids(15)), s); ! s.sprintf("0.%d", 10 - y); painter.drawLine(xBias, ystart, Grids(3) + xBias, ystart); painter.drawText(QPoint(Grids(-25) + xBias, ystart + Grids(5)), s); *************** *** 332,336 **** painter.setPen(Color); sprintf(wl, "%d", x/10); ! painter.drawText(QPoint(icx+bx + xBias, icy+by), wl); if (x == 4200) x = 4600; --- 332,336 ---- painter.setPen(Color); sprintf(wl, "%d", x/10); ! painter.drawText(QPoint(icx+bx + xBias, icy+by), QString::fromLocal8Bit(wl)); if (x == 4200) x = 4600; *************** *** 548,552 **** else if (firstTime) { ! QString file = "pcheckerbackgr.png"; if(backGround.save(file, "PNG", 100)) qDebug("it worked"); --- 548,552 ---- else if (firstTime) { ! QString file = QString::fromLocal8Bit("pcheckerbackgr.png"); if(backGround.save(file, "PNG", 100)) qDebug("it worked"); *************** *** 584,588 **** // backGround.load(QString("pcheckerbackgr.png")); ! backGround.load(QString(":/pcheckerbackgr.png")); firstTime=false; } --- 584,588 ---- // backGround.load(QString("pcheckerbackgr.png")); ! backGround.load(QString::fromLocal8Bit(":/pcheckerbackgr.png")); firstTime=false; } Index: qtlcmswidgets.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/libqtlcmswidgets/qtlcmswidgets.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** qtlcmswidgets.cpp 19 Feb 2008 21:02:40 -0000 1.41 --- qtlcmswidgets.cpp 6 Mar 2008 21:18:58 -0000 1.42 *************** *** 65,69 **** { QMessageBox mb( QTranslator::tr("Invalid ICC Profile."), ! QTranslator::tr(QString("Littlecms : ")) + (QString) ErrorText + QTranslator::tr(QString(" in file "))+ fName, QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, --- 65,69 ---- { QMessageBox mb( QTranslator::tr("Invalid ICC Profile."), ! QTranslator::tr("Littlecms : ") + QString::fromLocal8Bit(ErrorText) + QTranslator::tr(" in file ") + fName, QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, *************** *** 245,249 **** if ((*it).isReadable ()) { ! LCMSHANDLE hIT8 = cmsxIT8LoadFromFile((const char *) FileName.local8Bit()); if (hIT8) { --- 245,249 ---- if ((*it).isReadable ()) { ! LCMSHANDLE hIT8 = cmsxIT8LoadFromFile((const char *) FileName.toLocal8Bit()); if (hIT8) { *************** *** 255,289 **** Descriptor = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); ! Descriptions << Descriptor; } else { ! QString Serial = cmsxIT8GetProperty(hIT8, "SERIAL"); ! QString Manufacturer = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); if (Manufacturer == QString::null) ! Manufacturer = cmsxIT8GetProperty(hIT8, "MANUFACTURER"); if (Manufacturer == QString::null) ! Manufacturer = cmsxIT8GetProperty(hIT8, "MANUFACTURE"); ! QString Backing = cmsxIT8GetProperty(hIT8, "SAMPLE_BACKING"); if (Backing != QString::null) ! Backing = " " + Backing + " backing"; if (Serial != QString::null && Manufacturer != QString::null) { ! if (Manufacturer=="LProf Reference File Installer") { ! Manufacturer = cmsxIT8GetProperty(hIT8, "MANUFACTURER"); const char *Descriptor = cmsxIT8GetProperty(hIT8, "DESCRIPTOR"); ! Descriptions << (Serial + " " + Descriptor + " " + Manufacturer); } else ! Descriptions << (Serial + Backing + " " + Manufacturer); } else { const char *Descriptor = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); ! Descriptions << Descriptor; } } --- 255,289 ---- Descriptor = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); ! Descriptions << QString::fromLocal8Bit(Descriptor); } else { ! QString Serial = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "SERIAL")); ! QString Manufacturer = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "ORIGINATOR")); if (Manufacturer == QString::null) ! Manufacturer = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "MANUFACTURER")); if (Manufacturer == QString::null) ! Manufacturer = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "MANUFACTURE")); ! QString Backing = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "SAMPLE_BACKING")); if (Backing != QString::null) ! Backing = QString::fromLocal8Bit(" ") + Backing + QString::fromLocal8Bit(" backing"); if (Serial != QString::null && Manufacturer != QString::null) { ! if (Manufacturer == QString::fromLocal8Bit("LProf Reference File Installer")) { ! Manufacturer = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "MANUFACTURER")); const char *Descriptor = cmsxIT8GetProperty(hIT8, "DESCRIPTOR"); ! Descriptions << (Serial + QString::fromLocal8Bit(" ") + QString::fromLocal8Bit(Descriptor) + QString::fromLocal8Bit(" ") + Manufacturer); } else ! Descriptions << (Serial + Backing + QString::fromLocal8Bit(" ") + Manufacturer); } else { const char *Descriptor = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); ! Descriptions << QString::fromLocal8Bit(Descriptor); } } *************** *** 294,298 **** } else ! qDebug("failed to open reference file " + FileName); } else --- 294,298 ---- } else ! qDebug((QString::fromLocal8Bit("failed to open reference file ") + FileName).toLocal8Bit()); } else *************** *** 321,332 **** stream >> Description; ! if(Description == "HCT") { ! while (inString != "File") stream >> inString; stream >> inString; ! Description = Description + " " + inString; OK = TRUE; } --- 321,332 ---- stream >> Description; ! if(Description == QString::fromLocal8Bit("HCT")) { ! while (inString != QString::fromLocal8Bit("File")) stream >> inString; stream >> inString; ! Description = Description + QString::fromLocal8Bit(" ") + inString; OK = TRUE; } *************** *** 347,351 **** // Validation for Colorchecker and other LOGO targets. ! if (inString == "LGOROWLENGTH") { QString gmFilename; --- 347,351 ---- // Validation for Colorchecker and other LOGO targets. ! if (inString == QString::fromLocal8Bit("LGOROWLENGTH")) { QString gmFilename; *************** *** 353,364 **** QString gmDescription; ! startOfFileName = FileName.findRev("/", -1); gmFilename = FileName; gmFilename.remove(0, startOfFileName + 1); ! gmFilename.remove(gmFilename.findRev(".", -1), 4); while(!stream.atEnd()) { ! if (inString == "ILLUMINATION_NAME") { OK = TRUE; --- 353,364 ---- QString gmDescription; ! startOfFileName = FileName.findRev(QString::fromLocal8Bit("/"), -1); gmFilename = FileName; gmFilename.remove(0, startOfFileName + 1); ! gmFilename.remove(gmFilename.findRev(QString::fromLocal8Bit("."), -1), 4); while(!stream.atEnd()) { ! if (inString == QString::fromLocal8Bit("ILLUMINATION_NAME")) { OK = TRUE; *************** *** 376,383 **** // Description for Colorchecker files. ! if (gmFilename.left(7) == "CMP Dig") // DigitaL TargeT 003 ! Description = gmFilename + " " + inString; else ! Description = "GretagMacbeth " + gmFilename + " " + inString; } } --- 376,383 ---- // Description for Colorchecker files. ! if (gmFilename.left(7) == QString::fromLocal8Bit("CMP Dig")) // DigitaL TargeT 003 ! Description = gmFilename + QString::fromLocal8Bit(" ") + inString; else ! Description = QString::fromLocal8Bit("GretagMacbeth ") + gmFilename + QString::fromLocal8Bit(" ") + inString; } } *************** *** 398,404 **** // qDebug("IT8SelectorWithFileDialog::CGATS"); ! if (inString.left(5) == "IT8.7" || // IT8.7 type reference files. ! inString.left(4) == "CTI3" || // ArgyllCMS type reference files. ! inString.left(4) == "LCMS") // LProf generated reference file return TRUE; else --- 398,404 ---- // qDebug("IT8SelectorWithFileDialog::CGATS"); ! if (inString.left(5) == QString::fromLocal8Bit("IT8.7") || // IT8.7 type reference files. ! inString.left(4) == QString::fromLocal8Bit("CTI3") || // ArgyllCMS type reference files. ! inString.left(4) == QString::fromLocal8Bit("LCMS")) // LProf generated reference file return TRUE; else *************** *** 444,448 **** if ((*it).isReadable ()) { ! description = ""; if(HCT(FileName, description)) --- 444,448 ---- if ((*it).isReadable ()) { ! description = QString::fromLocal8Bit(""); if(HCT(FileName, description)) *************** *** 460,464 **** else if (CGATS(FileName)) { ! LCMSHANDLE hIT8 = cmsxIT8LoadFromFile((const char *) FileName.local8Bit()); if (hIT8) --- 460,464 ---- else if (CGATS(FileName)) { ! LCMSHANDLE hIT8 = cmsxIT8LoadFromFile((const char *) FileName.toLocal8Bit()); if (hIT8) *************** *** 471,491 **** Descriptor = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); ! Descriptions << Descriptor; } else { ! QString other = ""; ! QString Serial = cmsxIT8GetProperty(hIT8, "SERIAL"); ! QString Manufacturer = (QString) cmsxIT8GetProperty(hIT8, "ORIGINATOR") + " "; if (Manufacturer == QString::null) ! Manufacturer = (QString) cmsxIT8GetProperty(hIT8, "MANUFACTURE") + " "; ! QString Backing = cmsxIT8GetProperty(hIT8, "SAMPLE_BACKING"); if (Backing != QString::null) ! Backing = " " + Backing + " backing "; ! QString temp = cmsxIT8GetProperty(hIT8, "DESCRIPTOR"); ! if (temp.find("(") > -1 && temp.findRev(")") == temp.length() - 1) ! other = " " + temp.mid(temp.find("(") + 1, temp.length() - temp.find("(") - 2) + " "; ! QString numFields = " Number of Fields " + (QString) cmsxIT8GetProperty(hIT8, "NUMBER_OF_FIELDS"); if (Serial != QString::null && Manufacturer != QString::null) --- 471,491 ---- Descriptor = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); ! Descriptions << QString::fromLocal8Bit(Descriptor); } else { ! QString other = QString::fromLocal8Bit(""); ! QString Serial = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "SERIAL")); ! QString Manufacturer = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "ORIGINATOR")) + QString::fromLocal8Bit(" "); if (Manufacturer == QString::null) ! Manufacturer = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "MANUFACTURE")) + QString::fromLocal8Bit(" "); ! QString Backing = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "SAMPLE_BACKING")); if (Backing != QString::null) ! Backing = QString::fromLocal8Bit(" ") + Backing + QString::fromLocal8Bit(" backing "); ! QString temp = QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "DESCRIPTOR")); ! if (temp.find(QString::fromLocal8Bit("(")) > -1 && temp.findRev(QString::fromLocal8Bit(")")) == temp.length() - 1) ! other = QString::fromLocal8Bit(" ") + temp.mid(temp.find(QString::fromLocal8Bit("(")) + 1, temp.length() - temp.find(QString::fromLocal8Bit("(")) - 2) + QString::fromLocal8Bit(" "); ! QString numFields = QString::fromLocal8Bit(" Number of Fields ") + QString::fromLocal8Bit(cmsxIT8GetProperty(hIT8, "NUMBER_OF_FIELDS")); if (Serial != QString::null && Manufacturer != QString::null) *************** *** 494,498 **** { const char *Descriptor = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); ! Descriptions << Descriptor; } } --- 494,498 ---- { const char *Descriptor = cmsxIT8GetProperty(hIT8, "ORIGINATOR"); ! Descriptions << QString::fromLocal8Bit(Descriptor); } } *************** *** 503,507 **** } else ! qDebug("failed to open reference file " + FileName); } } --- 503,507 ---- } else ! qDebug((QString::fromLocal8Bit("failed to open reference file ") + FileName).toLocal8Bit()); } } *************** *** 580,584 **** if ((*it).isReadable ()) { ! hICM = cmsOpenProfileFromFile((const char *) FileName.local8Bit(), "r"); if (hICM) { --- 580,584 ---- if ((*it).isReadable ()) { ! hICM = cmsOpenProfileFromFile((const char *) FileName.toLocal8Bit(), "r"); if (hICM) { *************** *** 592,596 **** if (strlen(Descriptor) > 0) // egnore bad profiles { ! Descriptions << Descriptor; FileNames << FileName; } --- 592,596 ---- if (strlen(Descriptor) > 0) // egnore bad profiles { ! Descriptions << QString::fromLocal8Bit(Descriptor); FileNames << FileName; } *************** *** 850,854 **** } ! Report += "</font></qt>"; } --- 850,854 ---- } ! Report += QString::fromLocal8Bit("</font></qt>"); } *************** *** 1023,1027 **** ResultsGrid -> setNumCols(11); ! Horizontal -> setLabel(0, ""); Horizontal -> setLabel(1, QTranslator::tr("CIE La*b* dE")); Horizontal -> setLabel(2, QTranslator::tr("Target error")); --- 1023,1027 ---- ResultsGrid -> setNumCols(11); ! Horizontal -> setLabel(0, QString::fromLocal8Bit("")); Horizontal -> setLabel(1, QTranslator::tr("CIE La*b* dE")); Horizontal -> setLabel(2, QTranslator::tr("Target error")); *************** *** 1220,1224 **** if (dH < 0) ! Text.sprintf(QTranslator::tr("(achromatic)")); else Text.sprintf(" %3.0f° (%2.2f%%) ", dH, (dH * 100. / 180.)); --- 1220,1224 ---- if (dH < 0) ! Text = QTranslator::tr("(achromatic)"); else Text.sprintf(" %3.0f° (%2.2f%%) ", dH, (dH * 100. / 180.)); *************** *** 1253,1260 **** ! QString Title = p ->Name; if (dE > 10) ! Title = "** " + Title; Vertical -> setLabel( i, Title); --- 1253,1260 ---- ! QString Title = QString::fromLocal8Bit(p -> Name); if (dE > 10) ! Title = QString::fromLocal8Bit("** ") + Title; Vertical -> setLabel( i, Title); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:03
|
Update of /cvsroot/lprof/lprof/src/gammaqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/gammaqt Modified Files: setgamma.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: setgamma.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/gammaqt/setgamma.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** setgamma.cpp 19 Feb 2008 21:02:27 -0000 1.27 --- setgamma.cpp 6 Mar 2008 21:18:58 -0000 1.28 *************** *** 82,90 **** QObject::connect(buttonHelp, SIGNAL(clicked()), this, SLOT(slotHelpButton())); ! smallChart.load(":src/images/Norman_Koren-small.png"); ! smallChartCorrected.load(":src/images/Norman_Koren-small.png"); ! bigChart.load(":src/images/Norman_Koren-big.png"); ! bigChartCorrected.load(":src/images/Norman_Koren-big.png"); mongamma.get(&mongamma); --- 82,90 ---- QObject::connect(buttonHelp, SIGNAL(clicked()), this, SLOT(slotHelpButton())); ! smallChart.load(QString::fromLocal8Bit(":src/images/Norman_Koren-small.png")); ! smallChartCorrected.load(QString::fromLocal8Bit(":src/images/Norman_Koren-small.png")); ! bigChart.load(QString::fromLocal8Bit(":src/images/Norman_Koren-big.png")); ! bigChartCorrected.load(QString::fromLocal8Bit(":src/images/Norman_Koren-big.png")); mongamma.get(&mongamma); *************** *** 360,365 **** void SetGamma::slotHelpButton() { ! QString path = get_global_help_path()->local8Bit() + "/help/gamma.html"; ! qDebug(path); getHelp()->openAssistant (); getHelp()->showPage(path); --- 360,365 ---- void SetGamma::slotHelpButton() { ! QString path = get_global_help_path() + QString::fromLocal8Bit("/help/gamma.html"); ! qDebug(path.toLocal8Bit()); getHelp()->openAssistant (); getHelp()->showPage(path); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:03
|
Update of /cvsroot/lprof/lprof/src/IDqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/IDqt Modified Files: profileid.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: profileid.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/IDqt/profileid.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** profileid.cpp 19 Feb 2008 21:02:10 -0000 1.18 --- profileid.cpp 6 Mar 2008 21:18:58 -0000 1.19 *************** *** 66,74 **** // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return (QString) getenv(qtdir); } ProfileID::ProfileID( QWidget *parent) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax ) { setupUi(this); --- 66,74 ---- // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return QString::fromLocal8Bit(getenv(qtdir)); } ProfileID::ProfileID( QWidget *parent) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title) { setupUi(this); *************** *** 94,107 **** { case 0: ! OutputFileEdit -> setText(sys.hdr.OutputProfileFile); break; case 1: ! OutputFileEdit -> setText(sys.hdr.mon_profile_file_name); break; } ! ManufacturerEdit->setText(sys.hdr.Manufacturer); ! ModelEdit -> setText(sys.hdr.Model); ! CopyrightEdit -> setText(sys.hdr.Copyright); ! DescriptionEdit -> setText(sys.hdr.Description); // CommentsEdit->setText(sys.hdr.Comments); } --- 94,107 ---- { case 0: ! OutputFileEdit -> setText(QString::fromLocal8Bit(sys.hdr.OutputProfileFile)); break; case 1: ! OutputFileEdit -> setText(QString::fromLocal8Bit(sys.hdr.mon_profile_file_name)); break; } ! ManufacturerEdit->setText(QString::fromLocal8Bit(sys.hdr.Manufacturer)); ! ModelEdit -> setText(QString::fromLocal8Bit(sys.hdr.Model)); ! CopyrightEdit -> setText(QString::fromLocal8Bit(sys.hdr.Copyright)); ! DescriptionEdit -> setText(QString::fromLocal8Bit(sys.hdr.Description)); // CommentsEdit->setText(sys.hdr.Comments); } *************** *** 125,140 **** if (fileNameOK && descriptionOK) { ! strcpy(sys.hdr.Manufacturer, ManufacturerEdit->text().local8Bit()); ! strcpy(sys.hdr.Model, ModelEdit -> text().local8Bit()); ! strcpy(sys.hdr.Copyright, CopyrightEdit -> text().local8Bit()); ! strcpy(sys.hdr.Description, DescriptionEdit -> text().local8Bit()); switch (sys.hdr.ProfilerTab) { case 0: ! strcpy(sys.hdr.OutputProfileFile, OutputFileEdit -> text().local8Bit()); break; case 1: ! strcpy(sys.hdr.mon_profile_file_name, OutputFileEdit -> text().local8Bit()); break; default: ; --- 125,140 ---- if (fileNameOK && descriptionOK) { ! strcpy(sys.hdr.Manufacturer, ManufacturerEdit->text().toLocal8Bit()); ! strcpy(sys.hdr.Model, ModelEdit -> text().toLocal8Bit()); ! strcpy(sys.hdr.Copyright, CopyrightEdit -> text().toLocal8Bit()); ! strcpy(sys.hdr.Description, DescriptionEdit -> text().toLocal8Bit()); switch (sys.hdr.ProfilerTab) { case 0: ! strcpy(sys.hdr.OutputProfileFile, OutputFileEdit -> text().toLocal8Bit()); break; case 1: ! strcpy(sys.hdr.mon_profile_file_name, OutputFileEdit -> text().toLocal8Bit()); break; default: ; *************** *** 149,153 **** void ProfileID::slotHelpButton() { ! QString path = get_global_help_path()->local8Bit() + "/help/profile-id.html"; // qDebug(path); getHelp()->openAssistant (); --- 149,153 ---- void ProfileID::slotHelpButton() { ! QString path = get_global_help_path() + QString::fromLocal8Bit("/help/profile-id.html"); // qDebug(path); getHelp()->openAssistant (); *************** *** 164,170 **** QString fn = Q3FileDialog::getSaveFileName( outprofile, ! tr(QString("icc profiles (*.icc *.icm)\nAll files (*.*)")), ! this, "", ! tr(QString("Select output profile filename"))); if (fn != QString::null) { --- 164,171 ---- QString fn = Q3FileDialog::getSaveFileName( outprofile, ! tr("icc profiles (*.icc *.icm)\nAll files (*.*)"), ! this, ! "", ! tr("Select output profile filename")); if (fn != QString::null) { *************** *** 233,239 **** #ifdef __WIN32__ ! pos = fn.findRev('\\', -1, FALSE); #else ! pos = fn.findRev('/', -1, FALSE); #endif --- 234,240 ---- #ifdef __WIN32__ ! pos = fn.findRev(QString::fromLocal8Bit("\\"), -1, FALSE); #else ! pos = fn.findRev(QString::fromLocal8Bit("/"), -1, FALSE); #endif *************** *** 244,248 **** // but we should not allow writing to root // in any case ! if (fn.left(1) == "/" && pos < 1) fileNameOK = FALSE; else --- 245,249 ---- // but we should not allow writing to root // in any case ! if (fn.left(1) == QString::fromLocal8Bit("/") && pos < 1) fileNameOK = FALSE; else *************** *** 269,280 **** { // check to make sure extension is some form of .icm or .icc ! if ((fn.findRev(".i") == fn.length() - 4 || ! fn.findRev(".I") == fn.length() - 4) && // .i or ,I && ! (fn.findRev("C", -2 ) == fn.length() - 2 || ! fn.findRev("c", -2 ) == fn.length() - 2) && // c or C && ! ((fn.findRev("C" ) == fn.length() - 1 || ! fn.findRev("c") == fn.length() - 1) || // c or C ! (fn.findRev("M" ) == fn.length() - 1 || ! fn.findRev("m" ) == fn.length() - 1 ))) // or m or M { // the directory and extension are OK --- 270,281 ---- { // check to make sure extension is some form of .icm or .icc ! if ((fn.findRev(QString::fromLocal8Bit(".i")) == fn.length() - 4 || ! fn.findRev(QString::fromLocal8Bit(".I")) == fn.length() - 4) && // .i or ,I && ! (fn.findRev(QString::fromLocal8Bit("C"), -2 ) == fn.length() - 2 || ! fn.findRev(QString::fromLocal8Bit("c"), -2 ) == fn.length() - 2) && // c or C && ! ((fn.findRev(QString::fromLocal8Bit("C")) == fn.length() - 1 || ! fn.findRev(QString::fromLocal8Bit("c")) == fn.length() - 1) || // c or C ! (fn.findRev(QString::fromLocal8Bit("M")) == fn.length() - 1 || ! fn.findRev(QString::fromLocal8Bit("m")) == fn.length() - 1 ))) // or m or M { // the directory and extension are OK *************** *** 284,288 **** { // direcotry OK but extesion is not ! if (fn.find('.', pos) > -1) // There is an extension so this is a user error that we can not fix { // not really OK but we don't want to clobber the user entered file name --- 285,289 ---- { // direcotry OK but extesion is not ! if (fn.find(QString::fromLocal8Bit("."), pos) > -1) // There is an extension so this is a user error that we can not fix { // not really OK but we don't want to clobber the user entered file name *************** *** 295,299 **** { // No extesion add it ! fn = fn + ".icc"; fileNameOK = TRUE; } --- 296,300 ---- { // No extesion add it ! fn = fn + QString::fromLocal8Bit(".icc"); fileNameOK = TRUE; } *************** *** 310,314 **** // qDebug("checkDescription"); ! if (DescriptionEdit->text().left(14) == QString("no description")) { QMessageBox mb( QTranslator::tr("Description is System Default"), --- 311,315 ---- // qDebug("checkDescription"); ! if (DescriptionEdit->text().left(14) == QString::fromLocal8Bit("no description")) { QMessageBox mb( QTranslator::tr("Description is System Default"), |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:03
|
Update of /cvsroot/lprof/lprof/src/monqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/monqt Modified Files: monitorvalues.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: monitorvalues.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/monqt/monitorvalues.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** monitorvalues.cpp 19 Feb 2008 21:02:50 -0000 1.26 --- monitorvalues.cpp 6 Mar 2008 21:18:59 -0000 1.27 *************** *** 138,142 **** static char Buffer[128]; ::sprintf(Buffer, "%g", b); ! return (QString) Buffer; } --- 138,142 ---- static char Buffer[128]; ::sprintf(Buffer, "%g", b); ! return QString::fromLocal8Bit(Buffer); } *************** *** 145,153 **** // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return (QString) getenv(qtdir); } MonitorValues::MonitorValues(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax ) { setupUi(this); --- 145,153 ---- // qDebug("get_home_dir"); const char* qtdir= "QTDIR"; ! return QString::fromLocal8Bit(getenv(qtdir)); } MonitorValues::MonitorValues(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title) { setupUi(this); *************** *** 187,191 **** for (i=0; i < NPRIMARIES; i++) { ! ComboPrimaries -> insertItem(tr(PrimTable[i].Name)); } --- 187,191 ---- for (i=0; i < NPRIMARIES; i++) { ! ComboPrimaries -> insertItem(tr(PrimTable[i].Name.toLocal8Bit())); } *************** *** 206,210 **** ComboBoxWP -> clear(); for (i=0; i < NWHITES; i++) ! ComboBoxWP -> insertItem(tr(WhitePoints[i].Name)); ComboBoxWP-> setCurrentItem(mon.items.wppos); --- 206,210 ---- ComboBoxWP -> clear(); for (i=0; i < NWHITES; i++) ! ComboBoxWP -> insertItem(tr(WhitePoints[i].Name.toLocal8Bit())); ComboBoxWP-> setCurrentItem(mon.items.wppos); *************** *** 355,360 **** if (d -> height() < 768) { ! QMessageBox mb( QTranslator::tr((QString)"Display device too small"), ! QTranslator::tr((QString)"Your screen does not have enough " "resolution to display the gamma " "setting dialog. You need at least " --- 355,360 ---- if (d -> height() < 768) { ! QMessageBox mb( QTranslator::tr("Display device too small"), ! QTranslator::tr("Your screen does not have enough " "resolution to display the gamma " "setting dialog. You need at least " *************** *** 388,393 **** void MonitorValues::slotHelpButton() { ! QString path = get_global_help_path()->local8Bit() + "/mon-val.html"; ! qDebug(path); getHelp()->openAssistant (); getHelp()->showPage(path); --- 388,393 ---- void MonitorValues::slotHelpButton() { ! QString path = get_global_help_path() + QString::fromLocal8Bit("/mon-val.html"); ! qDebug(path.toLocal8Bit()); getHelp()->openAssistant (); getHelp()->showPage(path); |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:02
|
Update of /cvsroot/lprof/lprof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815 Modified Files: SConstruct Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: SConstruct =================================================================== RCS file: /cvsroot/lprof/lprof/SConstruct,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** SConstruct 27 Feb 2008 18:35:23 -0000 1.125 --- SConstruct 6 Mar 2008 21:18:58 -0000 1.126 *************** *** 43,47 **** opts.Add(PathOption('PREFIX', 'Directory to install under', os.path.normpath('/usr/local'))) opts.Add('ccflags', 'Flags to be passed to c compiler.', '-O3 -Wall -pipe -D_FORTIFY_SOURCE=0') ! opts.Add('cxxflags', 'Flags to be passed to c++ compiler.', '-O3 -Wall -pipe') opts.Add('ldflags', 'Stuff to be added to LDFLAGS. If more than one item is being added use space btween items. Enclose multipule items in quotes.', '') opts.Add('added_cppflags', 'List of flags and/or directories to be added to CPPPATH. If more than one item is being added use space btween items. Enclose multipule items in quotes.', '') --- 43,47 ---- opts.Add(PathOption('PREFIX', 'Directory to install under', os.path.normpath('/usr/local'))) opts.Add('ccflags', 'Flags to be passed to c compiler.', '-O3 -Wall -pipe -D_FORTIFY_SOURCE=0') ! opts.Add('cxxflags', 'Flags to be passed to c++ compiler.', '-O3 -Wall -pipe -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII') opts.Add('ldflags', 'Stuff to be added to LDFLAGS. If more than one item is being added use space btween items. Enclose multipule items in quotes.', '') opts.Add('added_cppflags', 'List of flags and/or directories to be added to CPPPATH. If more than one item is being added use space btween items. Enclose multipule items in quotes.', '') |
|
From: Hal E. <hv...@us...> - 2008-03-06 21:19:02
|
Update of /cvsroot/lprof/lprof/src/checkerqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5815/src/checkerqt Modified Files: profilechecker.cpp qtdrawcurve.cpp Log Message: Add -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII to the default build settings to prevent ambiguous handling of character strings. Fixed all code to compile with these settings. Add Qt::WStyle_Title to all constructors for windows and dialogs that are not full screen dialogs to make sure all window managers display a title. Index: qtdrawcurve.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/checkerqt/qtdrawcurve.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** qtdrawcurve.cpp 19 Feb 2008 21:02:27 -0000 1.5 --- qtdrawcurve.cpp 6 Mar 2008 21:18:58 -0000 1.6 *************** *** 68,72 **** sprintf(Buffer, "%s [%d]", Label, n); ! Pnt.drawText(QPoint(22, y), Buffer); QPainterPath pp; --- 68,72 ---- sprintf(Buffer, "%s [%d]", Label, n); ! Pnt.drawText(QPoint(22, y), QString::fromLocal8Bit(Buffer)); QPainterPath pp; Index: profilechecker.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/checkerqt/profilechecker.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** profilechecker.cpp 19 Feb 2008 21:02:27 -0000 1.47 --- profilechecker.cpp 6 Mar 2008 21:18:58 -0000 1.48 *************** *** 101,105 **** } ! strcpy(OutputProfileFile,OutputFileEdit -> text().local8Bit()); cmsHPROFILE hProfile = cmsOpenProfileFromFile(OutputProfileFile, "r"); if (cmsGetDeviceClass(hProfile) == icSigDisplayClass) --- 101,105 ---- } ! strcpy(OutputProfileFile,OutputFileEdit -> text().toLocal8Bit()); cmsHPROFILE hProfile = cmsOpenProfileFromFile(OutputProfileFile, "r"); if (cmsGetDeviceClass(hProfile) == icSigDisplayClass) *************** *** 115,119 **** ProfileChecker::ProfileChecker(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax ), Checker(0) { --- 115,119 ---- ProfileChecker::ProfileChecker(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title), Checker(0) { *************** *** 152,159 **** ComboBoxIntent -> clear(); ! ComboBoxIntent -> insertItem("(*) " + tr((QString)"Perceptual")); ! ComboBoxIntent -> insertItem("(*) " + tr((QString)"Relative colorimetric")); ! ComboBoxIntent -> insertItem("(*) " + tr((QString)"Saturation")); ! ComboBoxIntent -> insertItem("(*) " + tr((QString)"Absolute")); /* TRANSLATOR White point text for Profile Checker information screen */ --- 152,159 ---- ComboBoxIntent -> clear(); ! ComboBoxIntent -> insertItem(QString::fromLocal8Bit("(*) ") + tr("Perceptual")); ! ComboBoxIntent -> insertItem(QString::fromLocal8Bit("(*) ") + tr("Relative colorimetric")); ! ComboBoxIntent -> insertItem(QString::fromLocal8Bit("(*) ") + tr("Saturation")); ! ComboBoxIntent -> insertItem(QString::fromLocal8Bit("(*) ") + tr("Absolute")); /* TRANSLATOR White point text for Profile Checker information screen */ *************** *** 303,314 **** int AsInput, AsOutput; ! const QString Intents[4] = {"Perceptual", "Relative colorimetric", "Saturation", "Absolute" }; // none, input only, output only, full ! const QString Mode[4] = {"(*) ", "(i) ", "(o) ", "" }; AsInput = cmsIsIntentSupported(hProfile, nIntent, LCMS_USED_AS_INPUT) ? 1 : 0; AsOutput = cmsIsIntentSupported(hProfile, nIntent, LCMS_USED_AS_OUTPUT) ? 2 : 0; ! Buffer = Mode[AsInput + AsOutput] + QTranslator::tr(Intents[nIntent]); return Buffer; --- 303,314 ---- int AsInput, AsOutput; ! const QString Intents[4] = {QString::fromLocal8Bit("Perceptual"), QString::fromLocal8Bit("Relative colorimetric"), QString::fromLocal8Bit("Saturation"), QString::fromLocal8Bit("Absolute")}; // none, input only, output only, full ! const QString Mode[4] = {QString::fromLocal8Bit("(*) "), QString::fromLocal8Bit("(i) "), QString::fromLocal8Bit("(o) "), QString::fromLocal8Bit("" )}; AsInput = cmsIsIntentSupported(hProfile, nIntent, LCMS_USED_AS_INPUT) ? 1 : 0; AsOutput = cmsIsIntentSupported(hProfile, nIntent, LCMS_USED_AS_OUTPUT) ? 2 : 0; ! Buffer = Mode[AsInput + AsOutput] + QTranslator::tr(Intents[nIntent].toLocal8Bit()); return Buffer; *************** *** 342,347 **** if (MonitorProfileSelector ->getFilename().length() == 0 ) { ! QMessageBox mb( tr(mess1), ! tr(mess2), QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, --- 342,347 ---- if (MonitorProfileSelector ->getFilename().length() == 0 ) { ! QMessageBox mb( mess1, ! mess2, QMessageBox::Critical, QMessageBox::Ok | QMessageBox::Default, *************** *** 367,380 **** return; } ! strcpy(OutputProfileFile,OutputFileEdit -> text().local8Bit()); // Maybe some reference sheet QString cTarget = TargetsSelector -> getFilename(); if (cTarget != QString::null) ! strcpy(ReferenceSheet, (const char*) cTarget.local8Bit()); // And measurement sheet QString cScanout = Scanout -> text(); if (cScanout != QString::null) ! strcpy(MeasurementSheet, (const char *) cScanout.local8Bit()); ! if (!QFile::exists(MeasurementSheet)) { QMessageBox mb( tr("Measurement sheet file name is not valid."), --- 367,380 ---- return; } ! strcpy(OutputProfileFile,OutputFileEdit -> text().toLocal8Bit()); // Maybe some reference sheet QString cTarget = TargetsSelector -> getFilename(); if (cTarget != QString::null) ! strcpy(ReferenceSheet, cTarget.toLocal8Bit()); // And measurement sheet QString cScanout = Scanout -> text(); if (cScanout != QString::null) ! strcpy(MeasurementSheet, cScanout.toLocal8Bit()); ! if (!QFile::exists(QString::fromLocal8Bit(MeasurementSheet))) { QMessageBox mb( tr("Measurement sheet file name is not valid."), *************** *** 393,397 **** strcpy(ReferenceSheet, ""); } ! else if (!QFile::exists(ReferenceSheet)) { QMessageBox mb( tr("Reference sheet file name is not valid."), --- 393,397 ---- strcpy(ReferenceSheet, ""); } ! else if (!QFile::exists(QString::fromLocal8Bit(ReferenceSheet))) { QMessageBox mb( tr("Reference sheet file name is not valid."), *************** *** 407,411 **** ProfileColorSpace = cmsGetColorSpace(hProfile); ! InfoView -> setText((QString) QTranslator::tr("\nProfile: ") + cmsTakeProductName(hProfile)); // InfoView -> append((QString) "\n" + cmsTakeProductInfo(hProfile)); if (cmsIsTag(hProfile, icSigProfileDescriptionTag)) --- 407,411 ---- ProfileColorSpace = cmsGetColorSpace(hProfile); ! InfoView -> setText(QTranslator::tr("\nProfile: ") + QString::fromLocal8Bit(cmsTakeProductName(hProfile))); // InfoView -> append((QString) "\n" + cmsTakeProductInfo(hProfile)); if (cmsIsTag(hProfile, icSigProfileDescriptionTag)) *************** *** 413,417 **** cmsReadICCText(hProfile, icSigProfileDescriptionTag, Desc); strcat(Desc, "\r\n\r\n"); ! InfoView -> append((QString) "\n" + (QString) Desc); } --- 413,417 ---- cmsReadICCText(hProfile, icSigProfileDescriptionTag, Desc); strcat(Desc, "\r\n\r\n"); ! InfoView -> append(QString::fromLocal8Bit("\n") + QString::fromLocal8Bit(Desc)); } *************** *** 420,424 **** cmsReadICCText(hProfile, icSigCopyrightTag, Copyright); strcat(Copyright, "\r\n\r\n"); ! InfoView -> append((QString) Copyright); } // KODAK private tag... But very useful --- 420,424 ---- cmsReadICCText(hProfile, icSigCopyrightTag, Copyright); strcat(Copyright, "\r\n\r\n"); ! InfoView -> append(QString::fromLocal8Bit(Copyright)); } // KODAK private tag... But very useful *************** *** 431,435 **** cmsReadICCText(hProfile, K007, MonCal); strcat(MonCal, "\r\n\r\n"); ! InfoView -> append((QString) MonCal); } else --- 431,435 ---- cmsReadICCText(hProfile, K007, MonCal); strcat(MonCal, "\r\n\r\n"); ! InfoView -> append(QString::fromLocal8Bit(MonCal)); } else *************** *** 445,449 **** strcpy(temp2, strtok(WhiteStr, ":")); strcpy(temp2, strtok(NULL, "\0")); ! buffer = buffer + QString(temp2); } --- 445,449 ---- strcpy(temp2, strtok(WhiteStr, ":")); strcpy(temp2, strtok(NULL, "\0")); ! buffer = buffer + QString::fromLocal8Bit(temp2); } *************** *** 468,472 **** strcat(temp2, ")"); } ! buffer = buffer + QString(temp2); } InfoView -> append(buffer); --- 468,472 ---- strcat(temp2, ")"); } ! buffer = buffer + QString::fromLocal8Bit(temp2); } InfoView -> append(buffer); *************** *** 481,485 **** buffer = tr("\nMedia white (XYZ):") + ! buffer.sprintf((QString)" %3.2f, %3.2f, %3.2f", MediaWhite.X*100., MediaWhite.Y*100., MediaWhite.Z*100.); InfoView -> append(buffer); --- 481,485 ---- buffer = tr("\nMedia white (XYZ):") + ! buffer.sprintf(" %3.2f, %3.2f, %3.2f", MediaWhite.X*100., MediaWhite.Y*100., MediaWhite.Z*100.); InfoView -> append(buffer); *************** *** 513,517 **** // ScaleToWhite(&MediaWhite, &tmp); cmsXYZ2xyY(&Primaries.Blue, &tmp); ! buffer = tr("Primaries:") + buffer.sprintf((QString)" R:%1.2g, %1.2g G:%1.2g, %1.2g B:%1.2g, %1.2g", Primaries.Red.x, Primaries.Red.y, Primaries.Green.x, Primaries.Green.y, --- 513,517 ---- // ScaleToWhite(&MediaWhite, &tmp); cmsXYZ2xyY(&Primaries.Blue, &tmp); ! buffer = tr("Primaries:") + buffer.sprintf(" R:%1.2g, %1.2g G:%1.2g, %1.2g B:%1.2g, %1.2g", Primaries.Red.x, Primaries.Red.y, Primaries.Green.x, Primaries.Green.y, *************** *** 538,542 **** if (gr > 0 && gg > 0 && gb > 0) { ! buffer = tr("Estimated gamma:") + buffer.sprintf((QString)" R:%1.3g, G:%1.3g B:%1.3g", gr, gg, gb); InfoView -> append(buffer); } --- 538,542 ---- if (gr > 0 && gg > 0 && gb > 0) { ! buffer = tr("Estimated gamma:") + buffer.sprintf(" R:%1.3g, G:%1.3g B:%1.3g", gr, gg, gb); InfoView -> append(buffer); } *************** *** 620,624 **** &m, OutputProfileFile, ! MonitorProfileSelector->getFilename().local8Bit()); ResultsResume -> setText(Results); TabProfiler -> setTabEnabled(ResultsTab, TRUE); --- 620,624 ---- &m, OutputProfileFile, ! MonitorProfileSelector->getFilename().toLocal8Bit()); ResultsResume -> setText(Results); TabProfiler -> setTabEnabled(ResultsTab, TRUE); *************** *** 790,794 **** void ProfileChecker::RedrawTonge() { ! char buff[128]; // qDebug("RedrawTonge"); if (TabProfiler -> currentPage() != DiagramTab) return; --- 790,794 ---- void ProfileChecker::RedrawTonge() { ! // char buff[128]; // qDebug("RedrawTonge"); if (TabProfiler -> currentPage() != DiagramTab) return; *************** *** 842,846 **** { ! QString fn = Q3FileDialog::getOpenFileName( "", QTranslator::tr("IT8/CGATS.5 Files (*.it? *.cgt)\nAll files (*.*)"), this, --- 842,846 ---- { ! QString fn = Q3FileDialog::getOpenFileName( QString::fromLocal8Bit(""), QTranslator::tr("IT8/CGATS.5 Files (*.it? *.cgt)\nAll files (*.*)"), this, *************** *** 881,886 **** void ProfileChecker::slotHelpButton() { ! QString path = get_global_help_path()->local8Bit() + "/checker.html"; ! qDebug(path); getHelp()->openAssistant (); getHelp()->showPage(path); --- 881,886 ---- void ProfileChecker::slotHelpButton() { ! QString path = get_global_help_path() + QString::fromLocal8Bit("/checker.html"); ! qDebug(path.toLocal8Bit()); getHelp()->openAssistant (); getHelp()->showPage(path); |
|
From: Hal E. <hv...@us...> - 2008-03-02 01:10:20
|
Update of /cvsroot/lprof/lprof/src/moncalqt In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11203 Modified Files: monitorcal.cpp Log Message: Use QString::fromAscii() to convert Argyll generated error messages to QStrings. Index: monitorcal.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalqt/monitorcal.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** monitorcal.cpp 1 Mar 2008 23:05:31 -0000 1.59 --- monitorcal.cpp 2 Mar 2008 01:10:14 -0000 1.60 *************** *** 4071,4075 **** message = tr((QString) "Calibration Complete."); if (calibrationCondition == inst_calc_message) ! message = (QString)id; done = true; instrumentCode = inst_ok; --- 4071,4075 ---- message = tr((QString) "Calibration Complete."); if (calibrationCondition == inst_calc_message) ! message = QString::fromAscii(id); done = true; instrumentCode = inst_ok; *************** *** 4091,4096 **** heading = tr((QString) "Calibration Failed"); message = tr((QString)"Calibration failed with ") + ! QString(deviceToCalibrate->inst_interp_error(deviceToCalibrate, instrumentCode)) + " " + ! QString(deviceToCalibrate->interp_error(deviceToCalibrate, instrumentCode)) + tr((QString)" Click OK to retry and Abort to stop calibarion."); userMessage = true; --- 4091,4096 ---- heading = tr((QString) "Calibration Failed"); message = tr((QString)"Calibration failed with ") + ! QString::fromAscii(deviceToCalibrate->inst_interp_error(deviceToCalibrate, instrumentCode)) + " " + ! QString::fromAscii(deviceToCalibrate->interp_error(deviceToCalibrate, instrumentCode)) + tr((QString)" Click OK to retry and Abort to stop calibarion."); userMessage = true; *************** *** 4128,4132 **** heading = tr((QString) "Reflective White Calibration Needed"); message = tr((QString)"Place the instrument on its reflective white reference ") ! + (QString) id + tr((QString)" and then click OK to continue or Abort to stop calibration."); break; --- 4128,4132 ---- heading = tr((QString) "Reflective White Calibration Needed"); message = tr((QString)"Place the instrument on its reflective white reference ") ! + QString::fromAscii(id) + tr((QString)" and then click OK to continue or Abort to stop calibration."); break; *************** *** 4137,4141 **** heading = tr((QString) "Reflective White Calibration Needed"); message = tr((QString)"Place the instrument on its reflective white reference ") ! + (QString) id + tr((QString) "then click Ok to continue, or Abort to stop calibration."); break; --- 4137,4141 ---- heading = tr((QString) "Reflective White Calibration Needed"); message = tr((QString)"Place the instrument on its reflective white reference ") ! + QString::fromAscii(id) + tr((QString) "then click Ok to continue, or Abort to stop calibration."); break; *************** *** 4173,4177 **** disp = false; heading = tr((QString) "Filter Change Needed"); ! message = tr((QString)"Change filter on instrument to ") + (QString) id + tr((QString)" and then click Ok to continue, or Abort to stop calibration."); break; --- 4173,4177 ---- disp = false; heading = tr((QString) "Filter Change Needed"); ! message = tr((QString)"Change filter on instrument to ") + QString::fromAscii(id) + tr((QString)" and then click Ok to continue, or Abort to stop calibration."); break; *************** *** 4180,4184 **** disp = false; message = tr((QString)"Click Ok to continue, or Abort to stop calibration."); ! heading = QString(id); break; --- 4180,4184 ---- disp = false; message = tr((QString)"Click Ok to continue, or Abort to stop calibration."); ! heading = QString::fromAscii(id); break; *************** *** 4325,4329 **** if ((ct = icx_XYZ2ill_ct(ct_xyz, plank != 0 ? icxIT_Ptemp : icxIT_Dtemp, icxOT_CIE_1931_2, NULL, xyz, NULL, dovct)) < 0) ! error ("Got bad color temperature conversion\n"); if (de != NULL) --- 4325,4329 ---- if ((ct = icx_XYZ2ill_ct(ct_xyz, plank != 0 ? icxIT_Ptemp : icxIT_Dtemp, icxOT_CIE_1931_2, NULL, xyz, NULL, dovct)) < 0) ! qDebug ("Got bad color temperature conversion\n"); if (de != NULL) *************** *** 4478,4486 **** // qDebug("initIntrument(): failed init_coms()"); messageText -> insertParagraph(tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") ! + (QString) it->inst_interp_error(it, rv) + " + " ! + (QString) it->inst_interp_error(it, rv) + ")", -1); QMessageBox::critical(this, QTranslator::tr("Failed to Initialize the Device"), tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") ! + (QString) it->inst_interp_error(it, rv) + ")"); return notOK; } --- 4478,4486 ---- // qDebug("initIntrument(): failed init_coms()"); messageText -> insertParagraph(tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + " + " ! + QString::fromAscii(it->inst_interp_error(it, rv)) + ")", -1); QMessageBox::critical(this, QTranslator::tr("Failed to Initialize the Device"), tr("Failed to initialize communications with instrument or wrong instrument or bad configuration! (") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + ")"); return notOK; } *************** *** 4504,4514 **** messageText -> insertParagraph(tr("init_inst returned ") + ! (QString) it->inst_interp_error(it, rv) ! + "(" + (QString) it->interp_error(it, rv) + ")" + tr(" Instrument initialization failed!"), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), ! (QString) it->inst_interp_error(it, rv) ! + "(" + (QString) it->interp_error(it, rv) + ")" + tr(" Instrument initialization failed!")); return notOK; --- 4504,4514 ---- messageText -> insertParagraph(tr("init_inst returned ") + ! QString::fromAscii(it->inst_interp_error(it, rv)) ! + "(" + QString::fromAscii(it->interp_error(it, rv)) + ")" + tr(" Instrument initialization failed!"), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), ! QString::fromAscii(it->inst_interp_error(it, rv)) ! + "(" + QString::fromAscii(it->interp_error(it, rv)) + ")" + tr(" Instrument initialization failed!")); return notOK; *************** *** 4554,4560 **** if ((rv = it->set_mode(it, inst_mode_emis_disp)) != inst_ok) { ! messageText -> insertParagraph(tr("Failed to set emission display mode. ") + (QString) it->inst_interp_error(it, rv) + " " + (QString) it->interp_error(it, rv), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), ! tr("Failed to set emission display mode. ") + (QString) it->inst_interp_error(it, rv) + " " + (QString) it->interp_error(it, rv)); return notOK; } --- 4554,4564 ---- if ((rv = it->set_mode(it, inst_mode_emis_disp)) != inst_ok) { ! messageText -> insertParagraph(tr("Failed to set emission display mode. ") + ! QString::fromAscii(it->inst_interp_error(it, rv)) + " " + ! QString::fromAscii(it->interp_error(it, rv)), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), ! tr("Failed to set emission display mode. ") + ! QString::fromAscii(it->inst_interp_error(it, rv)) + " " + ! QString::fromAscii(it->interp_error(it, rv))); return notOK; } *************** *** 4585,4596 **** { messageText -> insertParagraph(tr("Setting trigger mode failed with error : ") ! + (QString) it->inst_interp_error(it, rv) + " " ! + (QString) it->interp_error(it, rv), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), tr("Setting trigger mode failed with error : ") + ! (QString) it->inst_interp_error(it, rv) + ! " "+ ! (QString) it->interp_error(it, rv)); return notOK; } --- 4589,4600 ---- { messageText -> insertParagraph(tr("Setting trigger mode failed with error : ") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + " " ! + QString::fromAscii(it->interp_error(it, rv)), -1); QMessageBox::critical(this, QTranslator::tr("Problem Initializing Instrument."), tr("Setting trigger mode failed with error : ") + ! QString::fromAscii(it->inst_interp_error(it, rv)) + ! " " + ! QString::fromAscii(it->interp_error(it, rv))); return notOK; } *************** *** 4660,4664 **** // after issuing an error message fo the user. QString message; ! message = (QString) getErrorMessage(); QMessageBox::critical(this, QTranslator::tr("Problem Taking Measureemnt."), QTranslator::tr("Meter library error message is ") + --- 4664,4668 ---- // after issuing an error message fo the user. QString message; ! message = QString::fromAscii(getErrorMessage()); QMessageBox::critical(this, QTranslator::tr("Problem Taking Measureemnt."), QTranslator::tr("Meter library error message is ") + *************** *** 4682,4690 **** { messageText -> insertParagraph (tr("read_sample returned '") ! + (QString) it->inst_interp_error(it, rv) + "' (" ! + (QString) it->interp_error(it, rv) + ")", -1); qDebug(tr("read_sample returned '") ! + (QString) it->inst_interp_error(it, rv) + "' (" ! + (QString) it->interp_error(it, rv) + ")"); // Deal with a misread if ((rv & inst_mask) == inst_misread) --- 4686,4694 ---- { messageText -> insertParagraph (tr("read_sample returned '") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + "' (" ! + QString::fromAscii(it->interp_error(it, rv)) + ")", -1); qDebug(tr("read_sample returned '") ! + QString::fromAscii(it->inst_interp_error(it, rv)) + "' (" ! + QString::fromAscii(it->interp_error(it, rv)) + ")"); // Deal with a misread if ((rv & inst_mask) == inst_misread) *************** *** 4727,4732 **** { messageText -> insertParagraph(tr("Got fatal error '") ! + (QString) it->inst_interp_error(it, rv) ! + "' (" + (QString) it->interp_error(it, rv) + ")", -1); } } --- 4731,4736 ---- { messageText -> insertParagraph(tr("Got fatal error '") ! + QString::fromAscii(it->inst_interp_error(it, rv)) ! + "' (" + QString::fromAscii(it->interp_error(it, rv)) + ")", -1); } } |
|
From: Hal E. <hv...@us...> - 2008-03-01 23:47:19
|
Update of /cvsroot/lprof/lprof/src/parmsqt In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11601/parmsqt Modified Files: profileparms.cpp Log Message: Add the Qt::WStyle_Dialog flag. This should prevent this dialog from having a taskbar entry. Needs to be tested on a system where this was happening. Index: profileparms.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/parmsqt/profileparms.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** profileparms.cpp 19 Feb 2008 21:02:51 -0000 1.58 --- profileparms.cpp 1 Mar 2008 23:47:14 -0000 1.59 *************** *** 169,173 **** ProfileParms::ProfileParms(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax ) { setupUi(this); --- 169,173 ---- ProfileParms::ProfileParms(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Dialog) { setupUi(this); |
|
From: Hal E. <hv...@us...> - 2008-03-01 23:41:54
|
Update of /cvsroot/lprof/lprof/src/lprofqt In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9201 Modified Files: lprofmain.cpp Log Message: Added Qt::WStyle_Title to the Window style flags. Index: lprofmain.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain.cpp,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -d -r1.182 -r1.183 *** lprofmain.cpp 22 Feb 2008 00:16:16 -0000 1.182 --- lprofmain.cpp 1 Mar 2008 23:41:49 -0000 1.183 *************** *** 1010,1014 **** lprofMain::lprofMain( QWidget* parent) : QDialog( parent, "", 0, ! Qt::WType_TopLevel | Qt::WStyle_SysMenu | Qt::WStyle_MinMax ), FigEditor( 0 ), Canvas( 0 ), CanvasFrameLayout( 0 ), TheGrid( 0 ), TheImage( 0 ), CurrentTemplate( "" ), CurrentSafeFrame( 0 ), fn( "" ) --- 1010,1014 ---- lprofMain::lprofMain( QWidget* parent) : QDialog( parent, "", 0, ! Qt::WType_TopLevel | Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title), FigEditor( 0 ), Canvas( 0 ), CanvasFrameLayout( 0 ), TheGrid( 0 ), TheImage( 0 ), CurrentTemplate( "" ), CurrentSafeFrame( 0 ), fn( "" ) |
|
From: Hal E. <hv...@us...> - 2008-03-01 23:05:45
|
Update of /cvsroot/lprof/lprof/src/moncalqt In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27161 Modified Files: monitorcal.cpp monitorcal.h Log Message: Added timer driven event processing during meter reading to make sure that user initiated events are processed. Index: monitorcal.h =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalqt/monitorcal.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** monitorcal.h 19 Feb 2008 21:02:49 -0000 1.11 --- monitorcal.h 1 Mar 2008 23:05:35 -0000 1.12 *************** *** 62,65 **** --- 62,66 ---- void slotStop(); void slotHelpButton(); + void slotProcessEvents(); protected: Index: monitorcal.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalqt/monitorcal.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** monitorcal.cpp 25 Feb 2008 03:41:26 -0000 1.58 --- monitorcal.cpp 1 Mar 2008 23:05:31 -0000 1.59 *************** *** 67,71 **** #include <QWaitCondition> #include <QMutex> ! //LProf stuff --- 67,72 ---- #include <QWaitCondition> #include <QMutex> ! #include <QTimer> ! //LProf stuff *************** *** 83,89 **** // for ArgyllCMS USB error trapping #include <setjmp.h> ! ! int verb = 0; ! // int debug = 0; int docalib = 0; /* Do a manual instrument calibration */ int nocal = 0; /* Disable auto calibration */ --- 84,91 ---- // for ArgyllCMS USB error trapping #include <setjmp.h> ! ! QTimer *processEventsTimer; ! int verb = 0; ! // int debug = 0; int docalib = 0; /* Do a manual instrument calibration */ int nocal = 0; /* Disable auto calibration */ *************** *** 4672,4676 **** --- 4674,4682 ---- flashLEDsThread flashLEDs; + + processEventsTimer -> start( 100, FALSE); rv = it->read_sample(it, "SPOT", &val); + processEventsTimer -> stop(); + if (!rv == inst_ok) { *************** *** 5047,5050 **** --- 5053,5057 ---- { stop = true; + buttonOk -> setOn(TRUE); if (!measuring) { *************** *** 5071,5081 **** cmsXYZ2Lab(&tXYZ, &inLab, &inXYZ); if (inLab.L < 0.0) inLab.L = 0.0; - if (inLab.a < 0.0) inLab.a = 0.0; - if (inLab.b < 0.0) inLab.b = 0.0; if (inLab.L > 100.0) inLab.L = 100.0; cmsXYZ2Lab(&tXYZ, &targetLab, &tXYZ); if (targetLab.L < 0.0) targetLab.L = 0.0; - if (targetLab.a < 0.0) targetLab.a = 0.0; - if (targetLab.b < 0.0) targetLab.b = 0.0; if (targetLab.L > 100.0) targetLab.L = 100.0; --- 5078,5085 ---- cmsXYZ2Lab(&tXYZ, &inLab, &inXYZ); if (inLab.L < 0.0) inLab.L = 0.0; if (inLab.L > 100.0) inLab.L = 100.0; + cmsXYZ2Lab(&tXYZ, &targetLab, &tXYZ); if (targetLab.L < 0.0) targetLab.L = 0.0; if (targetLab.L > 100.0) targetLab.L = 100.0; *************** *** 5179,5183 **** double direction, sv[3], val; int progress = 1; ! const int level = 1; progressBar -> setProgress(progress++); --- 5183,5187 ---- double direction, sv[3], val; int progress = 1; ! const int level = 5; progressBar -> setProgress(progress++); *************** *** 5185,5189 **** WORD RGB[3]; ! // RGB[0] = RGB[1] = RGB[2] = (level - 1) * 255; // Get XYZ target values for R=G=B = 5 --- 5189,5193 ---- WORD RGB[3]; ! RGB[0] = RGB[1] = RGB[2] = (level + 2) * 255; // Get XYZ target values for R=G=B = 5 *************** *** 5200,5216 **** if (measuredXYZ.X > -99.0) { ! // sv[0]=measuredXYZ.X * targetXYZ.Y/targetXYZ.X; ! // sv[1]=measuredXYZ.Y; ! // sv[2]=measuredXYZ.Z * 1.0/WhiteY * targetXYZ.Y/targetXYZ.Z; ! // ! // val = sv[1]; ! // if (sv[0] > val) ! // val = sv[0]; ! // if (sv[2] > val) ! // val = sv[2]; ! // direction = val - targetXYZ.Y; // scale back to Y = 1.0 for white ! qDebug("measuredY = %f", measuredXYZ.Y); measuredXYZ.X = measuredXYZ.X * 1.0/WhiteY; measuredXYZ.Z = measuredXYZ.Z * 1.0/WhiteY; --- 5204,5221 ---- if (measuredXYZ.X > -99.0) { ! sv[0]=measuredXYZ.X * targetXYZ.Y/targetXYZ.X; ! sv[1]=measuredXYZ.Y; ! sv[2]=measuredXYZ.Z * 1.0/WhiteY * targetXYZ.Y/targetXYZ.Z; ! ! val = sv[1]; ! if (sv[0] > val) ! val = sv[0]; ! if (sv[2] > val) ! val = sv[2]; ! direction = val - targetXYZ.Y; ! blackLevel -> setValue(direction * 30000.0); // scale back to Y = 1.0 for white ! /* qDebug("measuredY = %f", measuredXYZ.Y); measuredXYZ.X = measuredXYZ.X * 1.0/WhiteY; measuredXYZ.Z = measuredXYZ.Z * 1.0/WhiteY; *************** *** 5225,5229 **** direction = double (high) - ((double(level) - 0.7) * 255.0); ! blackLevel -> setValue(direction / 10.0); } // end if else --- 5230,5234 ---- direction = double (high) - ((double(level) - 0.7) * 255.0); ! blackLevel -> setValue(direction / 10.0);*/ } // end if else *************** *** 5435,5439 **** cmsCIEXYZ XYZexpected, XYZactual; ! deltaZero[0] = deltaZero[1] = deltaZero[1] = low; LCMSHANDLE it8 = cmsIT8LoadFromFile(measfile); for (int row=0; row<entries; row++) --- 5440,5444 ---- cmsCIEXYZ XYZexpected, XYZactual; ! deltaZero[0] = deltaZero[1] = deltaZero[2] = low; LCMSHANDLE it8 = cmsIT8LoadFromFile(measfile); for (int row=0; row<entries; row++) *************** *** 5446,5463 **** // upscale to 16 bits ! RGBactual[0] = WORD (data[0]) * 256; ! RGBactual[1] = WORD (data[1]) * 256; ! RGBactual[2] = WORD (data[2]) * 256; RGBexpectedDBL[0] = (data[0] * 256.0)/(65536.0 - 256.0); RGBexpectedDBL[1] = (data[1] * 256.0)/(65536.0 - 256.0); RGBexpectedDBL[2] = (data[2] * 256.0)/(65536.0 - 256.0); XYZactual.X = (data[3] / 100.0) * 1.0/WhiteY; XYZactual.Z = (data[5] / 100.0) * 1.0/WhiteY; XYZactual.Y = (data[4] / 100.0) * 1.0/WhiteY; ! if (RGBactual[0] == 0) ! ! cmsDoTransform(RGB2XYZxForm16Bit, &RGBactual, &XYZexpected, 1); cmsDoTransform(XYZ2RGBxForm16bit, &XYZactual, &RGBexpected, 1); cmsDoTransform(XYZ2RGBxFormDbl, &XYZactual, &RGBactualDBL, 1); qDebug("RGBactual = %i %i %i", (int) RGBactual[0]/256, (int) RGBactual[1]/256, (int) RGBactual[2]/256); qDebug("RGBexpected = %i %i %i", (int) RGBexpected[0]/256, (int) RGBexpected[1]/256, (int) RGBexpected[2]/256); --- 5451,5469 ---- // upscale to 16 bits ! RGBactual[0] = WORD (data[0]) * 257; ! RGBactual[1] = WORD (data[1]) * 257; ! RGBactual[2] = WORD (data[2]) * 257; ! RGBexpectedDBL[0] = (data[0] * 256.0)/(65536.0 - 256.0); RGBexpectedDBL[1] = (data[1] * 256.0)/(65536.0 - 256.0); RGBexpectedDBL[2] = (data[2] * 256.0)/(65536.0 - 256.0); + XYZactual.X = (data[3] / 100.0) * 1.0/WhiteY; XYZactual.Z = (data[5] / 100.0) * 1.0/WhiteY; XYZactual.Y = (data[4] / 100.0) * 1.0/WhiteY; ! cmsDoTransform(XYZ2RGBxForm16bit, &XYZactual, &RGBexpected, 1); cmsDoTransform(XYZ2RGBxFormDbl, &XYZactual, &RGBactualDBL, 1); + qDebug("RGBactual = %i %i %i", (int) RGBactual[0]/256, (int) RGBactual[1]/256, (int) RGBactual[2]/256); qDebug("RGBexpected = %i %i %i", (int) RGBexpected[0]/256, (int) RGBexpected[1]/256, (int) RGBexpected[2]/256); *************** *** 5466,5475 **** qDebug("XYZactual = %f %f %f", XYZactual.X, XYZactual.Y, XYZactual.Z); qDebug("XYZexpected = %f %f %f", XYZexpected.X, XYZexpected.Y, XYZexpected.Z); for (int i=0; i<3; i++) { ! curves[i] -> Values[row] = RGBexpectedDBL[i] + (RGBexpectedDBL[i] - RGBactualDBL[i]) - low; if (row == entries - 1) { ! deltaZero[i] = RGBexpectedDBL[i] - RGBactualDBL[i]; if (deltaZero[i] > low) low = deltaZero[i]; --- 5472,5482 ---- qDebug("XYZactual = %f %f %f", XYZactual.X, XYZactual.Y, XYZactual.Z); qDebug("XYZexpected = %f %f %f", XYZexpected.X, XYZexpected.Y, XYZexpected.Z); + double correction = 0.5 * ((double) (entries - row - 1) / (double) (entries - 1)); for (int i=0; i<3; i++) { ! curves[i] -> Values[row] = RGBexpectedDBL[i] + ((RGBexpectedDBL[i] - RGBactualDBL[i]) * (0.5 + correction)); if (row == entries - 1) { ! deltaZero[i] = curves[i] -> Values[row] - 1.0; if (deltaZero[i] > low) low = deltaZero[i]; *************** *** 5477,5489 **** } } for (int row = 0; row<entries; row++ ) { for (int j=0; j<3; j++) { ! curves[j] -> Values[row] = curves[j] -> Values[row] - low; } ! qDebug("curves[%i] = %f %f %f", row, curves[0] -> Values[row], ! curves[1] -> Values[row], ! curves[2] -> Values[row]); } } --- 5484,5501 ---- } } + qDebug("low = %f", low); for (int row = 0; row<entries; row++ ) { + double correction = 1.0 - ((double) (entries - row - 1) / (double) (entries - 1)); for (int j=0; j<3; j++) { ! curves[j] -> Values[row] = curves[j] -> Values[row] - (low * correction); } ! qDebug("correction = %f, curves[%i] = %f %f %f", ! correction, ! row, ! curves[0] -> Values[row], ! curves[1] -> Values[row], ! curves[2] -> Values[row]); } } *************** *** 5494,5506 **** L16PARAMS L16; int i; ! WORD wQuant, wValIn; cmsCalcL16Params(Gamma -> nEntries, &L16); Sampled = cmsAllocSampledCurve(nPoints); ! for (i=0; i < nPoints; i++) { wQuant = _cmsQuantizeVal(i, nPoints); wValIn = cmsLinearInterpLUT16(wQuant, Gamma ->GammaTable, &L16); ! Sampled ->Values[i] = (float) wValIn; } --- 5506,5521 ---- L16PARAMS L16; int i; ! WORD wQuant; ! WORD wValIn; cmsCalcL16Params(Gamma -> nEntries, &L16); Sampled = cmsAllocSampledCurve(nPoints); ! for (i=0; i < nPoints; i++) ! { wQuant = _cmsQuantizeVal(i, nPoints); wValIn = cmsLinearInterpLUT16(wQuant, Gamma ->GammaTable, &L16); ! Sampled -> Values[i] = (float) wValIn / 65535.0; ! // qDebug("New smapled curve = %f)", Sampled ->Values[i]); } *************** *** 5582,5586 **** for (int i=0; i<3; i++) { ! cmsSmoothSampledCurve(curves[i], double (arraySize - 1)); gCurves[i] = cmsAllocGamma(arraySize); for (int j=0; j<arraySize; j++) --- 5597,5601 ---- for (int i=0; i<3; i++) { ! cmsSmoothSampledCurve(curves[i], double (arraySize) / 4.0); gCurves[i] = cmsAllocGamma(arraySize); for (int j=0; j<arraySize; j++) *************** *** 5588,5593 **** if (curves[i] -> Values[j] < 0.0) gCurves[i] -> GammaTable[j] = 0; ! else gCurves[i] -> GammaTable[j] = WORD(curves[i] -> Values[j] * 65535.0); } --- 5603,5616 ---- if (curves[i] -> Values[j] < 0.0) gCurves[i] -> GammaTable[j] = 0; ! if (curves[i] -> Values[j] > 1.0) ! { ! qDebug("curves[%i] -> Values[%i] = %f", 1, j, curves[i] -> Values[j]); ! gCurves[i] -> GammaTable[j] = 65535; ! } ! else ! { gCurves[i] -> GammaTable[j] = WORD(curves[i] -> Values[j] * 65535.0); + + } } *************** *** 5616,5622 **** for (int i=0; i < orig_gammaRamp -> size; i++) { ! new_gammaRamp -> red[i] = resampledCurves[0] -> Values[i] / 65535.0; ! new_gammaRamp -> green[i] = resampledCurves[1] -> Values[i] / 65535.0; ! new_gammaRamp -> blue[i] = resampledCurves[2] -> Values[i] / 65535.0; --- 5639,5645 ---- for (int i=0; i < orig_gammaRamp -> size; i++) { ! new_gammaRamp -> red[i] = resampledCurves[0] -> Values[i]; ! new_gammaRamp -> green[i] = resampledCurves[1] -> Values[i]; ! new_gammaRamp -> blue[i] = resampledCurves[2] -> Values[i]; *************** *** 5905,5908 **** --- 5928,5936 ---- } + void MonitorCal::slotProcessEvents() + { + lprofApp -> processEvents(); + } + MonitorCal::MonitorCal(QWidget *parent) : QDialog(parent, "", 0, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | *************** *** 5915,5918 **** --- 5943,5952 ---- connect(sliderVpos, SIGNAL(valueChanged(int)), this, SLOT(slotPosChanged())); connect(buttonOk, SIGNAL(clicked()), this, SLOT(slotStop())); + + processEventsTimer = new QTimer(this); + connect(processEventsTimer, SIGNAL(timeout()), SLOT(slotProcessEvents())); + processEventsTimer -> stop(); + + buttonOk -> setToggleButton (TRUE); messageText -> setTextFormat( Qt::LogText); *************** *** 6040,6046 **** --- 6074,6098 ---- { int rgb; + // double dE, xyz[3], txyz[3]; + // icmXYZNumber wN; + // + // txyz[0] = targetXYZ.X/targetXYZ.Y; + // txyz[2] = targetXYZ.Z/targetXYZ.Y; + // txyz[1] = targetXYZ.Y/targetXYZ.Y; + // + // xyz[0] = targetXYZ.X; + // xyz[1] = targetXYZ.Y; + // xyz[2] = targetXYZ.Z; + // + // icmAry2XYZ(wN, txyz); + // xyz[0] /= xyz[1]; + // xyz[2] /= xyz[1]; + // xyz[1] /= xyz[1]; + // dE = icmXYZCIE2K(&wN, xyz, txyz); rgb = (int) (((double) i) * 15.875); Delta_E_lines[i] = tr(QString("At RGB= %1 DE to locus = %2\n")).arg(rgb).arg(DeltaE(locusXYZ[i],targetXYZ) , 0, 'f', 4); + // qDebug(Delta_E_lines[i]); + // Delta_E_lines[i] = tr(QString("At RGB= %1 DE to locus = %2\n")).arg(rgb).arg(dE , 0, 'f', 5); } QMessageBox::information( this, tr("Display Calibration Report"), |
|
From: Hal E. <hv...@us...> - 2008-02-27 18:35:28
|
Update of /cvsroot/lprof/lprof In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16108 Modified Files: SConstruct Log Message: Add -D_FORTIFY_SOURCE=0 to default ccflags. Change link order so that -lusb is after -linst. Index: SConstruct =================================================================== RCS file: /cvsroot/lprof/lprof/SConstruct,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -d -r1.124 -r1.125 *** SConstruct 19 Feb 2008 21:01:20 -0000 1.124 --- SConstruct 27 Feb 2008 18:35:23 -0000 1.125 *************** *** 42,46 **** opts.Add(PathOption("qt_directory", "Path to Qt directory", "/")) opts.Add(PathOption('PREFIX', 'Directory to install under', os.path.normpath('/usr/local'))) ! opts.Add('ccflags', 'Flags to be passed to c compiler.', '-O3 -Wall -pipe') opts.Add('cxxflags', 'Flags to be passed to c++ compiler.', '-O3 -Wall -pipe') opts.Add('ldflags', 'Stuff to be added to LDFLAGS. If more than one item is being added use space btween items. Enclose multipule items in quotes.', '') --- 42,46 ---- opts.Add(PathOption("qt_directory", "Path to Qt directory", "/")) opts.Add(PathOption('PREFIX', 'Directory to install under', os.path.normpath('/usr/local'))) ! opts.Add('ccflags', 'Flags to be passed to c compiler.', '-O3 -Wall -pipe -D_FORTIFY_SOURCE=0') opts.Add('cxxflags', 'Flags to be passed to c++ compiler.', '-O3 -Wall -pipe') opts.Add('ldflags', 'Stuff to be added to LDFLAGS. If more than one item is being added use space btween items. Enclose multipule items in quotes.', '') *************** *** 292,295 **** --- 292,300 ---- Export('env') + # Add Argyll, lcms. qwt, SolvOpt and other locally built libraries + # these are all static libraries + env.Append(LIBS=[ 'moncalcontrol', 'moncal', 'parms', 'pchecker', 'reffile', 'profid', 'monv', 'gamma', 'qtlcmswidgets', 'xicc', 'lprof', 'locallcms', 'rspl', 'numlib', 'solvopt', 'inst', 'cgats', 'insttypes', 'vlututil' + ]) + # SConscript in the root of the build tree # it conatains a list of external libraries that *************** *** 303,311 **** SConscript(env['custom_libs']) - # Add Argyll, lcms. qwt, SolvOpt and other locally built libraries - # these are all static libraries - env.Append(LIBS=[ 'moncalcontrol', 'moncal', 'parms', 'pchecker', 'reffile', 'profid', 'monv', 'gamma', 'qtlcmswidgets', 'xicc', 'lprof', 'locallcms', 'rspl', 'numlib', 'solvopt', 'inst', 'cgats', 'insttypes', 'vlututil' - ]) - # end configuration section # -------------------------------------------------------- --- 308,311 ---- |
|
From: Hal E. <hv...@us...> - 2008-02-25 03:41:35
|
Update of /cvsroot/lprof/lprof/src/moncalqt In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv3865 Modified Files: monitorcal.cpp Log Message: Improved VCGT calibration code. Now does an OK initial smoothed set of curves. These curves still need more work on the dark end of the tone scale but dE numbers are fairly low about about R=G=B = 30. Still needs to have iterative refinement steps added. What is here should work for both CRTs and LCDs. Also removed bug where the "Done" button did not work when setting the white level. Switched black level code to use the same basic algorithm as is used for setting the white point and in the VCGT calibration code. Index: monitorcal.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalqt/monitorcal.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** monitorcal.cpp 22 Feb 2008 22:18:22 -0000 1.57 --- monitorcal.cpp 25 Feb 2008 03:41:26 -0000 1.58 *************** *** 4823,4843 **** return cmsBuildParametricGamma(size, 4, parms); break; ! case gtLstar: // L* ! double y; ! LPGAMMATABLE tempGT; ! tempGT = cmsAllocGamma(size); ! for (int i=0; i < size; i++) ! { ! y = (double) i / (double) (orig_gammaRamp -> size - 1); ! if (y > 0.008856451586) ! tempGT -> GammaTable[i] = ! (int) (((1.16 * pow(y,1.0/3.0) - 0.16) * ! 65535.0)); ! else ! tempGT -> GammaTable[i] = ! (int) (((1.16 * 7.787036979 * y) * 65535.0)); ! } ! return cmsReverseGamma(size, tempGT); ! break; } } --- 4823,4843 ---- return cmsBuildParametricGamma(size, 4, parms); break; ! case gtLstar: // L* ! double y; ! LPGAMMATABLE tempGT; ! tempGT = cmsAllocGamma(size); ! for (int i=0; i < size; i++) ! { ! y = (double) i / (double) (orig_gammaRamp -> size - 1); ! if (y > 0.008856451586) ! tempGT -> GammaTable[i] = ! (int) (((1.16 * pow(y,1.0/3.0) - 0.16) * ! 65535.0)); ! else ! tempGT -> GammaTable[i] = ! (int) (((1.16 * 7.787036979 * y) * 65535.0)); ! } ! return cmsReverseGamma(size, tempGT); ! break; } } *************** *** 4851,4862 **** xyYlum = new cmsCIExyY; ! // qDebug("MonitorCal::setWhitePoint()"); paintPatch(255, 255, 255); XYZ = takeSpotReading(); WhiteY = XYZ.Y; cmsXYZ2xyY(xyYlum, &XYZ); // setup target whitepoint settings ! if (whitePoint >= 4500.0 && whitePoint <= 7500.0) ! { /* Daylight color temperature */ // if (!cmsWhitePointFromTemp((int) whitePoint, xyYwhitePoint)) // qDebug ("Failed to compute XYZ of target color temperature %f", whitePoint); --- 4851,4863 ---- xyYlum = new cmsCIExyY; ! qDebug("MonitorCal::setWhitePoint()"); paintPatch(255, 255, 255); XYZ = takeSpotReading(); WhiteY = XYZ.Y; cmsXYZ2xyY(xyYlum, &XYZ); + // qDebug("measured XYZ.X = %f, XYZ.Y = %f, XYZ.Z = %f", XYZ.X, XYZ.Y, XYZ.Z); // setup target whitepoint settings ! if (whitePoint >= 4500.0 && whitePoint <= 7500.0) ! { /* Daylight color temperature */ // if (!cmsWhitePointFromTemp((int) whitePoint, xyYwhitePoint)) // qDebug ("Failed to compute XYZ of target color temperature %f", whitePoint); *************** *** 4869,4892 **** // } // qDebug("set white point"); ! double XYZ1[3]; ! if (icx_ill_sp2XYZ(XYZ1, icxOT_default, NULL, icxIT_Dtemp, whitePoint, NULL) != 0) ! qDebug ("Failed to compute XYZ of target color temperature %f", whitePoint); ! qDebug("XYZ.X = %f, XYZ.Y = %f, XYZ.Z = %f", XYZ.X, XYZ.Y, XYZ.Z); ! // * Y to scale this to the actual whote point of the device ! XYZ.X=XYZ1[0]; ! XYZ.Y=XYZ1[1]; ! XYZ.Z=XYZ1[2]; ! qDebug("XYZ.X = %f, XYZ.Y = %f, XYZ.Z = %f", XYZ.X, XYZ.Y, XYZ.Z); ! return XYZ; } else { /* Native white */ nativeWP = true; - XYZ.X= XYZ.X / XYZ.Y; - XYZ.Y= XYZ.Y / XYZ.Y; - XYZ.Z= XYZ.Z / XYZ.Y; - return XYZ; } } --- 4870,4898 ---- // } // qDebug("set white point"); ! ! double XYZ1[3]; ! if (icx_ill_sp2XYZ(XYZ1, icxOT_default, NULL, icxIT_Dtemp, whitePoint, NULL) != 0) ! qDebug ("Failed to compute XYZ of target color temperature %f", whitePoint); ! else ! { ! // qDebug("XYZ.X = %f, XYZ.Y = %f, XYZ.Z = %f", XYZ.X, XYZ.Y, XYZ.Z); ! // * Y to scale this to the actual white point of the device ! XYZ.X=XYZ1[0]; ! XYZ.Y=XYZ1[1]; ! XYZ.Z=XYZ1[2]; ! } ! // qDebug("XYZ.X = %f, XYZ.Y = %f, XYZ.Z = %f", XYZ.X, XYZ.Y, XYZ.Z); ! // return XYZ; } else { /* Native white */ nativeWP = true; } + XYZ.X= XYZ.X / XYZ.Y; + XYZ.Z= XYZ.Z / XYZ.Y; + XYZ.Y= XYZ.Y / XYZ.Y; + // qDebug("normalized XYZ.X = %f, XYZ.Y = %f, XYZ.Z = %f", XYZ.X, XYZ.Y, XYZ.Z); + return XYZ; } *************** *** 5053,5070 **** // normalize XYZ values inXYZ.X = XYZ.X/XYZ.Y; - inXYZ.Y = XYZ.Y/XYZ.Y; inXYZ.Z = XYZ.Z/XYZ.Y; tXYZ.X = targetXYZ.X/targetXYZ.Y; - tXYZ.Y = targetXYZ.Y/targetXYZ.Y; tXYZ.Z = targetXYZ.Z/targetXYZ.Y; // convert to Lab ! cmsCIELab WP, In; ! cmsXYZ2Lab(&tXYZ, &In, &inXYZ); ! cmsXYZ2Lab(&tXYZ, &WP, &tXYZ); ! return cmsDeltaE(&WP, &In); } --- 5059,5084 ---- // normalize XYZ values inXYZ.X = XYZ.X/XYZ.Y; inXYZ.Z = XYZ.Z/XYZ.Y; + inXYZ.Y = XYZ.Y/XYZ.Y; tXYZ.X = targetXYZ.X/targetXYZ.Y; tXYZ.Z = targetXYZ.Z/targetXYZ.Y; + tXYZ.Y = targetXYZ.Y/targetXYZ.Y; // convert to Lab ! cmsCIELab targetLab, inLab; ! cmsXYZ2Lab(&tXYZ, &inLab, &inXYZ); ! if (inLab.L < 0.0) inLab.L = 0.0; ! if (inLab.a < 0.0) inLab.a = 0.0; ! if (inLab.b < 0.0) inLab.b = 0.0; ! if (inLab.L > 100.0) inLab.L = 100.0; ! cmsXYZ2Lab(&tXYZ, &targetLab, &tXYZ); ! if (targetLab.L < 0.0) targetLab.L = 0.0; ! if (targetLab.a < 0.0) targetLab.a = 0.0; ! if (targetLab.b < 0.0) targetLab.b = 0.0; ! if (targetLab.L > 100.0) targetLab.L = 100.0; ! return cmsDeltaE(&targetLab, &inLab); } *************** *** 5078,5087 **** /* Normalised XYZ white point */ white[0] = XYZ.X/XYZ.Y; - white[1] = XYZ.Y/XYZ.Y; white[2] = XYZ.Z/XYZ.Y; target[0] = targetXYZ.X/targetXYZ.Y; - target[1] = targetXYZ.Y/targetXYZ.Y; target[2] = targetXYZ.Z/targetXYZ.Y; // cct = comp_ct(&cct_de, NULL, 1, 0, white); /* Compute CCT */ --- 5092,5101 ---- /* Normalised XYZ white point */ white[0] = XYZ.X/XYZ.Y; white[2] = XYZ.Z/XYZ.Y; + white[1] = XYZ.Y/XYZ.Y; target[0] = targetXYZ.X/targetXYZ.Y; target[2] = targetXYZ.Z/targetXYZ.Y; + target[1] = targetXYZ.Y/targetXYZ.Y; // cct = comp_ct(&cct_de, NULL, 1, 0, white); /* Compute CCT */ *************** *** 5128,5133 **** /* Normalised XYZ white point */ white[0] = readXYZ[2].X/readXYZ[2].Y; - white[1] = readXYZ[2].Y/readXYZ[2].Y; white[2] = readXYZ[2].Z/readXYZ[2].Y; /* White point chromaticity coordinates */ --- 5142,5147 ---- /* Normalised XYZ white point */ white[0] = readXYZ[2].X/readXYZ[2].Y; white[2] = readXYZ[2].Z/readXYZ[2].Y; + white[1] = readXYZ[2].Y/readXYZ[2].Y; /* White point chromaticity coordinates */ *************** *** 5165,5168 **** --- 5179,5183 ---- double direction, sv[3], val; int progress = 1; + const int level = 1; progressBar -> setProgress(progress++); *************** *** 5170,5199 **** WORD RGB[3]; ! RGB[0] = RGB[1] = RGB[2] = 5 * 255; // Get XYZ target values for R=G=B = 5 cmsDoTransform(RGB2XYZxForm16Bit, &RGB, &targetXYZ, 1); targetXYZ.X = targetXYZ.X * 1.0/WhiteY; - targetXYZ.Y = targetXYZ.Y * 1.0/WhiteY; targetXYZ.Z = targetXYZ.Z * 1.0/WhiteY; // target = 0.01 * whitePointXYZ.Y; ! paintPatch(5, 5, 5); while (!stop) { measuredXYZ = takeSpotReading(); ! if (measuredXYZ.X > -99999.0) { ! sv[0]=measuredXYZ.X * targetXYZ.Y/targetXYZ.X; ! sv[1]=measuredXYZ.Y; ! sv[2]=measuredXYZ.Z * 1.0/WhiteY * targetXYZ.Y/targetXYZ.Z; ! ! val = sv[1]; ! if (sv[0] > val) ! val = sv[0]; ! if (sv[2] > val) ! val = sv[2]; ! direction = val - targetXYZ.Y; ! blackLevel -> setValue(direction * 30000.0); } // end if else --- 5185,5229 ---- WORD RGB[3]; ! // RGB[0] = RGB[1] = RGB[2] = (level - 1) * 255; // Get XYZ target values for R=G=B = 5 cmsDoTransform(RGB2XYZxForm16Bit, &RGB, &targetXYZ, 1); targetXYZ.X = targetXYZ.X * 1.0/WhiteY; targetXYZ.Z = targetXYZ.Z * 1.0/WhiteY; + targetXYZ.Y = targetXYZ.Y * 1.0/WhiteY; // target = 0.01 * whitePointXYZ.Y; ! paintPatch(level, level, level); ! stop = false; while (!stop) { measuredXYZ = takeSpotReading(); ! if (measuredXYZ.X > -99.0) { ! // sv[0]=measuredXYZ.X * targetXYZ.Y/targetXYZ.X; ! // sv[1]=measuredXYZ.Y; ! // sv[2]=measuredXYZ.Z * 1.0/WhiteY * targetXYZ.Y/targetXYZ.Z; ! // ! // val = sv[1]; ! // if (sv[0] > val) ! // val = sv[0]; ! // if (sv[2] > val) ! // val = sv[2]; ! // direction = val - targetXYZ.Y; ! ! // scale back to Y = 1.0 for white ! qDebug("measuredY = %f", measuredXYZ.Y); ! measuredXYZ.X = measuredXYZ.X * 1.0/WhiteY; ! measuredXYZ.Z = measuredXYZ.Z * 1.0/WhiteY; ! measuredXYZ.Y = measuredXYZ.Y * 1.0/WhiteY; ! qDebug("normalized measuredY = %f", measuredXYZ.Y); ! cmsDoTransform(XYZ2RGBxForm16bit, &measuredXYZ, &RGB, 1); ! int high = RGB[0]; ! if (RGB[1] > high) ! high = RGB[1]; ! if (RGB[2] > high) ! high = RGB[2]; ! direction = double (high) - ((double(level) - 0.7) * 255.0); ! blackLevel -> setValue(direction / 10.0); } // end if else *************** *** 5304,5322 **** cmsCIEXYZ whiteXYZ, measuredXYZ; // black, gray, white double targetwhite, direction; ! int progress = 1; ! paintPatch(255, 255, 255); whiteXYZ = takeSpotReading(); targetwhite = whiteXYZ.Y; if (targetBrightness > 0.000000001) - { targetwhite = targetBrightness; ! } ! else targetwhite = whiteXYZ.Y; ! while (!stop) { - progressBar -> setProgress(progress++); measuredXYZ = takeSpotReading(); if (measuredXYZ.X > -99999.0) --- 5334,5350 ---- cmsCIEXYZ whiteXYZ, measuredXYZ; // black, gray, white double targetwhite, direction; ! int progress = 0; ! paintPatch(255, 255, 255); whiteXYZ = takeSpotReading(); targetwhite = whiteXYZ.Y; + progressBar -> setProgress(progress++); if (targetBrightness > 0.000000001) targetwhite = targetBrightness; ! ! stop = false; while (!stop) { measuredXYZ = takeSpotReading(); if (measuredXYZ.X > -99999.0) *************** *** 5326,5333 **** } else ! QMessageBox::critical( this, tr("Display Measurement Failed"), tr("The measurement instrument returned an error.")); if (progress > 5) progress = 0; ! lprofApp -> processEvents(QEventLoop::ExcludeUserInputEvents); } } --- 5354,5363 ---- } else ! QMessageBox::critical( this, tr("Display Measurement Failed"), ! tr("The measurement instrument returned an error.")); ! progressBar -> setProgress(progress++); if (progress > 5) progress = 0; ! lprofApp -> processEvents(); } } *************** *** 5357,5362 **** cmsCIEXYZ mXYZ; mXYZ.X = measuredXYZ.X/measuredXYZ.Y; - mXYZ.Y = measuredXYZ.Y/measuredXYZ.Y; mXYZ.Z = measuredXYZ.Z/measuredXYZ.Y; measuredRGB = XYZ2RGBDbl(mXYZ); --- 5387,5392 ---- cmsCIEXYZ mXYZ; mXYZ.X = measuredXYZ.X/measuredXYZ.Y; mXYZ.Z = measuredXYZ.Z/measuredXYZ.Y; + mXYZ.Y = measuredXYZ.Y/measuredXYZ.Y; measuredRGB = XYZ2RGBDbl(mXYZ); *************** *** 5423,5428 **** RGBexpectedDBL[2] = (data[2] * 256.0)/(65536.0 - 256.0); XYZactual.X = (data[3] / 100.0) * 1.0/WhiteY; - XYZactual.Y = (data[4] / 100.0) * 1.0/WhiteY; XYZactual.Z = (data[5] / 100.0) * 1.0/WhiteY; if (RGBactual[0] == 0) --- 5453,5458 ---- RGBexpectedDBL[2] = (data[2] * 256.0)/(65536.0 - 256.0); XYZactual.X = (data[3] / 100.0) * 1.0/WhiteY; XYZactual.Z = (data[5] / 100.0) * 1.0/WhiteY; + XYZactual.Y = (data[4] / 100.0) * 1.0/WhiteY; if (RGBactual[0] == 0) *************** *** 5459,5472 **** } void MonitorCal::calibrateDisplay() { ! LPGAMMATABLE TransferCurves[3], desiredCurve, ! desiredCurves[3], resampledTcurves[3], ! reversedTcurves[3], newTcurves[3], ! BPcomp[3], WPcomp[3]; cmsCIEXYZ WhitePoint; cmsCIEXYZ BlackPoint; cmsCIExyYTRIPLE Primaries; ! LPSAMPLEDCURVE curves[3]; const int arraySize = 33; --- 5489,5518 ---- } + LPSAMPLEDCURVE cmsxConvertGammaToSampledCurve(LPGAMMATABLE Gamma, int nPoints) + { + LPSAMPLEDCURVE Sampled; + L16PARAMS L16; + int i; + WORD wQuant, wValIn; + + cmsCalcL16Params(Gamma -> nEntries, &L16); + + Sampled = cmsAllocSampledCurve(nPoints); + for (i=0; i < nPoints; i++) { + wQuant = _cmsQuantizeVal(i, nPoints); + wValIn = cmsLinearInterpLUT16(wQuant, Gamma ->GammaTable, &L16); + Sampled ->Values[i] = (float) wValIn; + } + + return Sampled; + } + void MonitorCal::calibrateDisplay() { ! LPGAMMATABLE gCurves[3]; cmsCIEXYZ WhitePoint; cmsCIEXYZ BlackPoint; cmsCIExyYTRIPLE Primaries; ! LPSAMPLEDCURVE curves[3], resampledCurves[3]; const int arraySize = 33; *************** *** 5511,5569 **** {255, 255, 255} }; - // {255, 0, 0}, - // {0, 0, 0}, - // {4, 0, 0}, - // {8, 0, 0}, - // {17, 0, 0}, - // {34, 0, 0}, - // {51, 0, 0}, - // {68, 0, 0}, - // {85, 0, 0}, - // {102, 0, 0}, - // {119, 0, 0}, - // {136, 0, 0}, - // {153, 0, 0}, - // {170, 0, 0}, - // {187, 0, 0}, - // {204, 0, 0}, - // {221, 0, 0}, - // {238, 0, 0}, - // {0, 255, 0}, - // {0, 0, 0}, - // {0, 4, 0}, - // {0, 8, 0}, - // {0, 17, 0}, - // {0, 34, 0}, - // {0, 51, 0}, - // {0, 68, 0}, - // {0, 85, 0}, - // {0, 102, 0}, - // {0, 119, 0}, - // {0, 136, 0}, - // {0, 153, 0}, - // {0, 170, 0}, - // {0, 187, 0}, - // {0, 204, 0}, - // {0, 221, 0}, - // {0, 238, 0}, - // {0, 0, 255}, - // {0, 0, 0}, - // {4, 4, 4}, - // {8, 8, 8}, - // {0, 0, 17}, - // {0, 0, 34}, - // {0, 0, 51}, - // {0, 0, 68}, - // {0, 0, 85}, - // {0, 0, 102}, - // {0, 0, 119}, - // {0, 0, 136}, - // {0, 0, 153}, - // {0, 0, 170}, - // {0, 0, 187}, - // {0, 0, 204}, - // {0, 0, 221}, - // {0, 0, 238}}; - cmsCIEXYZ gammaXYZ[3], measuredXYZ; // black, gray, white --- 5557,5560 ---- *************** *** 5588,5634 **** convertToSampledcurves(curves, arraySize); for (int i=0; i<3; i++) { ! reversedTcurves[i] = cmsAllocGamma(arraySize); for (int j=0; j<arraySize; j++) { ! if (curves[i] -> Values[j] < 0.0) ! reversedTcurves[i] -> GammaTable[j] = 0; ! else ! reversedTcurves[i] -> GammaTable[j] = WORD(curves[i] -> Values[j] * 65535.0); } } - - // ComputeRGBNeutralTranferFunctions(TransferCurves); - // - // desiredCurves[0] = createDesiredGammaCurve(orig_gammaRamp -> size); - // desiredCurves[1] = createDesiredGammaCurve(orig_gammaRamp -> size); - // desiredCurves[2] = createDesiredGammaCurve(orig_gammaRamp -> size); - // - // - // reversedTcurves[0] = cmsReverseGamma(1024, TransferCurves[0]); - // reversedTcurves[1] = cmsReverseGamma(1024, TransferCurves[1]); - // reversedTcurves[2] = cmsReverseGamma(1024, TransferCurves[2]); - - resampledTcurves[0] = cmsReverseGamma(orig_gammaRamp -> size, - reversedTcurves[0]); - resampledTcurves[1] = cmsReverseGamma(orig_gammaRamp -> size, - reversedTcurves[1]); - resampledTcurves[2] = cmsReverseGamma(orig_gammaRamp -> size, - reversedTcurves[2]); - - newTcurves[0] = cmsReverseGamma(orig_gammaRamp -> size, - resampledTcurves[0]); - newTcurves[1] = cmsReverseGamma(orig_gammaRamp -> size, - resampledTcurves[1]); - newTcurves[2] = cmsReverseGamma(orig_gammaRamp -> size, - resampledTcurves[2]); - /* - newTcurves[0] = cmsJoinGamma(desiredCurves[0], resampledTcurves[0]); - newTcurves[1] = cmsJoinGamma(desiredCurves[1], resampledTcurves[1]); - newTcurves[2] = cmsJoinGamma(desiredCurves[2], resampledTcurves[2]);*/ - - // write out CGATS data and setup the video card gamma table LCMSHANDLE it8 = cmsxIT8Alloc(); --- 5579,5598 ---- convertToSampledcurves(curves, arraySize); + for (int i=0; i<3; i++) { ! cmsSmoothSampledCurve(curves[i], double (arraySize - 1)); ! gCurves[i] = cmsAllocGamma(arraySize); for (int j=0; j<arraySize; j++) { ! if (curves[i] -> Values[j] < 0.0) ! gCurves[i] -> GammaTable[j] = 0; ! else ! gCurves[i] -> GammaTable[j] = WORD(curves[i] -> Values[j] * 65535.0); } + + resampledCurves[i] = cmsxConvertGammaToSampledCurve(gCurves[i], orig_gammaRamp -> size); } // write out CGATS data and setup the video card gamma table LCMSHANDLE it8 = cmsxIT8Alloc(); *************** *** 5652,5669 **** for (int i=0; i < orig_gammaRamp -> size; i++) { ! // new_gammaRamp -> red[i] = (double) newTcurves[0] -> GammaTable[i] / 65535.0; ! // new_gammaRamp -> green[i] = (double) newTcurves[1] -> GammaTable[i] / 65535.0; ! // new_gammaRamp -> blue[i] = (double) newTcurves[2] -> GammaTable[i] / 65535.0; - new_gammaRamp -> red[i] = (double) newTcurves[0] -> GammaTable[i] / 65535.0; - new_gammaRamp -> green[i] = (double) newTcurves[1] -> GammaTable[i] / 65535.0; - new_gammaRamp -> blue[i] = (double) newTcurves[2] -> GammaTable[i] / 65535.0; ! sprintf(table_index, "%i", i + 1); ! cmsxIT8SetDataSet(it8, table_index, "SAMPLE_ID", table_index); ! cmsxIT8SetDataSetDbl(it8, table_index, "RGB_R", double (newTcurves[0] -> GammaTable[i])); ! cmsxIT8SetDataSetDbl(it8, table_index, "RGB_G", double (newTcurves[1] -> GammaTable[i])); ! cmsxIT8SetDataSetDbl(it8, table_index, "RGB_B", double (newTcurves[2] -> GammaTable[i])); ! } // write out CGATS data and free emeory cmsxIT8SaveToFile(it8, calfile); --- 5616,5630 ---- for (int i=0; i < orig_gammaRamp -> size; i++) { ! new_gammaRamp -> red[i] = resampledCurves[0] -> Values[i] / 65535.0; ! new_gammaRamp -> green[i] = resampledCurves[1] -> Values[i] / 65535.0; ! new_gammaRamp -> blue[i] = resampledCurves[2] -> Values[i] / 65535.0; ! sprintf(table_index, "%i", i + 1); ! cmsxIT8SetDataSet(it8, table_index, "SAMPLE_ID", table_index); ! cmsxIT8SetDataSetDbl(it8, table_index, "RGB_R", (double) int (new_gammaRamp -> red[i] * 65535.0 + 0.5)); ! cmsxIT8SetDataSetDbl(it8, table_index, "RGB_G", (double) int (new_gammaRamp -> green[i] * 65535.0 + 0.5)); ! cmsxIT8SetDataSetDbl(it8, table_index, "RGB_B", (double) int (new_gammaRamp -> blue[i] * 65535.0 + 0.5)); ! } // write out CGATS data and free emeory cmsxIT8SaveToFile(it8, calfile); *************** *** 5674,5696 **** // Free the memory for the gamma tables. ! cmsFreeGamma(newTcurves[0]); ! cmsFreeGamma(newTcurves[1]); ! cmsFreeGamma(newTcurves[2]); ! ! // cmsFreeGamma(desiredCurves[0]); ! // cmsFreeGamma(desiredCurves[1]); ! // cmsFreeGamma(desiredCurves[2]); ! // ! // cmsFreeGamma(TransferCurves[0]); ! // cmsFreeGamma(TransferCurves[1]); ! // cmsFreeGamma(TransferCurves[2]); ! ! cmsFreeGamma(resampledTcurves[0]); ! cmsFreeGamma(resampledTcurves[1]); ! cmsFreeGamma(resampledTcurves[2]); ! ! cmsFreeGamma(reversedTcurves[0]); ! cmsFreeGamma(reversedTcurves[1]); ! cmsFreeGamma(reversedTcurves[2]); QString mess = tr("Calibration file ") + (QString) calfile + tr(" has been created."); --- 5635,5649 ---- // Free the memory for the gamma tables. ! cmsFreeGamma(gCurves[0]); ! cmsFreeGamma(gCurves[1]); ! cmsFreeGamma(gCurves[2]); ! ! cmsFreeSampledCurve(curves[0]); ! cmsFreeSampledCurve(curves[1]); ! cmsFreeSampledCurve(curves[2]); ! ! cmsFreeSampledCurve(resampledCurves[0]); ! cmsFreeSampledCurve(resampledCurves[1]); ! cmsFreeSampledCurve(resampledCurves[2]); QString mess = tr("Calibration file ") + (QString) calfile + tr(" has been created."); *************** *** 5780,5787 **** break; case opSetBlackPoint: ! // setVCGammaLinear(); setupConversionProfiles(); setDisplayBP(); ! // restoreVCGamma(); freeConversionProfiles(); break; --- 5733,5740 ---- break; case opSetBlackPoint: ! setVCGammaLinear(); setupConversionProfiles(); setDisplayBP(); ! restoreVCGamma(); freeConversionProfiles(); break; *************** *** 6049,6054 **** /* Normalised XYZ white point */ white[0] = locusXYZ[size - 1].X/locusXYZ[size - 1].Y; - white[1] = locusXYZ[size - 1].Y/locusXYZ[size - 1].Y; white[2] = locusXYZ[size - 1].Z/locusXYZ[size - 1].Y; /* White point chromaticity coordinates */ --- 6002,6007 ---- /* Normalised XYZ white point */ white[0] = locusXYZ[size - 1].X/locusXYZ[size - 1].Y; white[2] = locusXYZ[size - 1].Z/locusXYZ[size - 1].Y; + white[1] = locusXYZ[size - 1].Y/locusXYZ[size - 1].Y; /* White point chromaticity coordinates */ *************** *** 6089,6093 **** rgb = (int) (((double) i) * 15.875); ! Delta_E_lines[i] = tr(QString("At RGB= %1 DE to locus = %2\n")).arg(rgb).arg(DeltaE(locusXYZ[i],targetXYZ) , 0, 'f', 2); } QMessageBox::information( this, tr("Display Calibration Report"), --- 6042,6046 ---- rgb = (int) (((double) i) * 15.875); ! Delta_E_lines[i] = tr(QString("At RGB= %1 DE to locus = %2\n")).arg(rgb).arg(DeltaE(locusXYZ[i],targetXYZ) , 0, 'f', 4); } QMessageBox::information( this, tr("Display Calibration Report"), |
|
From: Hal E. <hv...@us...> - 2008-02-22 22:18:28
|
Update of /cvsroot/lprof/lprof/src/moncalqt In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv17248 Modified Files: monitorcal.cpp Log Message: Updates to instrument calibration code. This should be more robust but I don't know if it will fix EyeOne Pro issues since I can't test this. Index: monitorcal.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalqt/monitorcal.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** monitorcal.cpp 19 Feb 2008 21:02:49 -0000 1.56 --- monitorcal.cpp 22 Feb 2008 22:18:22 -0000 1.57 *************** *** 1,5 **** // $Id$ // Little cms Profiler ! // Copyright (C) 2007 Hal Engel // // THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, --- 1,6 ---- // $Id$ + // // Little cms Profiler ! // Copyright (C) 2007 - 2008 Hal Engel [...9896 lines suppressed...] } void MonitorCal::setVCGammaLinear() { ! orig_gammaRamp -> setLinearGammaRamp(); } *************** *** 6147,6151 **** { QString path = get_global_help_path()->local8Bit() + "/monmeasurement.html"; ! // qDebug(path); getHelp()->openAssistant (); getHelp()->showPage(path); --- 6123,6127 ---- { QString path = get_global_help_path()->local8Bit() + "/monmeasurement.html"; ! // qDebug(path); getHelp()->openAssistant (); getHelp()->showPage(path); |
|
From: Hal E. <hv...@us...> - 2008-02-22 00:35:37
|
Update of /cvsroot/lprof/lprof In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv28197 Modified Files: README Log Message: Minor updates and additions to README to reflect the current state of LProf. Index: README =================================================================== RCS file: /cvsroot/lprof/lprof/README,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** README 19 Feb 2008 21:01:10 -0000 1.20 --- README 22 Feb 2008 00:35:30 -0000 1.21 *************** *** 21,28 **** LGPL license version 2 or 3 or some less restrictive license. These include: ! ArgyllCMS - GPLv3 license. ArgyllCMS has been modified for use in LProf ! see src/argyll/argyll-mods.txt for a list of which files are ! modified. All modifications are surrounded by /* lprof */ ! comments in the source code. solvopt - Is redistributed in LProf under GPLv2 by permission of it's authors. --- 21,25 ---- LGPL license version 2 or 3 or some less restrictive license. These include: ! ArgyllCMS - GPLv3 license. solvopt - Is redistributed in LProf under GPLv2 by permission of it's authors. *************** *** 31,49 **** uses the MIT license. See src/lcms/COPYING for details. - qwt - Uses the qwt license which is derived from LGPL. See src/qwt/COPYING - for details. - The above are all statically linked into LProf. ! For any binary version of LProf distributed after version 1.11.4.x a ! tarball containing the sources of all non-compiler runtime libraries included in ! the installation binary will be made available on the LProf download page for as ! long as that binary version is also available on that page. By installing the ! binary users are acknowledging that they have been notified of the existence of ! this source code tarball and by not downloading a copy of the tarball they are ! waiving any rights granted under the GPL license to get that specific version of ! the source code. ! This is the 5th. public release the profilers. It has not been tested extensively, so is possible some bugs still exist. If so, sorry for the inconvenience, and please feel free to submit --- 28,44 ---- uses the MIT license. See src/lcms/COPYING for details. The above are all statically linked into LProf. ! For any binary version of LProf distributed after version 1.11.4.x a ! tarball containing the sources of all non-compiler runtime libraries ! included in the installation binary will be made available on the LProf ! download page for as long as that binary version is also available on ! that page. By installing the binary users are acknowledging that they ! have been notified of the existence of this source code tarball and by ! not downloading a copy of the tarball they are waiving any rights ! granted under the GPL license to get that specific version of the ! source code. ! This is the 5th. public release of the profilers. It has not been tested extensively, so is possible some bugs still exist. If so, sorry for the inconvenience, and please feel free to submit *************** *** 68,72 **** In order to build and execute the LProf, you will need: ! - Trolltech's Qt installed (www.trolltech.com), version 4.2.0 or newer. some Linux distros separate Qt into several packages, in which case you'll need the core library -dev package as well as the -dev packages for --- 63,67 ---- In order to build and execute the LProf, you will need: ! - Trolltech's Qt installed (www.trolltech.com), version 4.3.0 or newer. some Linux distros separate Qt into several packages, in which case you'll need the core library -dev package as well as the -dev packages for *************** *** 77,81 **** - GNU C compiler gcc or equivalent installed. lprof is primarily tested with gcc ! 4.x . - MinGW and msys on a Windows system is required in order to build Qt, VIGRA --- 72,76 ---- - GNU C compiler gcc or equivalent installed. lprof is primarily tested with gcc ! 4.x but will likely build and run if you use gcc 3.4.x. - MinGW and msys on a Windows system is required in order to build Qt, VIGRA *************** *** 83,87 **** a build environement using this tool set. ! - Python 1.53 or higher to be able to run SCons on Linux, Unix and OS/X - VIGRA 1.30 or later available here --- 78,83 ---- a build environement using this tool set. ! - Python 1.53 or higher to be able to run SCons on Windows Linux, Unix and ! OS/X - VIGRA 1.30 or later available here *************** *** 106,119 **** Other supported targets include: ! Hutch Color Target (tm) ! ColorChecker (tm) 24 patch target ! ColorChecker DC (tm) ! ColorChecker SG (tm) ! EyeOne Scanner 1.4 (tm) target In order to do hardware measured profiling and calibration of your displays you will need a supported color meter or spectrophotometer. The software at this point has only been tested with a X-Rite EyeOne ! Display LT but should work with the following meters: X-Rite EyeOne Display --- 102,117 ---- Other supported targets include: ! Hutch Color Target (tm) ! ColorChecker (tm) 24 patch target ! ColorChecker DC (tm) ! ColorChecker SG (tm) ! EyeOne Scanner 1.4 (tm) target ! DigitaT TargeT 003 In order to do hardware measured profiling and calibration of your displays you will need a supported color meter or spectrophotometer. The software at this point has only been tested with a X-Rite EyeOne ! Display LT, X-Rite/Pantone Huey and ColorVision Spyder 2 but should ! work with the following meters: X-Rite EyeOne Display *************** *** 165,168 **** --- 163,169 ---- local copy of scons in the source tarball. This is to insure that users are building with a known good version of SCons. + + The LProf scons build now uses the qt4 tool and this needs to have the + PKG_CONFIG_PATH environment variable set on Linux/Unix/BSD machine. Unpack the tarball or if you are going to use a copy from CVS you must also *************** *** 198,202 **** by "scons install" (into PREFIX). ! Running scons will build four executable files which will end up in the build directory for whatever platform you are building on. For example on Linux the executables will be created in: --- 199,203 ---- by "scons install" (into PREFIX). ! Running scons will build three executable files which will end up in the build directory for whatever platform you are building on. For example on Linux the executables will be created in: *************** *** 209,214 **** qtprofilechecker) into a single fully integrated piece of software. icc2it8 is also part of version 1.11 and is unchanged from earlier ! versions. Two additional utilities were added after version 1.11.4.x ! and these are for internal use by LProf. LProf SCons Command Line Arguments --- 210,215 ---- qtprofilechecker) into a single fully integrated piece of software. icc2it8 is also part of version 1.11 and is unchanged from earlier ! versions. The third utility was added after version 1.11.4.x ! and is for internal use by LProf. LProf SCons Command Line Arguments *************** *** 224,232 **** is it will be added to a list of directories where QT is commonly installed and it will then check that list of directories ! for a valid QT installation. ! If QTDIR is set on the command line: ! $ python scons.py QTDIR=/some/directory The build scripts will check to see if a valid QT installation is --- 225,235 ---- is it will be added to a list of directories where QT is commonly installed and it will then check that list of directories ! for a valid QT installation. On some installations QTDIR is either ! unset or points at the Qt3 installation. This can be over riden ! by the LProf scons build. ! To over ride QTDIR during the LProf build use: ! $ python scons.py qt_directory=/some/directory The build scripts will check to see if a valid QT installation is *************** *** 290,295 **** Where n is the number of source files to sent to the compiler at ! any given time. Optimum value for n is the number of processors ! plus one. Installing new target reference files --- 293,298 ---- Where n is the number of source files to sent to the compiler at ! any given time. Optimum value for n is likely the number of ! processors plus one. Installing new target reference files *************** *** 308,320 **** It is currently possible to generate the translation files. To begin translating LProf first add the ISO language code for the language you want to translate to ! translations/languages. Then run scons. This will cause the translation engine ! to parse the source code for translatable strings and will create a ! translations/lprof_<ISO lanaguage code>.ts file for each language listed in the ! translations/languages file. At that point you can use any number of tools ! including Qt's translation tool linguist to add your translations ! to the translations/lprof_<ISO lanaguage code>.ts file. Running scons again ! will generate the qm files that LProf will use when loading its translations. ! Developers should note that it is not necessary to ship the qm files or store ! them in CVS; they can be generated as part of the build process. Final notes --- 311,323 ---- It is currently possible to generate the translation files. To begin translating LProf first add the ISO language code for the language you want to translate to ! translations/languages. Then run createtrans.sh in the root of the source tree. ! This will cause the translation engine to parse the source code for translatable ! strings and will create a translations/lprof_<ISO lanaguage code>.ts file for ! each language listed in the translations/languages file. At that point you can ! use any number of tools including Qt's translation tool linguist to add your ! translations to the translations/lprof_<ISO lanaguage code>.ts file. Running ! scons will generate the qm files that LProf will use when loading its ! translations. Developers should note that it is not necessary to ship the qm ! files or store them in CVS; they are be generated as part of the build process. Final notes |
|
From: Hal E. <hv...@us...> - 2008-02-22 00:17:49
|
Update of /cvsroot/lprof/lprof In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21032 Modified Files: Windows-mingw.txt Log Message: Added information about NSIS files and creating a Windows binary installer. Index: Windows-mingw.txt =================================================================== RCS file: /cvsroot/lprof/lprof/Windows-mingw.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Windows-mingw.txt 19 Feb 2008 21:01:20 -0000 1.5 --- Windows-mingw.txt 22 Feb 2008 00:17:45 -0000 1.6 *************** *** 1,6 **** Building LProf using MinGW on Windows - **WARNING** Early qt4 ports are untested on win32. **/WARNING** - Getting needed libraries: --- 1,4 ---- *************** *** 124,125 **** --- 122,159 ---- As an option msys/1.0/bin should be in your path if you are using msys + + NSIS + + NSIS is used to create a binary installer for LProf. There are a number of NSIS + files located in the root of the LProf source tree. The base file is lprof.nsi. + + These files assume that lprof is built in the default locate which is build/win32 + on a Windows system. It also assumes that there is a directory named + build/win32/extern that contains all of the needed libraries and other external + executables. You will need to create this by hand and it needs to have the + following files: + + From the Qt4 bin directory: + + Qt3Support4.dll + QtNetwork4.dll + assistant.exe + QtAssistantClient4.dll + QtSql4.dll + mingwm10.dll + QtCore4.dll + QtSvg4.dll + QtGui4.dll + QtXml4.dll + + From other places: + + libtiff3.dll + libusb0.dll + jpeg62.dll + libpng13.dll + zlib1.dll + + Once this is setup you can just compile lprof.nsi with the NSIS compiler and it + will create a Windows binary installer for LProf. + |
|
From: Hal E. <hv...@us...> - 2008-02-22 00:16:23
|
Update of /cvsroot/lprof/lprof/src/lprofqt In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20573/src/lprofqt Modified Files: lprofmain.cpp main.h Log Message: Improved how measurement devices are listed in the calibration and measurement wizard. Also improved error checking and messages when user selects an invalid device (missing firmware or wrong device type or no device installed). Index: lprofmain.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain.cpp,v retrieving revision 1.181 retrieving revision 1.182 diff -C2 -d -r1.181 -r1.182 *** lprofmain.cpp 21 Feb 2008 22:14:53 -0000 1.181 --- lprofmain.cpp 22 Feb 2008 00:16:16 -0000 1.182 *************** *** 100,103 **** --- 100,104 ---- #include <qvalidator.h> #include <qregexp.h> + #include <QTranslator> #include "ui_lprofmainbase.h" *************** *** 217,249 **** void CheckType(instCapClass instCap, instData &instD) { ! if (instCap == emission && ! (instD.Inst == instDTP92 || ! instD.Inst == instDTP94 || ! instD.Inst == instSpectrolino || ! instD.Inst == instI1Display || ! instD.Inst == instI1Pro || ! instD.Inst == instHCFR || ! instD.Inst == instSpyder2 || ! instD.Inst == instHuey || ! instD.Inst == instSpectrocam)) ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); ! else if (instCap == reflective && ! (instD.Inst == instDTP20 || ! instD.Inst == instDTP22 || ! instD.Inst == instDTP41 || ! instD.Inst == instDTP51 || ! instD.Inst == instSpectrolino || ! instD.Inst == instSpectroScan || ! instD.Inst == instSpectroScanT || ! instD.Inst == instSpectrocam || ! instD.Inst == instI1Pro)) ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); ! else if (instCap == all && instD.Inst != instUnknown) ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); else { ! instD.name = instD.port + " - Not installed or wrong type"; ! instD.Inst = instUnknown; ! } } --- 218,273 ---- void CheckType(instCapClass instCap, instData &instD) { ! if (instD.Inst != instUnknown) ! { ! if (instCap == emission) ! { ! if (instD.Inst == instDTP92 || ! instD.Inst == instDTP94 || ! instD.Inst == instSpectrolino || ! instD.Inst == instI1Display || ! instD.Inst == instI1Pro || ! instD.Inst == instHCFR || ! instD.Inst == instSpyder2 || ! instD.Inst == instHuey || ! instD.Inst == instSpectrocam) ! { ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); ! } ! else ! { ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)) + QTranslator::tr(" - Wrong type"); ! instD.deviceFlag = wrongType; ! } ! } ! else if (instCap == reflective) ! { ! if (instD.Inst == instDTP20 || ! instD.Inst == instDTP22 || ! instD.Inst == instDTP41 || ! instD.Inst == instDTP51 || ! instD.Inst == instSpectrolino || ! instD.Inst == instSpectroScan || ! instD.Inst == instSpectroScanT || ! instD.Inst == instSpectrocam || ! instD.Inst == instI1Pro) ! { ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); ! } ! else ! { ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)) + QTranslator::tr(" - Wrong type"); ! instD.deviceFlag = wrongType; ! } ! } ! else if (instCap == all) ! instD.name = instD.port + " " + QString (inst_name(instD.Inst)); ! } else { ! instD.name = instD.port + QTranslator::tr(" - Not installed"); ! instD.deviceFlag = noDevice; ! } ! if (instD.deviceFlag == missingFirmware) ! instD.name = instD.name + QTranslator::tr(" Firmware missing! Device disabled."); } *************** *** 292,298 **** --- 316,327 ---- instName = temp.mid(start, end - start); port = temp.mid(0, start -1); + instlist[i].deviceFlag = OK; if ((coms -> paths[i]-> dev != NULL) || (port.left(3) == "hid")) { // USB device // qDebug(port + " " + instName); + instlist[i].port = port; + instlist[i].position = i; + instlist[i].dupType = FALSE; + instlist[i].Inst = coms -> paths[i]-> itype; if (instName == "ColorVision Spyder2") { *************** *** 302,320 **** // Device will not work. spyd2FirmwareOK = FALSE; ! number = number - 1; ! for (int k=0; k<20; k++) ! instlist[k].listSize = number; } } ! if (instName != "ColorVision Spyder2" || ! (instName == "ColorVision Spyder2" && spyd2FirmwareOK)) ! { ! // Add device to list ! instlist[i].port = port; ! instlist[i].position = i; ! instlist[i].dupType = FALSE; ! instlist[i].Inst = coms -> paths[i]-> itype; ! CheckType(instCap, instlist[i]); ! } } else --- 331,338 ---- // Device will not work. spyd2FirmwareOK = FALSE; ! instlist[i].deviceFlag = missingFirmware; } } ! CheckType(instCap, instlist[i]); } else *************** *** 324,327 **** --- 342,346 ---- instlist[i].dupType = FALSE; count = sys.hdr.validPorts; + instlist[i].deviceFlag = noDevice; for (int j=0; j < count; j++) { *************** *** 330,333 **** --- 349,353 ---- instlist[i].Inst = sys.hdr.instArray[j].inst; instlist[i].port = port; + instlist[i].deviceFlag = OK; CheckType(instCap, instlist[i]); break; Index: main.h =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/main.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** main.h 19 Feb 2008 21:02:47 -0000 1.11 --- main.h 22 Feb 2008 00:16:17 -0000 1.12 *************** *** 49,52 **** --- 49,60 ---- extern QApplication *lprofApp; + enum instFlags + { + OK, + missingFirmware, + wrongType, + noDevice + }; + struct instData { *************** *** 54,57 **** --- 62,66 ---- QString name; QString port; + instFlags deviceFlag; // used to flag things like missing int position; bool dupType; |