mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 00:37:12 +02:00
included number of triggers for number of measurements, script and parameters work for non scan types
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@20 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -7,6 +7,11 @@
|
||||
|
||||
#ifndef QACTIONSWIDGET_H_
|
||||
#define QACTIONSWIDGET_H_
|
||||
|
||||
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QFrame>
|
||||
class QGridLayout;
|
||||
class QComboBox;
|
||||
@ -16,6 +21,11 @@ class QLabel;
|
||||
class QSpinBox;
|
||||
class QGroupBox;
|
||||
class QRadioButton;
|
||||
class QCheckBox;
|
||||
/** C++ Include Headers */
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
class ActionsWidget : public QFrame{
|
||||
@ -24,18 +34,38 @@ 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, int id);
|
||||
ActionsWidget(QWidget *parent, multiSlsDetector*& detector, int scanType, int id);
|
||||
|
||||
~ActionsWidget();
|
||||
|
||||
/**set variable expand
|
||||
*/
|
||||
void SetExpand(bool expanded){expand = expanded;};
|
||||
|
||||
/**get variable expand
|
||||
*/
|
||||
bool isExpanded(){return expand;};
|
||||
|
||||
/**to update the widgets*/
|
||||
void Refresh();
|
||||
|
||||
|
||||
enum actions{Start,Scan0,Scan1,ActionBefore,NumPositions,
|
||||
HeaderBefore,HeaderAfter,ActionAfter,Stop};
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/**if its a scan type*/
|
||||
int scanType;
|
||||
/**id of the action widget*/
|
||||
int id;
|
||||
/**if this widget has been expanded*/
|
||||
bool expand;
|
||||
|
||||
QGridLayout *layout;
|
||||
QComboBox *comboScript;
|
||||
@ -60,6 +90,12 @@ private:
|
||||
QComboBox *comboSpecific;
|
||||
QLineEdit *dispValues;
|
||||
QPushButton *btnValues;
|
||||
QSpinBox *spinNumPos;
|
||||
QComboBox *comboPos;
|
||||
QPushButton *btnDelete;
|
||||
QCheckBox *chkInvert;
|
||||
QCheckBox *chkSeparate;
|
||||
QCheckBox *chkReturn;
|
||||
|
||||
/** Sets up the widget
|
||||
*/
|
||||
@ -68,6 +104,12 @@ private:
|
||||
/** Sets up all the slots and signals */
|
||||
void Initialization();
|
||||
|
||||
/**Gets the sls class action index using the gui index
|
||||
* @param index gui index
|
||||
*/
|
||||
int GetActionIndex(int gIndex);
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/** Sets the scan or script. Accordingly enables, disables other widgets
|
||||
@ -82,10 +124,26 @@ void EnableSizeWidgets();
|
||||
* */
|
||||
void BrowsePath();
|
||||
|
||||
/** Sets the script file
|
||||
* */
|
||||
void SetScriptFile();
|
||||
|
||||
/** Set Parameter
|
||||
* @param parameter is the parameter to be set to
|
||||
* */
|
||||
void SetParameter(const QString& parameter);
|
||||
|
||||
/** Sets the number of positions
|
||||
* */
|
||||
void SetNumPositions(int index);
|
||||
|
||||
/** Deletes current position
|
||||
* */
|
||||
void DeletePosition();
|
||||
|
||||
|
||||
signals:
|
||||
void EnableScanBox(bool,int);
|
||||
void SetScriptSignal(QString&,int);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user