going to start actions

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@19 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2012-07-19 14:20:51 +00:00
parent d2b9b6ae1d
commit 3b59d03526
30 changed files with 1433 additions and 610 deletions

View File

@ -24,13 +24,19 @@ class ActionsWidget : public QFrame{
public:
/** \short The constructor
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
* @param scanType is if its an energy/threshold scan type
* @param id is the id of the widget. to know which one was emitting it
*/
ActionsWidget(QWidget *parent, int scanType);
ActionsWidget(QWidget *parent, int scanType, int id);
~ActionsWidget();
private:
/**if its a scan type*/
int scanType;
/**id of the action widget*/
int id;
QGridLayout *layout;
QComboBox *comboScript;
QLineEdit *dispScript;
@ -56,8 +62,8 @@ private:
QPushButton *btnValues;
/** Sets up the widget
* @param scanType 1 if it includes Threshold Scan,Energy Scan and Trimbits Scan, else 0*/
void SetupWidgetWindow(int scanType);
*/
void SetupWidgetWindow();
/** Sets up all the slots and signals */
void Initialization();
@ -72,6 +78,14 @@ void SetScript(int index);
* Options: constant size,specific values,values from file */
void EnableSizeWidgets();
/** Browse for the script
* */
void BrowsePath();
signals:
void EnableScanBox(bool,int);
void SetScriptSignal(QString&,int);
};

View File

@ -21,7 +21,7 @@ class qTabDebugging;
class qTabDeveloper;
class qTabMessages;
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
#include "sls_detector_defs.h"
/** Qt Include Headers */
#include <QScrollArea>
@ -63,7 +63,7 @@ private:
/** The Qt Application */
QApplication *theApp;
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/** sls detector id */
int detID;
/** The Plot widget */

View File

@ -9,7 +9,7 @@
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
#include "detectorData.h"
/** Qt Project Class Headers */
#include "SlsQt1DPlot.h"
@ -38,7 +38,7 @@ class qDrawPlot:public QWidget{
public:
/** \short The constructor */
qDrawPlot(QWidget *parent,slsDetectorUtils*& detector);
qDrawPlot(QWidget *parent,multiSlsDetector*& detector);
/** Destructor */
~qDrawPlot();
@ -96,7 +96,7 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/** Widgets needed to plot the clone */

View File

@ -9,7 +9,7 @@
#define QTABACTIONS_H_
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
class ActionsWidget;
#include <QWidget>
@ -31,7 +31,7 @@ public:
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
*/
qTabActions(QWidget *parent,slsDetectorUtils*& detector);
qTabActions(QWidget *parent,multiSlsDetector*& detector);
/** Destructor
*/
@ -44,7 +44,7 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
static const int NUM_ACTION_WIDGETS = 9;
@ -57,6 +57,9 @@ private:
QPushButton *btnExpand[NUM_ACTION_WIDGETS];
QLabel *lblName[NUM_ACTION_WIDGETS];
enum{Start,Scan0,Scan1,ActionBefore,NumPositions,
HeaderBefore,HeaderAfter,ActionAfter,Stop};
/** Sets up the widget */
void SetupWidgetWindow();
@ -68,6 +71,14 @@ private slots:
/** To Expand the Action Widget */
void Expand(QAbstractButton *button);
/** To set the script of action widget
* @param fName name of script
* @param index id of action widget*/
void SetScript(const QString& fName,int index);
signals:
void EnableScanBox(bool,int);
};
#endif /* QTABACTIONS_H_ */

View File

@ -11,7 +11,7 @@
/** Form Header */
#include "ui_form_tab_advanced.h"
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
/**
*@short sets up the advanced parameters
@ -24,7 +24,7 @@ public:
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
*/
qTabAdvanced(QWidget *parent,slsDetectorUtils*& detector);
qTabAdvanced(QWidget *parent,multiSlsDetector*& detector);
/** Destructor
*/
@ -37,7 +37,7 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/** The sls detector object type*/
int myDetType;

View File

@ -11,7 +11,8 @@
/** Form Header */
#include "ui_form_tab_dataoutput.h"
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
#include "sls_detector_defs.h"
/** Qt Include Headers */
#include <QString>
@ -26,8 +27,9 @@ public:
/** \short The constructor
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
* @param detID is the id of the detector
*/
qTabDataOutput(QWidget *parent,slsDetectorUtils*& detector);
qTabDataOutput(QWidget *parent,multiSlsDetector*& detector,int detID);
/** Destructor
*/
@ -41,7 +43,13 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/**detector id */
int detID;
/** detector type */
slsDetectorDefs::detectorType detType;
/** methods */
/** Sets up the widget */
@ -59,6 +67,27 @@ void setOutputDir(const QString& path);
/** Open dialog to choose the output directory */
void browseOutputDir();
/**set flat field file*/
void SetFlatField();
/** update flat field correction from server */
void UpdateFlatFieldFromServer();
/**browse flat field*/
void BrowseFlatFieldPath();
/**rate correction*/
void SetRateCorrection();
/** update rate correction from server */
void UpdateRateCorrectionFromServer();
/**angular correction*/
void SetAngularCorrection();
/**discard bad channels*/
void DiscardBadChannels();
};

View File

@ -11,7 +11,11 @@
/** Form Header */
#include "ui_form_tab_debugging.h"
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
/** Qt Include Headers */
/** C++ Include Headers */
#include "sls_detector_defs.h"
/**
*@short sets up the Debugging parameters
@ -24,7 +28,7 @@ public:
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
*/
qTabDebugging(QWidget *parent,slsDetectorUtils*& detector);
qTabDebugging(QWidget *parent,multiSlsDetector*& detector);
/** Destructor
*/
@ -36,7 +40,10 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/** detector type */
slsDetectorDefs::detectorType detType;
/** Sets up the widget
*/

View File

@ -11,7 +11,7 @@
/** Form Header */
#include "ui_form_tab_developer.h"
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
/**
*@short sets up the Developer parameters
@ -24,7 +24,7 @@ public:
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
*/
qTabDeveloper(QWidget *parent,slsDetectorUtils*& detector);
qTabDeveloper(QWidget *parent,multiSlsDetector*& detector);
/** Destructor
*/
@ -36,7 +36,7 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/** Sets up the widget
*/

View File

@ -10,7 +10,7 @@
/** Form Header */
#include "ui_form_tab_measurement.h"
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
/** Qt Project Class Headers */
class qDrawPlot;
@ -30,7 +30,7 @@ public:
* @param detector is the detector returned from the detector tab
* @param plot plot object reference
*/
qTabMeasurement(QWidget *parent,slsDetectorUtils*& detector, qDrawPlot*& plot);
qTabMeasurement(QWidget *parent,multiSlsDetector*& detector, qDrawPlot*& plot);
/** Destructor
*/
@ -43,7 +43,7 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/** The Plot widget */
qDrawPlot *myPlot;

View File

@ -11,7 +11,7 @@
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
/** Qt Include Headers */
#include <QWidget>
#include <QTextEdit>
@ -30,7 +30,7 @@ public:
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
*/
qTabMessages(QWidget *parent,slsDetectorUtils*& detector);
qTabMessages(QWidget *parent,multiSlsDetector*& detector);
/** Destructor
*/
@ -39,7 +39,7 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/** Log of executed commands */
QTextEdit *dispLog;

View File

@ -11,7 +11,7 @@
/** Form Header */
#include "ui_form_tab_plot.h"
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
/** Qt Project Class Headers */
class qDrawPlot;
/** Qt Include Headers */
@ -29,7 +29,7 @@ public:
* @param detector is the detector returned from the detector tab
* @param plot plot object reference
*/
qTabPlot(QWidget *parent,slsDetectorUtils*& detector, qDrawPlot*& plot);
qTabPlot(QWidget *parent,multiSlsDetector*& detector, qDrawPlot*& plot);
/** Destructor
*/
@ -42,7 +42,7 @@ public:
private:
/** The sls detector object */
slsDetectorUtils *myDet;
multiSlsDetector *myDet;
/** The Plot widget */
qDrawPlot *myPlot;
@ -50,6 +50,8 @@ private:
/** 1d/2d plot */
bool isOneD;
bool scanLevel[2];
QStackedLayout* stackedLayout;
QSpinBox *spinNthFrame;
QDoubleSpinBox *spinTimeGap;
@ -76,10 +78,13 @@ private:
public slots:
/** Set frequency between plots
* returns 0 if there were no errors(important
* while editing acquisition period in measurement tab) */
int SetFrequency();
/** Set frequency between plots*/
void SetFrequency();
/** Enable Scan box
* @param enable to enable the scan group box
* @param id is 0 if its scan level 0 or scan level 1
*/
void EnableScanBox(bool enable,int id);

View File

@ -11,7 +11,7 @@
/** Form Header */
#include "ui_form_tab_settings.h"
/** Project Class Headers */
class slsDetectorUtils;
class multiSlsDetector;
#include "sls_detector_defs.h"
/** Qt Include Headers */
#include <QStandardItemModel>
@ -28,7 +28,7 @@ public:
* @param detector is the detector returned from the detector tab
* @param detID is the id of the detector
*/
qTabSettings(QWidget *parent,slsDetectorUtils*& detector,int detID);
qTabSettings(QWidget *parent,multiSlsDetector*& detector,int detID);
/** Destructor
*/
@ -38,15 +38,25 @@ public:
*/
void Refresh();
/** enable expert mode
* @param enable true if expert mode is enabled
*/
void EnableExpertMode(bool enable){expertMode=enable;Refresh();};
private:
/** The sls detector object */
slsDetectorUtils *myDet;
/**etector id */
multiSlsDetector *myDet;
/**detector id */
int detID;
/** detector type */
slsDetectorDefs::detectorType detType;
bool expertMode;
enum{Standard,Fast,HighGain,DynamicGain,LowGain,MediumGain,VeryHighGain,Undefined,Uninitialized,NumSettings};
/** To be able to index items on a combo box */
@ -68,12 +78,27 @@ private:
private slots:
/** Set settings according to selection
* @param index index of selection
*/
void setSettings(int index);
/** Set number of modules if possible
* @param index number of modules
*/
void SetNumberOfModules(int index);
/** Set dynamic range if possible
* @param index selection
*/
void SetDynamicRange(int index);
/** Set threshold energy
*/
void SetEnergy();
};