mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 10:00: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>
|
||||
</widget>
|
||||
</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">
|
||||
<widget class="QLineEdit" name="dispFileName">
|
||||
<property name="sizePolicy">
|
||||
@ -874,6 +867,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -196,7 +196,7 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>356</width>
|
||||
<width>350</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -218,23 +218,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<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">
|
||||
<widget class="QCheckBox" name="chkPoints">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -259,7 +243,7 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<width>170</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -270,7 +254,7 @@
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>118</x>
|
||||
<x>145</x>
|
||||
<y>20</y>
|
||||
<width>126</width>
|
||||
<height>23</height>
|
||||
|
@ -201,6 +201,8 @@ private:
|
||||
int progress;
|
||||
/**If plot is enabled from plot tab*/
|
||||
bool plotEnable;
|
||||
/**If plot is dotted */
|
||||
bool plotDotted;
|
||||
|
||||
|
||||
/**if an acquisition is running, so as not to refresh tab
|
||||
@ -282,7 +284,8 @@ void CloseClones();
|
||||
void SavePlot();
|
||||
/** Sets persistency from plot tab */
|
||||
void SetPersistency(int val);
|
||||
|
||||
/** sets style of plot to dotted */
|
||||
void SetDottedPlot(bool enable){plotDotted = enable;};
|
||||
|
||||
|
||||
private slots:
|
||||
|
@ -158,6 +158,10 @@ void setNumProbes(int val);
|
||||
/** Update progress*/
|
||||
void UpdateProgress();
|
||||
|
||||
/** Enable write to file */
|
||||
void EnableFileWrite(bool enable);
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
void StartSignal();
|
||||
|
@ -8,6 +8,8 @@
|
||||
* DisableZoom,
|
||||
* SetXMinMax,SetYMinMax,
|
||||
* GetXMinimum,GetXMaximum,GetYMinimum,GetYMaximum}
|
||||
* 07.08.2012:{function to change lines, points etc }
|
||||
* SetDotStyle
|
||||
* */
|
||||
|
||||
#ifndef SLSQT1DPLOT_H
|
||||
@ -60,6 +62,9 @@ class SlsQtH1D:public QwtPlotCurve{
|
||||
|
||||
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:
|
||||
int ndata;
|
||||
|
@ -76,6 +76,7 @@ void qDrawPlot::SetupWidgetWindow(){
|
||||
currentPersistency = 0;
|
||||
progress = 0;
|
||||
plotEnable=true;
|
||||
plotDotted = false;
|
||||
XYRangeChanged = false;
|
||||
timerValue = PLOT_TIMER_MS;
|
||||
frameFactor=0;
|
||||
@ -483,6 +484,7 @@ void qDrawPlot::UpdatePlot(){
|
||||
}else{
|
||||
h=plot1D_hists.at(hist_num);
|
||||
h->SetData(histNBins,histXAxis,GetHistYAxis(hist_num));
|
||||
h->SetDotStyle(plotDotted);
|
||||
}
|
||||
h->setTitle(GetHistTitle(hist_num));
|
||||
h->Attach(plot1D);
|
||||
|
@ -78,6 +78,10 @@ void qTabMeasurement::SetupWidgetWindow(){
|
||||
|
||||
/** timing mode*/
|
||||
SetupTimingMode();
|
||||
|
||||
/**file write enabled/disabled*/
|
||||
myDet->enableWriteToFile(true);
|
||||
//check if file enabled
|
||||
}
|
||||
|
||||
|
||||
@ -173,15 +177,17 @@ void qTabMeasurement::Initialization(int timingChange){
|
||||
/** Number of Measurements**/
|
||||
connect(spinNumMeasurements,SIGNAL(valueChanged(int)), this, SLOT(setNumMeasurements(int)));
|
||||
/** 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**/
|
||||
connect(spinIndex,SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||
/** Start/Stop Acquisition**/
|
||||
connect(btnStartStop,SIGNAL(clicked()), this, SLOT(startStopAcquisition()));
|
||||
connect(btnStartStop, SIGNAL(clicked()), this, SLOT(startStopAcquisition()));
|
||||
/** 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()));
|
||||
/** enable write to file */
|
||||
connect(chkFile, SIGNAL(toggled(bool)), this, SLOT(EnableFileWrite(bool)));
|
||||
}
|
||||
/** Number of Frames**/
|
||||
connect(spinNumFrames,SIGNAL(valueChanged(int)), this, SLOT(setNumFrames(int)));
|
||||
@ -660,6 +666,14 @@ void qTabMeasurement::setTimingMode(int mode){
|
||||
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(btnCloseClones, SIGNAL(clicked()),myPlot, SLOT(CloseClones()));
|
||||
/** 1D Plot box*/
|
||||
connect(chkSuperimpose, SIGNAL(toggled(bool)),this, SLOT(EnablePersistency(bool)));
|
||||
connect(spinPersistency,SIGNAL(valueChanged(int)),myPlot,SLOT(SetPersistency(int)));
|
||||
connect(chkSuperimpose, SIGNAL(toggled(bool)), this, SLOT(EnablePersistency(bool)));
|
||||
connect(spinPersistency,SIGNAL(valueChanged(int)), myPlot,SLOT(SetPersistency(int)));
|
||||
connect(chkPoints, SIGNAL(toggled(bool)), myPlot, SLOT(SetDottedPlot(bool)));
|
||||
/** 2D Plot box*/
|
||||
connect(chkInterpolate, SIGNAL(toggled(bool)),myPlot, SIGNAL(InterpolateSignal(bool)));
|
||||
connect(chkContour, SIGNAL(toggled(bool)),myPlot, SIGNAL(ContourSignal(bool)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user