mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
included checkbox for enable file write
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@25 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
bcb4710477
commit
72c52de2fe
@ -808,13 +808,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="text">
|
|
||||||
<string>File Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" colspan="2">
|
<item row="1" column="1" colspan="2">
|
||||||
<widget class="QLineEdit" name="dispFileName">
|
<widget class="QLineEdit" name="dispFileName">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -874,6 +867,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkFile">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>Sets output file name prefix</nobr><br>
|
||||||
|
<nobr>Check the box to enable write to file. </nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>File Name:</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -196,7 +196,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>356</width>
|
<width>350</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -218,23 +218,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="QCheckBox" name="checkBox">
|
<widget class="QCheckBox" name="chkPoints">
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Line</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QCheckBox" name="checkBox_2">
|
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -259,7 +243,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>150</width>
|
<width>170</width>
|
||||||
<height>10</height>
|
<height>10</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -270,7 +254,7 @@
|
|||||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>118</x>
|
<x>145</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>126</width>
|
<width>126</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
|
@ -201,6 +201,8 @@ private:
|
|||||||
int progress;
|
int progress;
|
||||||
/**If plot is enabled from plot tab*/
|
/**If plot is enabled from plot tab*/
|
||||||
bool plotEnable;
|
bool plotEnable;
|
||||||
|
/**If plot is dotted */
|
||||||
|
bool plotDotted;
|
||||||
|
|
||||||
|
|
||||||
/**if an acquisition is running, so as not to refresh tab
|
/**if an acquisition is running, so as not to refresh tab
|
||||||
@ -282,7 +284,8 @@ void CloseClones();
|
|||||||
void SavePlot();
|
void SavePlot();
|
||||||
/** Sets persistency from plot tab */
|
/** Sets persistency from plot tab */
|
||||||
void SetPersistency(int val);
|
void SetPersistency(int val);
|
||||||
|
/** sets style of plot to dotted */
|
||||||
|
void SetDottedPlot(bool enable){plotDotted = enable;};
|
||||||
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
@ -158,6 +158,10 @@ void setNumProbes(int val);
|
|||||||
/** Update progress*/
|
/** Update progress*/
|
||||||
void UpdateProgress();
|
void UpdateProgress();
|
||||||
|
|
||||||
|
/** Enable write to file */
|
||||||
|
void EnableFileWrite(bool enable);
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void StartSignal();
|
void StartSignal();
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
* DisableZoom,
|
* DisableZoom,
|
||||||
* SetXMinMax,SetYMinMax,
|
* SetXMinMax,SetYMinMax,
|
||||||
* GetXMinimum,GetXMaximum,GetYMinimum,GetYMaximum}
|
* GetXMinimum,GetXMaximum,GetYMinimum,GetYMaximum}
|
||||||
|
* 07.08.2012:{function to change lines, points etc }
|
||||||
|
* SetDotStyle
|
||||||
* */
|
* */
|
||||||
|
|
||||||
#ifndef SLSQT1DPLOT_H
|
#ifndef SLSQT1DPLOT_H
|
||||||
@ -60,6 +62,9 @@ class SlsQtH1D:public QwtPlotCurve{
|
|||||||
|
|
||||||
SlsQtH1D* Add(double v);
|
SlsQtH1D* Add(double v);
|
||||||
|
|
||||||
|
/** Added by Dhanya to change style of graph*/
|
||||||
|
void SetDotStyle(bool enable){if(enable) setStyle(QwtPlotCurve::Dots); else setStyle(QwtPlotCurve::Lines);};
|
||||||
|
/**---*/
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int ndata;
|
int ndata;
|
||||||
|
@ -76,6 +76,7 @@ void qDrawPlot::SetupWidgetWindow(){
|
|||||||
currentPersistency = 0;
|
currentPersistency = 0;
|
||||||
progress = 0;
|
progress = 0;
|
||||||
plotEnable=true;
|
plotEnable=true;
|
||||||
|
plotDotted = false;
|
||||||
XYRangeChanged = false;
|
XYRangeChanged = false;
|
||||||
timerValue = PLOT_TIMER_MS;
|
timerValue = PLOT_TIMER_MS;
|
||||||
frameFactor=0;
|
frameFactor=0;
|
||||||
@ -483,6 +484,7 @@ void qDrawPlot::UpdatePlot(){
|
|||||||
}else{
|
}else{
|
||||||
h=plot1D_hists.at(hist_num);
|
h=plot1D_hists.at(hist_num);
|
||||||
h->SetData(histNBins,histXAxis,GetHistYAxis(hist_num));
|
h->SetData(histNBins,histXAxis,GetHistYAxis(hist_num));
|
||||||
|
h->SetDotStyle(plotDotted);
|
||||||
}
|
}
|
||||||
h->setTitle(GetHistTitle(hist_num));
|
h->setTitle(GetHistTitle(hist_num));
|
||||||
h->Attach(plot1D);
|
h->Attach(plot1D);
|
||||||
|
@ -78,6 +78,10 @@ void qTabMeasurement::SetupWidgetWindow(){
|
|||||||
|
|
||||||
/** timing mode*/
|
/** timing mode*/
|
||||||
SetupTimingMode();
|
SetupTimingMode();
|
||||||
|
|
||||||
|
/**file write enabled/disabled*/
|
||||||
|
myDet->enableWriteToFile(true);
|
||||||
|
//check if file enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -173,15 +177,17 @@ void qTabMeasurement::Initialization(int timingChange){
|
|||||||
/** Number of Measurements**/
|
/** Number of Measurements**/
|
||||||
connect(spinNumMeasurements,SIGNAL(valueChanged(int)), this, SLOT(setNumMeasurements(int)));
|
connect(spinNumMeasurements,SIGNAL(valueChanged(int)), this, SLOT(setNumMeasurements(int)));
|
||||||
/** File Name**/
|
/** File Name**/
|
||||||
connect(dispFileName,SIGNAL(textChanged(const QString&)), this, SLOT(setFileName(const QString&)));
|
connect(dispFileName, SIGNAL(textChanged(const QString&)),this, SLOT(setFileName(const QString&)));
|
||||||
/** File Index**/
|
/** File Index**/
|
||||||
connect(spinIndex,SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||||
/** Start/Stop Acquisition**/
|
/** Start/Stop Acquisition**/
|
||||||
connect(btnStartStop,SIGNAL(clicked()), this, SLOT(startStopAcquisition()));
|
connect(btnStartStop, SIGNAL(clicked()), this, SLOT(startStopAcquisition()));
|
||||||
/** Timing Mode **/
|
/** Timing Mode **/
|
||||||
connect(comboTimingMode,SIGNAL(currentIndexChanged(int)), this, SLOT(setTimingMode(int)));//
|
connect(comboTimingMode, SIGNAL(currentIndexChanged(int)), this, SLOT(setTimingMode(int)));//
|
||||||
|
/** progress bar */
|
||||||
connect(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress()));
|
connect(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress()));
|
||||||
|
/** enable write to file */
|
||||||
|
connect(chkFile, SIGNAL(toggled(bool)), this, SLOT(EnableFileWrite(bool)));
|
||||||
}
|
}
|
||||||
/** Number of Frames**/
|
/** Number of Frames**/
|
||||||
connect(spinNumFrames,SIGNAL(valueChanged(int)), this, SLOT(setNumFrames(int)));
|
connect(spinNumFrames,SIGNAL(valueChanged(int)), this, SLOT(setNumFrames(int)));
|
||||||
@ -660,6 +666,14 @@ void qTabMeasurement::setTimingMode(int mode){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabMeasurement::EnableFileWrite(bool enable){
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "Enable File Write:" << enable << endl;
|
||||||
|
#endif
|
||||||
|
myDet->enableWriteToFile(enable);
|
||||||
|
dispFileName->setEnabled(enable);
|
||||||
|
if(enable) setFileName(dispFileName->text());
|
||||||
|
};
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -167,8 +167,9 @@ void qTabPlot::Initialization(){
|
|||||||
connect(btnClone, SIGNAL(clicked()),myPlot, SLOT(ClonePlot()));
|
connect(btnClone, SIGNAL(clicked()),myPlot, SLOT(ClonePlot()));
|
||||||
connect(btnCloseClones, SIGNAL(clicked()),myPlot, SLOT(CloseClones()));
|
connect(btnCloseClones, SIGNAL(clicked()),myPlot, SLOT(CloseClones()));
|
||||||
/** 1D Plot box*/
|
/** 1D Plot box*/
|
||||||
connect(chkSuperimpose, SIGNAL(toggled(bool)),this, SLOT(EnablePersistency(bool)));
|
connect(chkSuperimpose, SIGNAL(toggled(bool)), this, SLOT(EnablePersistency(bool)));
|
||||||
connect(spinPersistency,SIGNAL(valueChanged(int)),myPlot,SLOT(SetPersistency(int)));
|
connect(spinPersistency,SIGNAL(valueChanged(int)), myPlot,SLOT(SetPersistency(int)));
|
||||||
|
connect(chkPoints, SIGNAL(toggled(bool)), myPlot, SLOT(SetDottedPlot(bool)));
|
||||||
/** 2D Plot box*/
|
/** 2D Plot box*/
|
||||||
connect(chkInterpolate, SIGNAL(toggled(bool)),myPlot, SIGNAL(InterpolateSignal(bool)));
|
connect(chkInterpolate, SIGNAL(toggled(bool)),myPlot, SIGNAL(InterpolateSignal(bool)));
|
||||||
connect(chkContour, SIGNAL(toggled(bool)),myPlot, SIGNAL(ContourSignal(bool)));
|
connect(chkContour, SIGNAL(toggled(bool)),myPlot, SIGNAL(ContourSignal(bool)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user