fixed gitinfo

This commit is contained in:
2018-04-23 14:19:55 +02:00
64 changed files with 1276 additions and 649 deletions

View File

@ -133,44 +133,6 @@
</property>
</widget>
</widget>
<widget class="QPushButton" name="btnStartStop">
<property name="geometry">
<rect>
<x>30</x>
<y>289</y>
<width>319</width>
<height>31</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Starts or Stops Acquisition</string>
</property>
<property name="text">
<string>Start</string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/start.png</normaloff>:/icons/images/start.png</iconset>
</property>
<property name="shortcut">
<string>Shift+Space</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
<widget class="QFrame" name="frameTimeResolved">
<property name="geometry">
<rect>
@ -999,6 +961,107 @@ Frame period between exposures.
</layout>
</widget>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>30</x>
<y>297</y>
<width>318</width>
<height>30</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="btnStart">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Starts Acquisition</string>
</property>
<property name="text">
<string>Start</string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/start.png</normaloff>:/icons/images/start.png</iconset>
</property>
<property name="shortcut">
<string>Shift+Space</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="btnStop">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Stops Acquisition</string>
</property>
<property name="text">
<string>Stop</string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/stop.png</normaloff>:/icons/images/stop.png</iconset>
</property>
<property name="shortcut">
<string>Shift+Space</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<tabstops>
<tabstop>spinNumMeasurements</tabstop>

View File

@ -99,7 +99,7 @@
</rect>
</property>
<property name="currentIndex">
<number>0</number>
<number>4</number>
</property>
<widget class="QWidget" name="page_6">
<widget class="QWidget" name="gridLayoutWidget_5">
@ -548,7 +548,7 @@
<rect>
<x>25</x>
<y>5</y>
<width>314</width>
<width>335</width>
<height>26</height>
</rect>
</property>
@ -587,7 +587,7 @@ Displays minimum, maximum and sum of values for each plot.
</property>
<property name="sizeHint" stdset="0">
<size>
<width>100</width>
<width>10</width>
<height>10</height>
</size>
</property>
@ -596,7 +596,7 @@ Displays minimum, maximum and sum of values for each plot.
<item>
<widget class="QCheckBox" name="chkGainPlot">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -614,6 +614,43 @@ Displays minimum, maximum and sum of values for each plot.
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_22">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="chkGapPixels">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;nobr&gt;
Displays minimum, maximum and sum of values for each plot.
&lt;nobr&gt;</string>
</property>
<property name="text">
<string>Gap Pixels</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
@ -1695,7 +1732,7 @@ Displays minimum, maximum and sum of values for each plot.
<rect>
<x>10</x>
<y>20</y>
<width>331</width>
<width>357</width>
<height>26</height>
</rect>
</property>
@ -2522,7 +2559,7 @@ Interval between plots has 2 modes. A condition to be satisfied, in order to avo
<rect>
<x>10</x>
<y>12</y>
<width>331</width>
<width>365</width>
<height>36</height>
</rect>
</property>

View File

@ -1,9 +1,18 @@
Path: slsDetectorsPackage/slsDetectorGui
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
<<<<<<< HEAD
Repsitory UUID: ab06c33107ecfeb4741d49407903ff80286cf75b
Revision: 492
Branch: developer
Last Changed Author: Anna_Bergamaschi
Last Changed Rev: 3731
Last Changed Date: 2018-03-15 12:27:06.000000002 +0100 ./src/qTabMeasurement.cpp
=======
Repsitory UUID: fe2ba8621b33bc00f51c8cd4d33e98b7d4ebfa41
Revision: 493
Branch: developer
Last Changed Author: Dhanya_Thattil
Last Changed Rev: 3747
Last Changed Date: 2018-03-27 17:30:53.000000002 +0200 ./include/qTabMeasurement.h
>>>>>>> 7cd35f24b87501374fbaf45693a2adf16dfae3e3

View File

@ -1,6 +1,7 @@
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
#define GITREPUUID "ab06c33107ecfeb4741d49407903ff80286cf75b"
#define GITAUTH "Anna_Bergamaschi"
#define GITREV 0x3731
#define GITDATE 0x20180315
#define GITREPUUID "fe2ba8621b33bc00f51c8cd4d33e98b7d4ebfa41"
#define GITAUTH "Dhanya_Thattil"
#define GITREV 0x3747
#define GITDATE 0x20180327
#define GITBRANCH "developer"

View File

@ -617,7 +617,6 @@ void saveErrorSignal(QString);
void AcquisitionErrorSignal(QString);
void UpdatePlotSignal();
void GainPlotSignal(bool);
void AcquisitionFinishedSignal();
};

View File

@ -50,14 +50,14 @@ public:
*/
void SetExpertMode(bool enable);
/** Returns the status of the Start/Stop Acquisition button
/** Returns the status of the acquisition in gui
*/
bool GetStartStatus(){return btnStartStop->isChecked();};
bool GetStartStatus(){return (!btnStart->isEnabled());};
/** Click the Start/Stop Acquisition button
* This is used if this command came from gui client
*/
void ClickStartStop(){btnStartStop->click();myPlot->SetClientInitiated();};
void ClickStartStop(){startAcquisition();myPlot->SetClientInitiated();};
/** Returns progress bar value */
int GetProgress(){return progressBar->value();};
@ -65,10 +65,6 @@ public:
public slots:
/** Unconnects start/stop button when acquisition is finished
*/
void AcquisitionFinished();
/** update plot is finished,
* changes start/stop text and enables/disables all widgets
*/
@ -131,9 +127,13 @@ private slots:
*/
void setRunIndex(int index);
/** starts/stops Acquisition
/** starts Acquisition
*/
void startStopAcquisition();
void startAcquisition();
/** stops Acquisition
*/
void stopAcquisition();
/** Set number of frames
* @param val number of frames to be set
@ -193,8 +193,6 @@ private:
QPalette red;
/** expert mode */
bool expertMode;
QIcon *iconStart;
QIcon *iconStop;
/** to access items in settings combobox */
QStandardItemModel* model;

View File

@ -174,6 +174,9 @@ private slots:
/** Set histogram options */
void SetHistogramOptions();
/** Enable Gap pixels */
void EnableGapPixels(bool enable);
signals:
void DisableZoomSignal(bool);
void ResetZMinZMaxSignal(bool,bool,double,double);

View File

@ -99,8 +99,7 @@ qDetectorMain::qDetectorMain(int argc, char **argv, QApplication *app, int& ret,
break;
case 'v':
tempval = GITREV;
tempval = (tempval <<32) | GITDATE;
tempval = GITDATE;
cout << "SLS Detector GUI " << GITBRANCH << " (0x" << hex << tempval << ")" << endl;
return;
@ -337,7 +336,6 @@ void qDetectorMain::Initialization(){
// Plotting
// When the acquisition is finished, must update the meas tab
connect(myPlot, SIGNAL(UpdatingPlotFinished()), this, SLOT(EnableTabs()));
connect(myPlot, SIGNAL(AcquisitionFinishedSignal()), tab_measurement, SLOT(AcquisitionFinished()));
connect(myPlot, SIGNAL(UpdatingPlotFinished()), tab_measurement, SLOT(UpdateFinished()));
//This should not be called as it will change file name to measurement when run finished
//connect(myPlot, SIGNAL(UpdatingPlotFinished()), tab_plot, SLOT(Refresh()));
@ -666,8 +664,7 @@ void qDetectorMain::ExecuteHelp(QAction *action){
cout << "About: Common GUI for Mythen, Eiger, Gotthard, Jungfrau, Moench and Propix detectors" << endl;
#endif
char version[200];
long long unsigned int retval= GITREV;
retval= (retval <<32) | GITDATE;
long long unsigned int retval= GITDATE;
sprintf(version,"%llx",retval);
string thisGUIVersion = string(version);

View File

@ -1296,7 +1296,6 @@ int qDrawPlot::AcquisitionFinished(double currentProgress, int detectorStatus){
#ifdef VERBOSE
cout << "\nEntering Acquisition Finished with status " ;
#endif
emit AcquisitionFinishedSignal();
QString status = QString(slsDetectorBase::runStatusType(slsDetectorDefs::runStatus(detectorStatus)).c_str());
#ifdef VERBOSE
cout << status.toAscii().constData() << " and progress " << currentProgress << endl;

View File

@ -94,12 +94,6 @@ void qTabMeasurement::SetupWidgetWindow(){
chkFile->setChecked(myDet->enableWriteToFile());
dispFileName->setEnabled(myDet->enableWriteToFile());
//creating the icons for the buttons
iconStart = new QIcon(":/icons/images/start.png");
iconStop = new QIcon(":/icons/images/stop.png");
//Timer to update the progress bar
progressTimer = new QTimer(this);
@ -267,8 +261,10 @@ void qTabMeasurement::Initialization(){
connect(dispFileName, SIGNAL(editingFinished()),this, SLOT(setFileName()));
//File Index
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
//Start/Stop Acquisition
connect(btnStartStop, SIGNAL(clicked()), this, SLOT(startStopAcquisition()));
//Start Acquisition
connect(btnStart, SIGNAL(clicked()), this, SLOT(startAcquisition()));
//Stop Acquisition
connect(btnStop, SIGNAL(clicked()), this, SLOT(stopAcquisition()));
//Timing Mode
connect(comboTimingMode, SIGNAL(currentIndexChanged(int)), this, SLOT(SetTimingMode(int)));//
//progress bar
@ -309,75 +305,53 @@ void qTabMeasurement::Enable(bool enable){
frameNotTimeResolved->setEnabled(enable);
//shortcut each time, else it doesnt work a second time
btnStartStop->setShortcut(QApplication::translate("TabMeasurementObject", "Shift+Space", 0, QApplication::UnicodeUTF8));
btnStart->setShortcut(QApplication::translate("TabMeasurementObject", "Shift+Space", 0, QApplication::UnicodeUTF8));
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabMeasurement::startStopAcquisition(){
if(btnStartStop->isChecked()){
//if file write enabled and output dir doesnt exist
if((chkFile->isChecked())&&(thisParent->DoesOutputDirExist() == slsDetectorDefs::FAIL)){
if(qDefs::Message(qDefs::QUESTION,
"<nobr>Your data will not be saved.</nobr><br><nobr>Disable File write and Proceed with acquisition anyway?</nobr>",
"qTabMeasurement::startStopAcquisition") == slsDetectorDefs::FAIL){
disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
btnStartStop->click();
connect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
return;
}else{
//done because for receiver it cant save a file with blank file path and returns without acquiring even to the gui
disconnect(chkFile, SIGNAL(toggled(bool)), this, SLOT(EnableFileWrite(bool)));
chkFile->setChecked(false);
EnableFileWrite(false);
connect(chkFile, SIGNAL(toggled(bool)), this, SLOT(EnableFileWrite(bool)));
}
}
void qTabMeasurement::startAcquisition(){
btnStart->setEnabled(false);
//if file write enabled and output dir doesnt exist
if((chkFile->isChecked())&&(thisParent->DoesOutputDirExist() == slsDetectorDefs::FAIL)){
if(qDefs::Message(qDefs::QUESTION,
"<nobr>Your data will not be saved.</nobr><br><nobr>Disable File write and Proceed with acquisition anyway?</nobr>",
"qTabMeasurement::startAcquisition") == slsDetectorDefs::FAIL){
btnStart->setEnabled(true);
return;
}else{
//done because for receiver it cant save a file with blank file path and returns without acquiring even to the gui
disconnect(chkFile, SIGNAL(toggled(bool)), this, SLOT(EnableFileWrite(bool)));
chkFile->setChecked(false);
EnableFileWrite(false);
connect(chkFile, SIGNAL(toggled(bool)), this, SLOT(EnableFileWrite(bool)));
}
}
#ifdef VERBOSE
cout << endl << endl << "Starting Acquisition" << endl;
cout << endl << endl << "Starting Acquisition" << endl;
#endif
//btnStartStop->setStyleSheet("color:red");
btnStartStop->setText("Stop");
btnStartStop->setIcon(*iconStop);
lblProgressIndex->setText(QString::number(0));
Enable(0);
progressBar->setValue(0);
progressTimer->start(100);
lblProgressIndex->setText(QString::number(0));
Enable(0);
progressBar->setValue(0);
progressTimer->start(100);
emit StartSignal();
}else{
#ifdef VERBOSE
cout << "Stopping Acquisition" << endl<< endl;
#endif
//emit StopSignal(); commented out to prevent undefined state
myDet->stopAcquisition();
/* commented out to prevent undefined state
myDet->waitForReceiverReadToFinish();
UpdateProgress();
//spin index
disconnect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
spinIndex->setValue(myDet->getFileIndex());
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
progressTimer->stop();
btnStartStop->setText("Start");
btnStartStop->setIcon(*iconStart);
btnStartStop->setChecked(false);
Enable(1);*/
}
qDefs::checkErrorMessage(myDet,"qTabMeasurement::startStopAcquisition");
emit StartSignal();
qDefs::checkErrorMessage(myDet,"qTabMeasurement::startAcquisition");
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabMeasurement::AcquisitionFinished(){
disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
btnStartStop->setText("Wait");
void qTabMeasurement::stopAcquisition(){
#ifdef VERBOSE
cout << "Stopping Acquisition" << endl<< endl;
#endif
myDet->stopAcquisition();
qDefs::checkErrorMessage(myDet,"qTabMeasurement::stopAcquisition");
}
@ -391,12 +365,8 @@ void qTabMeasurement::UpdateFinished(){
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
progressTimer->stop();
/*disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition())); done in AcquisitionFinished() already */
btnStartStop->setText("Start");
btnStartStop->setIcon(*iconStart);
btnStartStop->setChecked(false);
Enable(1);
connect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
btnStart->setEnabled(true);
qDefs::checkErrorMessage(myDet,"qTabMeasurement::UpdateFinished");
}

View File

@ -156,9 +156,6 @@ void qTabPlot::SetupWidgetWindow(){
stackedWidget->setCurrentIndex(0);
stackedWidget_2->setCurrentIndex(0);
//gain plot
chkGainPlot->setEnabled(false);
// Depending on whether the detector is 1d or 2d
switch(myDet->getDetectorsType()){
case slsDetectorDefs::MYTHEN:
@ -174,6 +171,7 @@ void qTabPlot::SetupWidgetWindow(){
pagePedestal_2->setEnabled(false);
chkBinary->setEnabled(false);
chkBinary_2->setEnabled(false);
chkGapPixels->setEnabled(true);
break;
case slsDetectorDefs::GOTTHARD:
isOriginallyOneD = true;
@ -202,6 +200,12 @@ void qTabPlot::SetupWidgetWindow(){
//disable histogram initially
boxHistogram->hide();
if (chkGapPixels->isEnabled()) {
int ret = myDet->enableGapPixels(-1);
qDefs::checkErrorMessage(myDet,"qTabPlot::SetupWidgetWindow");
chkGapPixels->setChecked((ret == 1) ? true : false);
}
qDefs::checkErrorMessage(myDet,"qTabPlot::SetupWidgetWindow");
}
@ -376,6 +380,10 @@ void qTabPlot::Initialization(){
//gainplot
if (chkGainPlot->isEnabled())
connect(chkGainPlot, SIGNAL(toggled(bool)),myPlot, SIGNAL(GainPlotSignal(bool)));
// gap pixels
if (chkGapPixels->isEnabled())
connect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
}
@ -1471,6 +1479,24 @@ void qTabPlot::SetHistogramOptions(){
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabPlot::EnableGapPixels(bool enable) {
#ifdef VERBOSE
cout << "Setting Gap pixels to " << enable << endl;
#endif
disconnect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
myDet->enableGapPixels(enable);
int ret = myDet->enableGapPixels(-1);
qDefs::checkErrorMessage(myDet,"qTabPlot::SetScanArgument");
chkGapPixels->setChecked((ret == 1) ? true : false);
connect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
@ -1487,6 +1513,14 @@ void qTabPlot::Refresh(){
comboFrequency->setCurrentIndex(1);*/
SetFrequency();
if (chkGapPixels->isEnabled()) {
disconnect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
int ret = myDet->enableGapPixels(-1);
qDefs::checkErrorMessage(myDet,"qTabPlot::Refresh");
chkGapPixels->setChecked((ret == 1) ? true : false);
connect(chkGapPixels, SIGNAL(toggled(bool)),this, SLOT(EnableGapPixels(bool)));
}
}else{
boxFrequency->setEnabled(false);
disconnect(boxScan, SIGNAL(toggled(bool)), this, SLOT(EnableScanBox()));