mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 08:38:00 +02:00
actions without scan, positions, min plotimer=250,acquisition problem,error showing in actions tab
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@21 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* qTabActions.h
|
||||
* qActionsWidget.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
@ -8,118 +8,60 @@
|
||||
#ifndef QACTIONSWIDGET_H_
|
||||
#define QACTIONSWIDGET_H_
|
||||
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_action.h"
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QFrame>
|
||||
class QGridLayout;
|
||||
class QComboBox;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
class QSpinBox;
|
||||
class QGroupBox;
|
||||
class QRadioButton;
|
||||
class QCheckBox;
|
||||
|
||||
/** C++ Include Headers */
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
class ActionsWidget : public QFrame{
|
||||
class qActionsWidget : public QWidget,private Ui::ActionsObject{
|
||||
Q_OBJECT
|
||||
|
||||
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, multiSlsDetector*& detector, int scanType, int id);
|
||||
qActionsWidget(QWidget *parent, multiSlsDetector*& detector);
|
||||
|
||||
~ActionsWidget();
|
||||
|
||||
/**set variable expand
|
||||
*/
|
||||
void SetExpand(bool expanded){expand = expanded;};
|
||||
|
||||
/**get variable expand
|
||||
*/
|
||||
bool isExpanded(){return expand;};
|
||||
~qActionsWidget();
|
||||
|
||||
/**to update the widgets*/
|
||||
void Refresh();
|
||||
|
||||
/**number of action widgets*/
|
||||
static int NUM_ACTION_WIDGETS;
|
||||
|
||||
|
||||
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;
|
||||
QLineEdit *dispScript;
|
||||
QPushButton *btnBrowse;
|
||||
QLabel *lblParameter;
|
||||
QLineEdit *dispParameter;
|
||||
QLabel *lblSteps;
|
||||
QSpinBox *spinSteps;
|
||||
QLabel *lblPrecision;
|
||||
QSpinBox *spinPrecision;
|
||||
QGroupBox *group;
|
||||
QRadioButton *radioConstant;
|
||||
QRadioButton *radioSpecific;
|
||||
QRadioButton *radioValue;
|
||||
QLabel *lblFrom;
|
||||
QSpinBox *spinFrom;
|
||||
QLabel *lblTo;
|
||||
QSpinBox *spinTo;
|
||||
QLabel *lblSize;
|
||||
QSpinBox *spinSize;
|
||||
QComboBox *comboSpecific;
|
||||
QLineEdit *dispValues;
|
||||
QPushButton *btnValues;
|
||||
QSpinBox *spinNumPos;
|
||||
QComboBox *comboPos;
|
||||
QPushButton *btnDelete;
|
||||
QCheckBox *chkInvert;
|
||||
QCheckBox *chkSeparate;
|
||||
QCheckBox *chkReturn;
|
||||
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up all the slots and signals */
|
||||
/** 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
|
||||
* @param index value chosen*/
|
||||
* @param index value chosen
|
||||
* */
|
||||
void SetScript(int index);
|
||||
|
||||
/** Enables widgets depending on which size is clicked.
|
||||
* Options: constant size,specific values,values from file */
|
||||
void EnableSizeWidgets();
|
||||
|
||||
/** Browse for the script
|
||||
* */
|
||||
void BrowsePath();
|
||||
@ -133,17 +75,6 @@ void SetScriptFile();
|
||||
* */
|
||||
void SetParameter(const QString& parameter);
|
||||
|
||||
/** Sets the number of positions
|
||||
* */
|
||||
void SetNumPositions(int index);
|
||||
|
||||
/** Deletes current position
|
||||
* */
|
||||
void DeletePosition();
|
||||
|
||||
|
||||
signals:
|
||||
void EnableScanBox(bool,int);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user