diff --git a/slsDetectorGui/forms/form_detectormain.ui b/slsDetectorGui/forms/form_detectormain.ui index e7aedd325..9d3577730 100644 --- a/slsDetectorGui/forms/form_detectormain.ui +++ b/slsDetectorGui/forms/form_detectormain.ui @@ -232,6 +232,11 @@ + + + + + @@ -380,7 +385,7 @@ p, li { white-space: pre-wrap; } - &Open Setup + Load &Setup @@ -388,7 +393,7 @@ p, li { white-space: pre-wrap; } - &Save Setup + Save &Setup @@ -401,12 +406,12 @@ p, li { white-space: pre-wrap; } - &Open Configuration + Load &Configuration - &Save Configuration + Save &Configuration @@ -481,6 +486,26 @@ p, li { white-space: pre-wrap; } &Dockable Windows + + + Load &Trimbits + + + + + Save &Trimbits + + + + + Load C&alibration + + + + + Save C&alibration + + diff --git a/slsDetectorGui/src/qDetectorMain.cpp b/slsDetectorGui/src/qDetectorMain.cpp index 98723fe25..b09024f6c 100644 --- a/slsDetectorGui/src/qDetectorMain.cpp +++ b/slsDetectorGui/src/qDetectorMain.cpp @@ -147,6 +147,10 @@ void qDetectorMain::SetUpWidgetWindow(){ tabs->setTabEnabled(Debugging,false); //beamline mode to false tabs->setTabEnabled(Advanced,false); + actionLoadTrimbits->hide(); + actionSaveTrimbits->hide(); + actionLoadCalibration->hide(); + actionSaveCalibration->hide(); dockWidgetPlot->setFloating(false); dockWidgetPlot->setFeatures(QDockWidget::NoDockWidgetFeatures); tabs->setTabEnabled(Developer,isDeveloper); @@ -271,6 +275,17 @@ void qDetectorMain::EnableModes(QAction *action){ else if(action==actionExpert){ enable = actionExpert->isChecked(); tabs->setTabEnabled(Advanced,enable); + if(enable){ + actionLoadTrimbits->show(); + actionSaveTrimbits->show(); + actionLoadCalibration->show(); + actionSaveCalibration->show(); + }else{ + actionLoadTrimbits->hide(); + actionSaveTrimbits->hide(); + actionLoadCalibration->hide(); + actionSaveCalibration->hide(); + } #ifdef VERBOSE cout << "Setting Expert Mode to " << enable << endl; #endif @@ -299,7 +314,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action){ if(action==actionOpenSetup){ #ifdef VERBOSE - cout << "Opening Setup" << endl; + cout << "Loading Setup" << endl; #endif QString fName = QString(myDet->getFilePath().c_str()); fName = QFileDialog::getOpenFileName(this, @@ -332,7 +347,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action){ } else if(action==actionOpenConfiguration){ #ifdef VERBOSE - cout << "Opening Configuration" << endl; + cout << "Loading Configuration" << endl; #endif QString fName = QString(myDet->getFilePath().c_str()); fName = QFileDialog::getOpenFileName(this, @@ -477,14 +492,30 @@ void qDetectorMain::EnableTabs(){ if(enable==false){ tabs->setTabEnabled(Debugging,enable); tabs->setTabEnabled(Advanced,enable); + actionLoadTrimbits->hide(); + actionSaveTrimbits->hide(); + actionLoadCalibration->hide(); + actionSaveCalibration->hide(); tabs->setTabEnabled(Developer,enable); } else{ // enable these tabs only if they were enabled earlier if(actionDebug->isChecked()) tabs->setTabEnabled(Debugging,enable); - if(actionExpert->isChecked()) + if(actionExpert->isChecked()){ tabs->setTabEnabled(Advanced,enable); + if(enable){ + actionLoadTrimbits->show(); + actionSaveTrimbits->show(); + actionLoadCalibration->show(); + actionSaveCalibration->show(); + }else{ + actionLoadTrimbits->hide(); + actionSaveTrimbits->hide(); + actionLoadCalibration->hide(); + actionSaveCalibration->hide(); + } + } if(isDeveloper) tabs->setTabEnabled(Developer,enable); }