stop signal works, call back works, number of probes to expert mode, angular works

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@49 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2012-09-05 07:33:55 +00:00
parent 63fadd3633
commit e32c1de0af
8 changed files with 356 additions and 262 deletions

View File

@ -138,8 +138,8 @@ void SetLines(bool enable){lines = enable;};
void SetMarkers(bool enable){markers = enable;};
/** sets the scan argument to prepare the plot*/
void SetScanArgument(int scanArg){scanArgument = scanArg;};
/** sets stop_signal to true */
void StopAcquisition(){ stop_signal = true; };
@ -178,12 +178,24 @@ static void* DataStartAcquireThread(void *this_pointer);
static int GetDataCallBack(detectorData *data, void *this_pointer);
/** This is called by the GetDataCallBack function to copy the data */
int GetData(detectorData *data);
/** This is called by detector class when acquisition is finished
* @param currentProgress current progress of measurement
* @param detectorStatus current status of the detector
* @param this_pointer is the pointer pointing to this object
* */
static int GetAcquisitionFinishedCallBack(double currentProgress,int detectorStatus, void *this_pointer);
/** This is called by detector class when acquisition is finished
* @param currentProgress current progress of measurement
* @param detectorStatus current status of the detector
* */
int AcquisitionFinished(double currentProgress,int detectorStatus);
/** Saves all the plots. All sets saveError to true if not saved.*/
void SavePlotAutomatic();
/** Sets the style of the 1d plot */
void SetStyle(SlsQtH1D* h){
if(lines) h->setStyle(QwtPlotCurve::Lines); else h->setStyle(QwtPlotCurve::Dots);
if(markers) h->setSymbol(*marker); else h->setSymbol(*noMarker);};
if(markers) h->setSymbol(*marker); else h->setSymbol(*noMarker);
};
@ -248,8 +260,8 @@ int number_of_measurements;
int currentMeasurement;
/** currentFrame */
int currentFrame;
/** current Index */
int currentIndex;
/** variable to check if its the nth frame */
int numFactor;
/** current Scan Division Level */
int currentScanDivLevel;
/** current scan Value */

View File

@ -40,27 +40,29 @@ public:
*/
void Refresh();
/** To enable expert mode
* @param enable to enable if true
*/
void SetExpertMode(bool enable){expertMode = enable;SetupTimingMode();};
public slots:
/** update plot is finished,
* changes start/stop text and enables/disables all widgets
*/
void UpdateFinished();
/** updates the current measurement
* @param val the value to be updated
*/
void SetCurrentMeasurement(int val);
private:
/** The sls detector object */
multiSlsDetector *myDet;
/** The Plot widget */
qDrawPlot *myPlot;
enum{None, Auto, Trigger_Exp_Series, Trigger_Frame, Trigger_Readout, Gated, Gated_Start, Trigger_Window, NumTimingModes};
QTimer *progressTimer;
int numMeasurement;
int currentMeasurement;
QString acqPeriodTip;
QString errPeriodTip;
QPalette red;
/** methods */
/** Sets up the widget
*/
void SetupWidgetWindow();
@ -86,88 +88,99 @@ private:
void Enable(bool enable);
public slots:
/** update plot is finished,
* changes start/stop text and enables/disables all widgets
*/
void UpdateFinished();
/** updates the current measurement
* @param val the value to be updated
*/
void SetCurrentMeasurement(int val);
private slots:
/** Sets the timing mode
* @ param mode cane be None, Auto, Gated, Trigger Exposure Series,
* Trigger Frame, Trigger Readout, External Trigger Window
*/
void SetTimingMode(int mode);
/** Sets the timing mode
* @ param mode cane be None, Auto, Gated, Trigger Exposure Series,
* Trigger Frame, Trigger Readout, External Trigger Window
*/
void SetTimingMode(int mode);
/** Set number of measurements
* @param num number of measurements to be set */
void setNumMeasurements(int num);
/** Set number of measurements
* @param num number of measurements to be set */
void setNumMeasurements(int num);
/** Set file name
* @param fName name of file
*/
void setFileName(const QString& fName);
/** Set file name
* @param fName name of file
*/
void setFileName(const QString& fName);
/** Set index of file name
* @param index index of selection
*/
void setRunIndex(int index);
/** Set index of file name
* @param index index of selection
*/
void setRunIndex(int index);
/** starts/stops Acquisition
*/
void startStopAcquisition();
/** starts/stops Acquisition
*/
void startStopAcquisition();
/** Set number of frames
* @param val number of frames to be set
*/
void setNumFrames(int val);
/** Set number of frames
* @param val number of frames to be set
*/
void setNumFrames(int val);
/** Set acquisition time
*/
void setExposureTime();
/** Set acquisition time
*/
void setExposureTime();
/** Set frame period between exposures
*/
void setAcquisitionPeriod();
/** Set frame period between exposures
*/
void setAcquisitionPeriod();
/** Set number of triggers
* @param val number of triggers to be set
*/
void setNumTriggers(int val);
/** Set number of triggers
* @param val number of triggers to be set
*/
void setNumTriggers(int val);
/** Set delay
*/
void setDelay();
/** Set delay
*/
void setDelay();
/** Set number of gates
* @param val number of gates to be set
*/
void setNumGates(int val);
/** Set number of gates
* @param val number of gates to be set
*/
void setNumGates(int val);
/** Set number of probes
* @param val number of probes to be set
*/
void setNumProbes(int val);
/** Set number of probes
* @param val number of probes to be set
*/
void setNumProbes(int val);
/** Update progress*/
void UpdateProgress();
/** Update progress*/
void UpdateProgress();
/** Enable write to file */
void EnableFileWrite(bool enable);
private:
/** The sls detector object */
multiSlsDetector *myDet;
/** The Plot widget */
qDrawPlot *myPlot;
/** enum for the timing mode */
enum{None, Auto, Trigger_Exp_Series, Trigger_Frame, Trigger_Readout, Gated, Gated_Start, Trigger_Window, NumTimingModes};
/** timer to update the progress*/
QTimer *progressTimer;
/** number of measurements*/
int numMeasurement;
/** current measurement */
int currentMeasurement;
/** tool tip variables*/
QString acqPeriodTip;
QString errPeriodTip;
QPalette red;
/** expert mode */
bool expertMode;
/** Enable write to file */
void EnableFileWrite(bool enable);
signals:
void StartSignal();
void StopSignal();
void CheckPlotIntervalSignal();
void EnableNthFrameSignal(bool);
void StartSignal();
void StopSignal();
void CheckPlotIntervalSignal();
void EnableNthFrameSignal(bool);
};