[Lprof-devel] lprof/src/lprofqt lprofmainbase.ui,1.4,1.5 lprofmain.h,1.6,1.7 lprofmain.cpp,1.18,1.19
Brought to you by:
hvengel
|
From: Hal E. <hv...@us...> - 2005-11-26 20:45:13
|
Update of /cvsroot/lprof/lprof/src/lprofqt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20246/src/lprofqt Modified Files: lprofmainbase.ui lprofmain.h lprofmain.cpp Log Message: Request #1367128 Gray Create Profile button. I moved the create profile button, progress bar and profile file name widgets onto the tabs so that these only appear on the monitor profiler and camera/scanner profiler tabs. This give better user context as these widgets are only available when it is valid to use them. Index: lprofmain.cpp =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** lprofmain.cpp 8 Nov 2005 19:18:48 -0000 1.18 --- lprofmain.cpp 26 Nov 2005 20:45:06 -0000 1.19 *************** *** 227,241 **** } - static int Gauger(const char *Label, int nMin, int nMax, int Pos) { // qDebug("Gauger"); ! if (nMin < 0 && nMax < 0) { ! return 1; } ! ProgBar -> setTotalSteps(nMax); ! ProgBar -> setProgress(Pos); ! ! return 1; } --- 227,242 ---- } static int Gauger(const char *Label, int nMin, int nMax, int Pos) { // qDebug("Gauger"); ! if (nMin < 0 && nMax < 0) ! { ! return 1; ! } ! ! ProgBar -> setTotalSteps(nMax); ! ProgBar -> setProgress(Pos); ! return 1; } *************** *** 1036,1039 **** --- 1037,1051 ---- TheGoButton -> repaint(); } + + void lprofMain::SetGoButton_2(const char* Caption, BOOL lEnable) + { + // qDebug("lprofMain::SetGoButton"); + QToolTip::remove( TheGoButton_2 ); + QToolTip::add( TheGoButton_2, Caption ); + + TheGoButton_2 -> setEnabled(TRUE); + TheGoButton_2 -> setEnabled(lEnable); + TheGoButton_2 -> repaint(); + } void lprofMain::SetOutputFile( const QString OutputFile ) *************** *** 1041,1044 **** --- 1053,1057 ---- // qDebug("lprofMain::SetOutputFile"); OutputFileEdit -> setText(OutputFile); + OutputFileEdit_2 -> setText(OutputFile); } *************** *** 1100,1104 **** Console = ProgressConsole; ! ProgBar = ProgressBar; // Init the lcmsx engine, this always does success --- 1113,1118 ---- Console = ProgressConsole; ! // ProgBar = ProgressBar; ! // ProgBar_2 = ProgressBar_2; // Init the lcmsx engine, this always does success *************** *** 1158,1161 **** --- 1172,1176 ---- // qDebug("lprofMain::DoScannerProfile"); Console -> setText(""); + ProgBar = ProgressBar; Gauger("Init...", 0, 100, 0); *************** *** 1194,1197 **** --- 1209,1213 ---- // qDebug("lprofMain::DoMonitorProfile"); Console -> setText(""); + ProgBar = ProgressBar_2; Gauger("Init...", 0, 100, 0); *************** *** 1254,1258 **** switch (TabProfiler -> currentPageIndex()) { ! case 0: if (TargetSelector -> getFilename() == QString::null) SetGoButton("You still have to select the target reference file", FALSE); else --- 1270,1275 ---- switch (TabProfiler -> currentPageIndex()) { ! case 0: if (!OutputFileEdit -> text() == QString::null) OutputFileEdit_2 -> setText(OutputFileEdit -> text()); ! if (TargetSelector -> getFilename() == QString::null) SetGoButton("You still have to select the target reference file", FALSE); else *************** *** 1265,1283 **** SetGoButton("Ready to GO!", TRUE); break; ! case 1: if (RadioCoarse->isChecked()&&OutputFileEdit -> text() == "") SetGoButton("You need to specify output profile!", FALSE); else if (RadioCoarse->isChecked()) if (monitorValues.items.valid_mon) ! SetGoButton("Ready to GO!", TRUE); else ! SetGoButton("You need to enter monitor values.", FALSE); else ! if (RadioAccurate->isChecked()&&MonMeasurementSheet->getFilename()=="") SetGoButton("You need to specify a measurement sheet!", FALSE); else ! SetGoButton("Ready to GO!", TRUE); break; ! default:; // if not on a profileing tab then fall through } } --- 1282,1302 ---- SetGoButton("Ready to GO!", TRUE); break; ! case 1: if (!OutputFileEdit_2 -> text() == QString::null) OutputFileEdit -> setText(OutputFileEdit_2 -> text()); ! if (RadioCoarse->isChecked()&&OutputFileEdit -> text() == "") SetGoButton("You need to specify output profile!", FALSE); else if (RadioCoarse->isChecked()) if (monitorValues.items.valid_mon) ! SetGoButton_2("Ready to GO!", TRUE); else ! SetGoButton_2("You need to enter monitor values.", FALSE); else ! if (RadioAccurate->isChecked()&&MonMeasurementSheet->getFilename()=="") SetGoButton_2("You need to specify a measurement sheet!", FALSE); else ! SetGoButton_2("Ready to GO!", TRUE); break; ! default:; // if not on a profileing tab then do nothing ! } } *************** *** 1292,1296 **** case 0: DoScannerProfile(); break; case 1: DoMonitorProfile(); break; ! default:; // if not on a profiling tab do nothing } --- 1311,1315 ---- case 0: DoScannerProfile(); break; case 1: DoMonitorProfile(); break; ! default:; // if not on a profiling tab do nothing } Index: lprofmainbase.ui =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmainbase.ui,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lprofmainbase.ui 17 Oct 2005 23:29:19 -0000 1.4 --- lprofmainbase.ui 26 Nov 2005 20:45:06 -0000 1.5 *************** *** 10,15 **** <x>0</x> <y>0</y> ! <width>998</width> ! <height>700</height> </rect> </property> --- 10,15 ---- <x>0</x> <y>0</y> ! <width>1010</width> [...1030 lines suppressed...] + <slot>slotIsAllReady()</slot> + </connection> + <connection> + <sender>OutputFileSelBtn_2</sender> + <signal>clicked()</signal> + <receiver>lprofMainBase</receiver> + <slot>slotSelectOutputFile()</slot> + </connection> + <connection> + <sender>pushButtonHelp_3</sender> + <signal>clicked()</signal> + <receiver>lprofMainBase</receiver> + <slot>slotHelpButton()</slot> + </connection> </connections> + <includes> + <include location="local" impldecl="in implementation">lprofmainbase.ui.h</include> + </includes> <slots> <slot>slotChangeStrategy()</slot> Index: lprofmain.h =================================================================== RCS file: /cvsroot/lprof/lprof/src/lprofqt/lprofmain.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lprofmain.h 8 Nov 2005 19:18:48 -0000 1.6 --- lprofmain.h 26 Nov 2005 20:45:06 -0000 1.7 *************** *** 332,337 **** virtual void slotTargetRefChanged(); ! ! FigureEditor* FigEditor; QAssistantClient *help; --- 332,336 ---- virtual void slotTargetRefChanged(); ! FigureEditor* FigEditor; QAssistantClient *help; *************** *** 390,393 **** --- 389,393 ---- void init_measurement_tool(); void SetGoButton(const char* Caption, BOOL lEnable); + void SetGoButton_2(const char* Caption, BOOL lEnable); void DoScannerProfile(); void slotSelSheet(); |