[Lprof-devel] lprof/src/moncalcontrolqt moncalcontrol.cpp, 1.37.2.3, 1.37.2.4 moncalreports.cpp, 1.
Brought to you by:
hvengel
From: Amit K. <ami...@us...> - 2009-07-05 22:05:20
|
Update of /cvsroot/lprof/lprof/src/moncalcontrolqt In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22902/moncalcontrolqt Modified Files: Tag: GSoC-2009 moncalcontrol.cpp moncalreports.cpp Log Message: Index: moncalcontrol.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalcontrolqt/moncalcontrol.cpp,v retrieving revision 1.37.2.3 retrieving revision 1.37.2.4 diff -C2 -d -r1.37.2.3 -r1.37.2.4 *** moncalcontrol.cpp 3 Jul 2009 16:10:56 -0000 1.37.2.3 --- moncalcontrol.cpp 5 Jul 2009 22:05:17 -0000 1.37.2.4 *************** *** 38,42 **** #include "main.h" - #include <q3textedit.h> #include <qradiobutton.h> #include <qpixmap.h> --- 38,41 ---- *************** *** 48,55 **** #include <qstring.h> #include <qpushbutton.h> - #include <q3buttongroup.h> #include <qtimer.h> #include <qmutex.h> - #include <q3filedialog.h> #include <qfileinfo.h> #include <qthread.h> --- 47,52 ---- *************** *** 256,260 **** char instName[64]; ! strcpy(instName, cd.data.selectedInst.name.local8Bit()); cd.data.selectedInst.Inst = inst_enum(instName); --- 253,257 ---- char instName[64]; ! strcpy(instName, cd.data.selectedInst.name.toLocal8Bit()); cd.data.selectedInst.Inst = inst_enum(instName); *************** *** 360,408 **** { // qDebug("controlsToValues()"); ! if (LCDradioButton -> isOn()) cd.data.disp = LCD; else cd.data.disp = CRT; ! if (k6500 -> isOn()) { cd.data.wp = 6500.0; } ! else if (k5000 -> isOn()) { cd.data.wp = 5000.0; } ! else if (native -> isOn()) { cd.data.wp = 0.0; } ! else if ( tempUser -> isOn()) cd.data.wp = spinBoxTempUser -> value(); else qDebug("whitePoint is not being correctly set"); ! if (nativeBrightness -> isOn()) cd.data.displayBr=0.0; else cd.data.displayBr = (double) spinBoxBrightness -> value(); ! if (sampleSmall -> isOn()) cd.data.size = smallest; ! else if (sampleMedium -> isOn()) cd.data.size = medium; ! else if (sampleLarge -> isOn()) cd.data.size = large; ! else if (sampleHuge -> isOn()) cd.data.size = huge; ! if (radioButtonGammaUser -> isOn()) cd.data.gamma = userGamma -> value(); ! else if (radioButtonGamma1_8 -> isOn()) cd.data.gamma = 1.8; else cd.data.gamma = 2.2; ! if (radioGammasRGB -> isOn()) cd.data.gammaType = gtsRGB; ! else if (radioButtonLstar -> isOn()) cd.data.gammaType = gtLstar; else --- 357,405 ---- { // qDebug("controlsToValues()"); ! if (LCDradioButton -> isChecked()) cd.data.disp = LCD; else cd.data.disp = CRT; ! if (k6500 -> isChecked()) { cd.data.wp = 6500.0; } ! else if (k5000 -> isChecked()) { cd.data.wp = 5000.0; } ! else if (native -> isChecked()) { cd.data.wp = 0.0; } ! else if ( tempUser -> isChecked()) cd.data.wp = spinBoxTempUser -> value(); else qDebug("whitePoint is not being correctly set"); ! if (nativeBrightness -> isChecked()) cd.data.displayBr=0.0; else cd.data.displayBr = (double) spinBoxBrightness -> value(); ! if (sampleSmall -> isChecked()) cd.data.size = smallest; ! else if (sampleMedium -> isChecked()) cd.data.size = medium; ! else if (sampleLarge -> isChecked()) cd.data.size = large; ! else if (sampleHuge -> isChecked()) cd.data.size = huge; ! if (radioButtonGammaUser -> isChecked()) cd.data.gamma = userGamma -> value(); ! else if (radioButtonGamma1_8 -> isChecked()) cd.data.gamma = 1.8; else cd.data.gamma = 2.2; ! if (radioGammasRGB -> isChecked()) cd.data.gammaType = gtsRGB; ! else if (radioButtonLstar -> isChecked()) cd.data.gammaType = gtLstar; else *************** *** 410,414 **** mutex.lock(); ! cd.data.selectedInst = listedInsts[comboBoxInstruments -> currentItem()]; mutex.unlock(); --- 407,411 ---- mutex.lock(); ! cd.data.selectedInst = listedInsts[comboBoxInstruments -> currentIndex()]; mutex.unlock(); *************** *** 441,445 **** if (reportOP != noOp) { ! if (listedInsts[comboBoxInstruments -> currentItem()].Inst != instUnknown) { if (reportOP == opAmbient) --- 438,442 ---- if (reportOP != noOp) { ! if (listedInsts[comboBoxInstruments -> currentIndex()].Inst != instUnknown) { if (reportOP == opAmbient) *************** *** 467,477 **** void MonitorCalControl::slotControls() { ! if (setBlackPoint -> isOn()) cd.data.op = opSetBlackPoint; ! else if (setWhitePoint -> isOn()) cd.data.op = opSetWhitePoint; ! else if (setBlackLevel -> isOn()) cd.data.op = opSetBlackLevel; ! else if (setWhiteLevel -> isOn()) cd.data.op = opSetWhiteLevel; else qDebug("Operation not yet setup - moncalcontrol"); --- 464,474 ---- void MonitorCalControl::slotControls() { ! if (setBlackPoint -> isChecked()) cd.data.op = opSetBlackPoint; ! else if (setWhitePoint -> isChecked()) cd.data.op = opSetWhitePoint; ! else if (setBlackLevel -> isChecked()) cd.data.op = opSetBlackLevel; ! else if (setWhiteLevel -> isChecked()) cd.data.op = opSetWhiteLevel; else qDebug("Operation not yet setup - moncalcontrol"); *************** *** 482,494 **** void MonitorCalControl::slotUserTemp() { ! spinBoxTempUser -> setEnabled(tempUser -> isOn()); } void MonitorCalControl::slotUserGamma() { ! if (radioButtonGenericGamma -> isOn()) { buttonGroupGamma -> setEnabled(TRUE); ! userGamma -> setEnabled(radioButtonGammaUser -> isOn()); } else --- 479,491 ---- void MonitorCalControl::slotUserTemp() { ! spinBoxTempUser -> setEnabled(tempUser -> isChecked()); } void MonitorCalControl::slotUserGamma() { ! if (radioButtonGenericGamma -> isChecked()) { buttonGroupGamma -> setEnabled(TRUE); ! userGamma -> setEnabled(radioButtonGammaUser -> isChecked()); } else *************** *** 502,519 **** { // qDebug("slotUserLuninosity()"); ! spinBoxBrightness -> setEnabled(specifiedBrightness -> isOn()); ! setWhiteLevel -> setEnabled(specifiedBrightness -> isOn()); } void MonitorCalControl::slotDisplayType() { ! setBlackLevel -> setEnabled(CRTradioButton -> isOn()); } void MonitorCalControl::slotGo() { ! qDebug("inst type = %i", listedInsts[comboBoxInstruments -> currentItem()].Inst); ! if (// listedInsts[comboBoxInstruments -> currentItem()].Inst != instUnknown && ! listedInsts[comboBoxInstruments -> currentItem()].deviceFlag == OK) { instUpdate = FALSE; --- 499,516 ---- { // qDebug("slotUserLuninosity()"); ! spinBoxBrightness -> setEnabled(specifiedBrightness -> isChecked()); ! setWhiteLevel -> setEnabled(specifiedBrightness -> isChecked()); } void MonitorCalControl::slotDisplayType() { ! setBlackLevel -> setEnabled(CRTradioButton -> isChecked()); } void MonitorCalControl::slotGo() { ! qDebug("inst type = %i", listedInsts[comboBoxInstruments -> currentIndex()].Inst); ! if (// listedInsts[comboBoxInstruments -> currentIndex()].Inst != instUnknown && ! listedInsts[comboBoxInstruments -> currentIndex()].deviceFlag == OK) { instUpdate = FALSE; *************** *** 602,606 **** currPos = 0; else if (comboBoxInstruments -> count() > 0) ! currPos = comboBoxInstruments -> currentItem(); else currPos = 0; --- 599,603 ---- currPos = 0; else if (comboBoxInstruments -> count() > 0) ! currPos = comboBoxInstruments -> currentIndex(); else currPos = 0; *************** *** 617,621 **** while (i < listedInsts[0].listSize && !changed) { ! comboBoxInstruments -> setCurrentItem(i); if (listedInsts[i].name != comboBoxInstruments -> currentText()) changed = true; --- 614,618 ---- while (i < listedInsts[0].listSize && !changed) { ! comboBoxInstruments -> setCurrentIndex(i); if (listedInsts[i].name != comboBoxInstruments -> currentText()) changed = true; *************** *** 623,627 **** } // restore position in combobox ! comboBoxInstruments -> setCurrentItem(currPos); } else // size is different so it must have changed --- 620,624 ---- } // restore position in combobox ! comboBoxInstruments -> setCurrentIndex(currPos); } else // size is different so it must have changed *************** *** 634,638 **** for (int i=0; i < listedInsts[0].listSize; i++) { ! comboBoxInstruments -> insertItem(listedInsts[i].name); } if (!spyd2FirmwareOK) --- 631,635 ---- for (int i=0; i < listedInsts[0].listSize; i++) { ! comboBoxInstruments -> insertItem((comboBoxInstruments->count() + 1), listedInsts[i].name); } if (!spyd2FirmwareOK) *************** *** 654,658 **** mutex.unlock(); instUpdate = TRUE; ! int i = timer->start( 1000, TRUE ); } else --- 651,658 ---- mutex.unlock(); instUpdate = TRUE; ! //int i = timer->start( 1000, TRUE ); ! timer->setSingleShot(TRUE); ! timer->start(1000); ! int i = timer->timerId(); } else *************** *** 662,666 **** MonitorCalControl::MonitorCalControl(QWidget *parent ) ! : QWizard(parent, Qt::WStyle_SysMenu | Qt::WStyle_MinMax | Qt::WStyle_Title) { setupUi(this); --- 662,666 ---- MonitorCalControl::MonitorCalControl(QWidget *parent ) ! : QWizard(parent, Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowTitleHint) { setupUi(this); Index: moncalreports.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/moncalcontrolqt/moncalreports.cpp,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** moncalreports.cpp 18 May 2009 21:17:17 -0000 1.4 --- moncalreports.cpp 5 Jul 2009 22:05:17 -0000 1.4.2.1 *************** *** 36,40 **** MonitorCalReports::MonitorCalReports(QWidget *parent ) ! : QDialog(parent, "", 0, Qt::WindowSystemMenuHint) { setupUi(this); --- 36,40 ---- MonitorCalReports::MonitorCalReports(QWidget *parent ) ! : QDialog(parent, Qt::WindowSystemMenuHint) { setupUi(this); *************** *** 52,62 **** void MonitorCalReports::slotReport() { ! if (checkCal -> isOn()) reportOP = opCalReport; ! else if (reportUncalibrated -> isOn()) reportOP = opUncalReport; ! else if (BigCalibrationReport -> isOn()) reportOP = opBigCalReport; ! else if (ambientReport -> isOn()) reportOP = opAmbient; else qDebug("Operation not yet setup - moncalreports"); --- 52,62 ---- void MonitorCalReports::slotReport() { ! if (checkCal -> isChecked()) reportOP = opCalReport; ! else if (reportUncalibrated -> isChecked()) reportOP = opUncalReport; ! else if (BigCalibrationReport -> isChecked()) reportOP = opBigCalReport; ! else if (ambientReport -> isChecked()) reportOP = opAmbient; else qDebug("Operation not yet setup - moncalreports"); |