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:
l_maliakal_d
2012-08-07 12:20:50 +00:00
parent bcb4710477
commit 72c52de2fe
8 changed files with 57 additions and 37 deletions

View File

@ -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);

View File

@ -78,6 +78,10 @@ void qTabMeasurement::SetupWidgetWindow(){
/** timing mode*/
SetupTimingMode();
/**file write enabled/disabled*/
myDet->enableWriteToFile(true);
//check if file enabled
}
@ -171,17 +175,19 @@ void qTabMeasurement::Initialization(int timingChange){
/** These signals are connected only at start up. The others are reinitialized when changing timing mode*/
if(!timingChange){
/** Number of Measurements**/
connect(spinNumMeasurements,SIGNAL(valueChanged(int)), this, SLOT(setNumMeasurements(int)));
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(progressTimer, SIGNAL(timeout()), this, SLOT(UpdateProgress()));
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());
};
//-------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -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)));