diff --git a/slsDetectorGui/forms/form_detectormain.ui b/slsDetectorGui/forms/form_detectormain.ui
index 59dee1c8b..3a1a8c03f 100644
--- a/slsDetectorGui/forms/form_detectormain.ui
+++ b/slsDetectorGui/forms/form_detectormain.ui
@@ -10,7 +10,7 @@
0
0
800
- 822
+ 800
@@ -39,12 +39,9 @@
false
-
- QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks
-
-
+
0
0
@@ -52,13 +49,13 @@
0
- 0
+ 395
524287
- 450
+ 395
@@ -71,6 +68,24 @@
25
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
9
@@ -132,13 +147,13 @@
38
- 369
+ 200
524287
- 524287
+ 390
@@ -251,8 +266,11 @@
+
+ true
+
-
+
0
0
diff --git a/slsDetectorGui/forms/form_tab_actions.ui b/slsDetectorGui/forms/form_tab_actions.ui
index f893e09ef..69f2bbc34 100644
--- a/slsDetectorGui/forms/form_tab_actions.ui
+++ b/slsDetectorGui/forms/form_tab_actions.ui
@@ -6,12 +6,12 @@
0
0
- 748
+ 734
339
-
+
0
0
@@ -24,26 +24,13 @@
- 1000
- 1000
+ 16777215
+ 16777215
Form
-
-
-
- 224
- 223
- 75
- 25
-
-
-
- PushButton
-
-
diff --git a/slsDetectorGui/forms/form_tab_advanced.ui b/slsDetectorGui/forms/form_tab_advanced.ui
index afdfb5593..b871f7575 100644
--- a/slsDetectorGui/forms/form_tab_advanced.ui
+++ b/slsDetectorGui/forms/form_tab_advanced.ui
@@ -47,8 +47,8 @@
- 52
- 106
+ 10
+ 14
91
41
@@ -67,8 +67,8 @@ Temperature
- 222
- 132
+ 180
+ 40
151
21
@@ -90,8 +90,8 @@ Temperature
- 162
- 102
+ 120
+ 10
41
20
@@ -103,8 +103,8 @@ Temperature
- 162
- 132
+ 120
+ 40
41
20
@@ -116,8 +116,8 @@ Temperature
- 222
- 102
+ 180
+ 10
151
21
diff --git a/slsDetectorGui/forms/form_tab_dataoutput.ui b/slsDetectorGui/forms/form_tab_dataoutput.ui
index 628d20f66..dc489de08 100644
--- a/slsDetectorGui/forms/form_tab_dataoutput.ui
+++ b/slsDetectorGui/forms/form_tab_dataoutput.ui
@@ -31,41 +31,182 @@
Form
-
+
- 157
- 256
- 75
- 25
+ 20
+ 75
+ 691
+ 206
-
- PushButton
+
+ Correction
+
+
+
+ 10
+ 20
+ 671
+ 181
+
+
+
+ -
+
+
+ Flat Field File
+
+
+
+ -
+
+
+ Rate Correction
+
+
+
+ -
+
+
+ Angular Conversion
+
+
+
+ -
+
+
+ -
+
+
+ Acquire Flat Field Data
+
+
+
+ -
+
+
+ Auto
+
+
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Browse
+
+
+
+ -
+
+
+ Custom dead time(ns):
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Discard Bad Channels
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ :
+
+
+
+ -
+
+
+ :
+
+
+
+
+
-
+
- 10
- 10
- 108
- 16
+ 19
+ 20
+ 701
+ 41
-
- Output Directory:
+
+ QFrame::NoFrame
-
-
-
-
- 118
- 10
- 113
- 21
-
+
+ QFrame::Plain
+
+
+
+ 0
+ 6
+ 691
+ 28
+
+
+
+
+ -1
+
+ -
+
+
+ Output Directory:
+
+
+
+ -
+
+
+ -
+
+
+ Browse
+
+
+
+
+
diff --git a/slsDetectorGui/forms/form_tab_measurement.ui b/slsDetectorGui/forms/form_tab_measurement.ui
index b98832ec9..17e938b1e 100644
--- a/slsDetectorGui/forms/form_tab_measurement.ui
+++ b/slsDetectorGui/forms/form_tab_measurement.ui
@@ -11,7 +11,7 @@
-
+
0
0
@@ -25,7 +25,7 @@
1000
- 1000
+ 339
@@ -149,646 +149,11 @@
Form
-
-
-
- 20
- 10
- 321
- 130
-
-
-
-
- -1
-
- -
-
-
- Number of Measurements:
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Number of measurements (not in real time) that will be acquired.
- #frames#
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
- 2000000000
-
-
- 1
-
-
-
- -
-
-
- File Name:
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Root of the file name - please check that the output directory is correctly set and select the file name format.
- #fname#
-
-
-
-
-
-
- -
-
-
- Run Index:
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Run index (automatically incremented)
- #index#
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 2000000000
-
-
- 0
-
-
-
-
-
-
-
-
- 390
- 11
- 322
- 321
-
-
-
- -
-
-
- false
-
-
- Number of Triggers:
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Run index (automatically incremented)
- #index#
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 2000000000
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Delay After Trigger:
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Frame period between exposures.
- #period#
-
-
- 2000000000.000000000000000
-
-
- 0.000000000000000
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- 2
-
-
-
-
- hr
-
-
- -
-
- min
-
-
- -
-
- s
-
-
- -
-
- ms
-
-
- -
-
- us
-
-
- -
-
- ns
-
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Number of Gates:
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Run index (automatically incremented)
- #index#
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 2000000000
-
-
- 0
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Number of Probes:
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Run index (automatically incremented)
- #index#
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 2000000000
-
-
- 0
-
-
-
- -
-
-
- Timing Mode:
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Settings of the detector.
- #settings#
-
-
-
-
- None
-
-
- -
-
- Auto
-
-
- -
-
- Gated
-
-
- -
-
- Trigger Exposure
-
-
- -
-
- Trigger Frame
-
-
- -
-
- Trigger Readout
-
-
- -
-
- Gated with Start Trigger
-
-
- -
-
- External Trigger Window
-
-
-
-
- -
-
-
- false
-
-
- Number of Frames:
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Number of measurements (not in real time) that will be acquired.
- #frames#
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
- 2000000000
-
-
- 1
-
-
-
- -
-
-
- false
-
-
- Exposure Time:
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Exposure time of each frame.
- #exptime#
-
-
- 2000000000.000000000000000
-
-
- 0.000000000000000
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- 2
-
-
-
-
- hr
-
-
- -
-
- min
-
-
- -
-
- s
-
-
- -
-
- ms
-
-
- -
-
- us
-
-
- -
-
- ns
-
-
-
-
- -
-
-
- false
-
-
- Acquisition Period:
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- Frame period between exposures.
- #period#
-
-
- 2000000000.000000000000000
-
-
- 0.000000000000000
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
- 2
-
-
-
-
- hr
-
-
- -
-
- min
-
-
- -
-
- s
-
-
- -
-
- ms
-
-
- -
-
- us
-
-
- -
-
- ns
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 10
- 20
-
-
-
-
-
-
20
- 170
+ 179
319
90
@@ -849,7 +214,7 @@
20
- 280
+ 289
319
31
@@ -870,6 +235,673 @@
Start
+
+
+
+ 352
+ 8
+ 362
+ 342
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Plain
+
+
+
+
+ 35
+ 10
+ 322
+ 321
+
+
+
+ -
+
+
+ false
+
+
+ Number of Triggers:
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Run index (automatically incremented)
+ #index#
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+ 2000000000
+
+
+ 0
+
+
+
+ -
+
+
+ false
+
+
+ Delay After Trigger:
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Frame period between exposures.
+ #period#
+
+
+ 2000000000.000000000000000
+
+
+ 0.000000000000000
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ 2
+
+
-
+
+ hr
+
+
+ -
+
+ min
+
+
+ -
+
+ s
+
+
+ -
+
+ ms
+
+
+ -
+
+ us
+
+
+ -
+
+ ns
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Number of Gates:
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Run index (automatically incremented)
+ #index#
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+ 2000000000
+
+
+ 0
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Number of Probes:
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Run index (automatically incremented)
+ #index#
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+ 2000000000
+
+
+ 0
+
+
+
+ -
+
+
+ Timing Mode:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Settings of the detector.
+ #settings#
+
+
-
+
+ None
+
+
+ -
+
+ Auto
+
+
+ -
+
+ Gated
+
+
+ -
+
+ Trigger Exposure
+
+
+ -
+
+ Trigger Frame
+
+
+ -
+
+ Trigger Readout
+
+
+ -
+
+ Gated with Start Trigger
+
+
+ -
+
+ External Trigger Window
+
+
+
+
+ -
+
+
+ false
+
+
+ Number of Frames:
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Number of measurements (not in real time) that will be acquired.
+ #frames#
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+ 2000000000
+
+
+ 1
+
+
+
+ -
+
+
+ false
+
+
+ Exposure Time:
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Exposure time of each frame.
+ #exptime#
+
+
+ 2000000000.000000000000000
+
+
+ 0.000000000000000
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ 2
+
+
-
+
+ hr
+
+
+ -
+
+ min
+
+
+ -
+
+ s
+
+
+ -
+
+ ms
+
+
+ -
+
+ us
+
+
+ -
+
+ ns
+
+
+
+
+ -
+
+
+ false
+
+
+ Acquisition Period:
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ Frame period between exposures.
+ #period#
+
+
+ 2000000000.000000000000000
+
+
+ 0.000000000000000
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+ 2
+
+
-
+
+ hr
+
+
+ -
+
+ min
+
+
+ -
+
+ s
+
+
+ -
+
+ ms
+
+
+ -
+
+ us
+
+
+ -
+
+ ns
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 10
+ 20
+
+
+
+
+
+
+
+
+
+
+ 10
+ 5
+ 336
+ 159
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Plain
+
+
+
+
+ 10
+ 13
+ 321
+ 130
+
+
+
+
+ -1
+
+ -
+
+
+ Number of Measurements:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Number of measurements (not in real time) that will be acquired.
+ #frames#
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+ 2000000000
+
+
+ 1
+
+
+
+ -
+
+
+ File Name:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Root of the file name - please check that the output directory is correctly set and select the file name format.
+ #fname#
+
+
+
+
+
+
+ -
+
+
+ Run Index:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Run index (automatically incremented)
+ #index#
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+ 2000000000
+
+
+ 0
+
+
+
+
+
+
diff --git a/slsDetectorGui/forms/form_tab_plot.ui b/slsDetectorGui/forms/form_tab_plot.ui
index 5f485af19..598c64587 100644
--- a/slsDetectorGui/forms/form_tab_plot.ui
+++ b/slsDetectorGui/forms/form_tab_plot.ui
@@ -7,11 +7,11 @@
0
0
734
- 339
+ 345
-
+
0
0
@@ -37,12 +37,15 @@
10
130
711
- 151
+ 146
Plot Axis
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
false
@@ -288,12 +291,15 @@
11
70
571
- 51
+ 46
2D Plot Options
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
false
@@ -350,7 +356,7 @@
10
10
571
- 51
+ 46
@@ -474,6 +480,9 @@
1D Plot Options
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
false
@@ -482,20 +491,26 @@
10
20
- 551
- 27
+ 641
+ 21
-
-
+ Superimpose
-
+
+
+ 0
+ 0
+
+
Qt::NoFocus
@@ -509,22 +524,27 @@
Qt::Horizontal
+
+ QSizePolicy::Fixed
+
- 40
- 20
+ 400
+ 10
+ gridLayoutWidget_3
+ groupBox_2
10
- 288
+ 290
711
51
@@ -532,11 +552,17 @@
Save
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ false
+
10
- 13
+ 15
698
31
@@ -645,24 +671,33 @@
+
+ true
+
599
10
121
- 111
+ 81
Clone
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ false
+
- 20
- 20
- 81
- 81
+ 5
+ 10
+ 111
+ 76
@@ -673,7 +708,7 @@
9
- 13
+ -1
-
diff --git a/slsDetectorGui/include/qActionsWidget.h b/slsDetectorGui/include/qActionsWidget.h
new file mode 100644
index 000000000..edb4fdc08
--- /dev/null
+++ b/slsDetectorGui/include/qActionsWidget.h
@@ -0,0 +1,84 @@
+/*
+ * qTabActions.h
+ *
+ * Created on: May 10, 2012
+ * Author: l_maliakal_d
+ */
+
+#ifndef QACTIONSWIDGET_H_
+#define QACTIONSWIDGET_H_
+#include
+class QGridLayout;
+class QComboBox;
+class QLineEdit;
+class QPushButton;
+class QLabel;
+class QSpinBox;
+class QGroupBox;
+class QRadioButton;
+
+
+class ActionsWidget : public QFrame{
+ Q_OBJECT
+
+public:
+ /** \short The constructor
+ * @param parent is the parent tab widget
+ * @param detector is the detector returned from the detector tab
+ */
+ ActionsWidget(QWidget *parent, int scanType);
+
+ ~ActionsWidget();
+
+private:
+ 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;
+
+ /** Sets up the widget
+ * @param scanType 1 if it includes Threshold Scan,Energy Scan and Trimbits Scan, else 0*/
+ void SetupWidgetWindow(int scanType);
+
+ /** Sets up all the slots and signals */
+ void Initialization();
+
+
+private slots:
+/** Sets the scan or script. Accordingly enables, disables other widgets
+ * @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();
+
+
+
+protected:
+};
+
+
+
+
+#endif /* QACTIONSWIDGET_H_ */
+
diff --git a/slsDetectorGui/include/qDetectorMain.h b/slsDetectorGui/include/qDetectorMain.h
index 66d63e620..bebc826d7 100644
--- a/slsDetectorGui/include/qDetectorMain.h
+++ b/slsDetectorGui/include/qDetectorMain.h
@@ -25,6 +25,23 @@ class slsDetectorUtils;
/** Qt Include Headers */
#include
#include
+#include
+
+class MyTabWidget:public QTabWidget
+{
+public:
+ MyTabWidget(QWidget* parent = 0)
+ {
+ setParent(parent);
+ }
+
+ //Overridden method from QTabWidget
+ QTabBar* tabBar()
+ {
+ return QTabWidget::tabBar();
+ }
+};
+
/**
*@short Main window of the GUI.
@@ -56,12 +73,13 @@ private:
/** The Plot widget */
qDrawPlot *myPlot;
/**Tab Widget */
- QTabWidget *tabs;
+ MyTabWidget *tabs;
/**Layout of the central Widget */
QGridLayout *layoutTabs;
- /** height of Plot Window when undocked */
+ /** default height of Plot Window when docked */
int heightPlotWindow;
-
+ /** default height of central widgetwhen plot Window when docked */
+ int heightCentralWidget;
/** enumeration of the tabs */
enum {Measurement, DataOutput, Plot, Actions, Settings, Advanced, Debugging, Developer, NumberOfTabs };
@@ -83,6 +101,8 @@ private:
qTabDebugging *tab_debugging;
/**Developer tab */
qTabDeveloper *tab_developer;
+ /**if the developer tab should be enabled,known from command line */
+ int isDeveloper;
/**Sets up the layout of the widget
@@ -163,6 +183,12 @@ void ResizeMainWindow(bool b);
*/
void SetTerminalWindowSize(bool b);
+/** Enables/disables tabs depending on if acquisition is currently in progress
+ */
+void EnableTabs();
+
+protected:
+void resizeEvent(QResizeEvent* event);
signals:
diff --git a/slsDetectorGui/include/qTabActions.h b/slsDetectorGui/include/qTabActions.h
index 5f9408c1d..48c15114c 100644
--- a/slsDetectorGui/include/qTabActions.h
+++ b/slsDetectorGui/include/qTabActions.h
@@ -8,15 +8,25 @@
#ifndef QTABACTIONS_H_
#define QTABACTIONS_H_
+
/** Form Header */
#include "ui_form_tab_actions.h"
/** Project Class Headers */
class slsDetectorUtils;
+class ActionsWidget;
+
+
+class QPushButton;
+class QLabel;
+class QScrollArea;
+class QGridLayout;
+class QPalette;
+
/**
*@short sets up the acions parameters
*/
-class qTabActions:public QWidget, private Ui::TabActionsObject{
+class qTabActions:public QWidget,private Ui::TabActionsObject{
Q_OBJECT
public:
@@ -35,18 +45,32 @@ private:
/** The sls detector object */
slsDetectorUtils *myDet;
- /** Sets up the widget
- */
+ static const int NUM_ACTION_WIDGETS = 9;
+
+ QGridLayout *gridLayout;
+ QButtonGroup *group;
+ QPalette *palette;
+
+ /** action widget objects */
+ ActionsWidget *actionWidget[NUM_ACTION_WIDGETS];
+ QPushButton *btnExpand[NUM_ACTION_WIDGETS];
+ QLabel *lblName[NUM_ACTION_WIDGETS];
+
+ /** Sets up the widget */
void SetupWidgetWindow();
- /** Sets up all the slots and signals
- */
+ /** Sets up all the slots and signals */
void Initialization();
- /** Enables/Disables all the widgets
- */
+ /** Enables/Disables all the widgets */
void Enable(bool enable);
+
+private slots:
+/** To Expand the Action Widget */
+void Expand(QAbstractButton *button);
+
};
#endif /* QTABACTIONS_H_ */
+
diff --git a/slsDetectorGui/include/qTabDataOutput.h b/slsDetectorGui/include/qTabDataOutput.h
index 9d3183a72..1a0781ae0 100644
--- a/slsDetectorGui/include/qTabDataOutput.h
+++ b/slsDetectorGui/include/qTabDataOutput.h
@@ -12,6 +12,9 @@
#include "ui_form_tab_dataoutput.h"
/** Project Class Headers */
class slsDetectorUtils;
+/** Qt Include Headers */
+#include
+
/**
*@short sets up the DataOutput parameters
@@ -35,18 +38,28 @@ private:
/** The sls detector object */
slsDetectorUtils *myDet;
- /** Sets up the widget
- */
+ /** Output Directory */
+ QString outputDir;
+
+/** methods */
+ /** Sets up the widget */
void SetupWidgetWindow();
- /** Sets up all the slots and signals
- */
+ /** Sets up all the slots and signals */
void Initialization();
- /** Enables/Disables all the widgets
- */
+ /** Enables/Disables all the widgets */
void Enable(bool enable);
+
+private slots:
+/** Sets the output directory
+ * @param path output path to be set
+ */
+void setOutputDir(const QString& path);
+
+/** Open dialog to choose the output directory */
+void browseOutputDir();
};
diff --git a/slsDetectorGui/include/qTabMeasurement.h b/slsDetectorGui/include/qTabMeasurement.h
index 2cc07f134..1ebbaab99 100644
--- a/slsDetectorGui/include/qTabMeasurement.h
+++ b/slsDetectorGui/include/qTabMeasurement.h
@@ -70,6 +70,7 @@ private:
public slots:
+
/** update plot is finished,
* changes start/stop text and enables/disables all widgets
*/
@@ -77,7 +78,6 @@ void UpdateFinished();
-
private slots:
/** Set file name
* @param fName name of file
@@ -133,7 +133,8 @@ void setNumProbes(int val);
signals:
-
+void StartSignal();
+void StopSignal();
};
diff --git a/slsDetectorGui/slsDetectorGui.pro b/slsDetectorGui/slsDetectorGui.pro
index 0b858394a..242c91771 100644
--- a/slsDetectorGui/slsDetectorGui.pro
+++ b/slsDetectorGui/slsDetectorGui.pro
@@ -50,6 +50,7 @@ SOURCES = \
src/qTabDataOutput.cpp\
src/qTabPlot.cpp\
src/qTabActions.cpp\
+ src/qActionsWidget.cpp\
src/qTabAdvanced.cpp\
src/qTabSettings.cpp\
src/qTabDebugging.cpp\
@@ -72,6 +73,7 @@ HEADERS = \
include/qTabDataOutput.h\
include/qTabPlot.h\
include/qTabActions.h\
+ include/qActionsWidget.h\
include/qTabAdvanced.h\
include/qTabSettings.h\
include/qTabDebugging.h\
diff --git a/slsDetectorGui/src/qActionsWidget.cpp b/slsDetectorGui/src/qActionsWidget.cpp
new file mode 100644
index 000000000..b1c7ea074
--- /dev/null
+++ b/slsDetectorGui/src/qActionsWidget.cpp
@@ -0,0 +1,264 @@
+/*
+ * qTabActions.cpp
+ *
+ * Created on: May 10, 2012
+ * Author: l_maliakal_d
+ */
+
+/** Qt Project Class Headers */
+#include "qActionsWidget.h"
+/** Qt Include Headers */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+/** C++ Include Headers */
+#include
+using namespace std;
+
+
+#define Detector_Index 0
+
+
+ActionsWidget::ActionsWidget(QWidget *parent, int scanType): QFrame(parent){
+ SetupWidgetWindow(scanType);
+ Initialization();
+}
+
+
+
+
+
+ActionsWidget::~ActionsWidget(){
+ delete layout;
+}
+
+
+
+
+void ActionsWidget::SetupWidgetWindow(int scanType){
+ /** Widget Settings */
+ //setFrameStyle(QFrame::Box);
+ //setFrameShadow(QFrame::Raised);
+ setFixedHeight(25);
+ if(scanType) setFixedHeight(125);
+
+
+ /** Main Layout Settings */
+ layout = new QGridLayout(this);
+ setLayout(layout);
+ layout->setContentsMargins(0,0,0,0);
+ if(scanType) layout->setVerticalSpacing(5);
+
+
+ /** Main Widgets*/
+ comboScript = new QComboBox(this);
+ if(!scanType){
+ comboScript->addItem("None");
+ comboScript->addItem("Custom Script");
+ }else{
+ comboScript->addItem("None");
+ comboScript->addItem("Energy Scan");
+ comboScript->addItem("Threshold Scan");
+ comboScript->addItem("Trimbits Scan");
+ comboScript->addItem("Custom Script");
+ }
+ layout->addWidget(comboScript,0,0);
+ layout->addItem(new QSpacerItem(20,20,QSizePolicy::Fixed,QSizePolicy::Fixed),0,1);
+ dispScript = new QLineEdit("None");
+ dispScript->setEnabled(false);
+ layout->addWidget(dispScript,0,2);
+ btnBrowse = new QPushButton("Browse");
+ btnBrowse->setEnabled(false);
+ layout->addWidget(btnBrowse,0,3);
+ layout->addItem(new QSpacerItem(20,20,QSizePolicy::Fixed,QSizePolicy::Fixed),0,4);
+ lblParameter = new QLabel("Additional Parameter:");
+ lblParameter->setEnabled(false);
+ layout->addWidget(lblParameter,0,5);
+ dispParameter = new QLineEdit("None");
+ dispParameter->setEnabled(false);
+ dispParameter->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ layout->addWidget(dispParameter,0,6);
+
+
+
+ /** Scan Levels Widgets*/
+ if(scanType){
+ lblSteps = new QLabel("Number of Steps:");
+ lblSteps->setEnabled(false);
+ layout->addWidget(lblSteps,1,2);
+ spinSteps = new QSpinBox(this);
+ spinSteps->setEnabled(false);
+ layout->addWidget(spinSteps,1,3);
+ lblPrecision = new QLabel("Precision:");
+ lblPrecision->setEnabled(false);
+ layout->addWidget(lblPrecision,1,5);
+ spinPrecision = new QSpinBox(this);
+ spinPrecision->setEnabled(false);
+ layout->addWidget(spinPrecision,1,6);
+ group = new QGroupBox(this);
+ group->setEnabled(false);
+ /** Fix the size of the groupbox*/
+ group->setFixedSize(513,66);
+ layout->addWidget(group,2,2,1,5);
+
+
+ /** Group Box for step size */
+ /** Radio Buttons Layout */
+ QWidget *h1Widget = new QWidget(group);
+ h1Widget->setGeometry(QRect(10, 5, group->width()-20, 23));
+ QHBoxLayout *h1 = new QHBoxLayout(h1Widget);
+ h1->setContentsMargins(0, 0, 0, 0);
+ radioConstant = new QRadioButton("Constant Step Size",h1Widget);
+ radioConstant->setChecked(true);
+ h1->addWidget(radioConstant);
+ radioSpecific = new QRadioButton("Specific Values",h1Widget);
+ h1->addWidget(radioSpecific);
+ radioValue = new QRadioButton("Values from File",h1Widget);
+ radioValue->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ h1->addWidget(radioValue);
+
+ /** Constant Size Layout */
+ QWidget *h2ConstantWidget = new QWidget(group);
+ h2ConstantWidget->setGeometry(QRect(10, 30, group->width()-20, 31));
+ QHBoxLayout *h2Constant = new QHBoxLayout(h2ConstantWidget);
+ h2Constant->setContentsMargins(0, 0, 0, 0);
+
+ h2Constant->addItem(new QSpacerItem(50,20,QSizePolicy::Fixed,QSizePolicy::Fixed));
+ lblFrom = new QLabel("from",h2ConstantWidget);
+ lblFrom->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ h2Constant->addWidget(lblFrom);
+ spinFrom = new QSpinBox(h2ConstantWidget);
+ h2Constant->addWidget(spinFrom);
+ lblTo = new QLabel("to",h2ConstantWidget);
+ lblTo->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ h2Constant->addWidget(lblTo);
+ spinTo = new QSpinBox(h2ConstantWidget);
+ h2Constant->addWidget(spinTo);
+ h2Constant->addItem(new QSpacerItem(20,20,QSizePolicy::Fixed,QSizePolicy::Fixed));
+ lblSize = new QLabel("Size",h2ConstantWidget);
+ lblSize->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ h2Constant->addWidget(lblSize);
+ spinSize = new QSpinBox(h2ConstantWidget);
+ h2Constant->addWidget(spinSize);
+ h2Constant->addItem(new QSpacerItem(50,20,QSizePolicy::Fixed,QSizePolicy::Fixed));
+
+ /** Specific Values Layout */
+ QWidget *h2SpecificWidget = new QWidget(group);
+ h2SpecificWidget->setGeometry(QRect(10, 30, group->width()-20, 31));
+ QHBoxLayout *h2Specific = new QHBoxLayout(h2SpecificWidget);
+ h2Specific->setContentsMargins(0, 0, 0, 0);
+ h2Specific->addItem(new QSpacerItem(200,20,QSizePolicy::Fixed,QSizePolicy::Fixed));
+ comboSpecific = new QComboBox(h2SpecificWidget);
+ h2Specific->addWidget(comboSpecific);
+ comboSpecific->hide();
+ h2Specific->addItem(new QSpacerItem(200,20,QSizePolicy::Fixed,QSizePolicy::Fixed));
+
+ /** Values From a File Layout */
+ QWidget *h2ValuesWidget = new QWidget(group);
+ h2ValuesWidget->setGeometry(QRect(10, 30, group->width()-20, 31));
+ QHBoxLayout *h2Values = new QHBoxLayout(h2ValuesWidget);
+ h2Values->setContentsMargins(0, 0, 0, 0);
+ h2Values->addItem(new QSpacerItem(50,20,QSizePolicy::Fixed,QSizePolicy::Fixed));
+ dispValues = new QLineEdit("steps.txt",h2ValuesWidget);
+ dispValues->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
+ h2Values->addWidget(dispValues);
+ dispValues->hide();
+ btnValues = new QPushButton("Browse",h2ValuesWidget);
+ btnValues->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ h2Values->addWidget(btnValues);
+ btnValues->hide();
+ h2Values->addItem(new QSpacerItem(50,20,QSizePolicy::Fixed,QSizePolicy::Fixed));
+
+ }
+
+}
+
+
+
+void ActionsWidget::Initialization(){
+ connect(comboScript,SIGNAL(currentIndexChanged(int)),this,SLOT(SetScript(int)));
+ connect(radioConstant,SIGNAL(toggled(bool)),this,SLOT(EnableSizeWidgets()));
+ connect(radioSpecific,SIGNAL(toggled(bool)),this,SLOT(EnableSizeWidgets()));
+ connect(radioValue,SIGNAL(toggled(bool)),this,SLOT(EnableSizeWidgets()));
+}
+
+
+
+void ActionsWidget::SetScript(int index){
+ /** defaults */
+ dispScript->setEnabled(false);
+ btnBrowse->setEnabled(false);
+ lblParameter->setEnabled(false);
+ dispParameter->setEnabled(false);
+ if(comboScript->count()>2){
+ group->setEnabled(false);
+ lblSteps->setEnabled(false);
+ spinSteps->setEnabled(false);
+ lblPrecision->setEnabled(false);
+ spinPrecision->setEnabled(false);
+ }
+ /** If anything other than None is selected*/
+ if(index){
+ /** Custom Script only enables the first layout with addnl parameters etc */
+ if(!comboScript->currentText().compare("Custom Script")){
+ dispScript->setEnabled(true);
+ btnBrowse->setEnabled(true);
+ lblParameter->setEnabled(true);
+ dispParameter->setEnabled(true);
+ }
+ /** If this group includes Energy scan , threhold scan etc */
+ if(comboScript->count()>2){
+ group->setEnabled(true);
+ lblPrecision->setEnabled(true);
+ spinPrecision->setEnabled(true);
+ /** Steps are enabled only if constant step size is not checked*/
+ lblSteps->setEnabled(!radioConstant->isChecked());
+ spinSteps->setEnabled(!radioConstant->isChecked());
+ }
+ }
+}
+
+
+
+
+void ActionsWidget::EnableSizeWidgets(){
+ /** defaults */
+ lblFrom->hide();
+ spinFrom->hide();
+ lblTo->hide();
+ spinTo->hide();
+ lblSize->hide();
+ spinSize->hide();
+ comboSpecific->hide();
+ dispValues->hide();
+ btnValues->hide();
+ lblSteps->setEnabled(true);
+ spinSteps->setEnabled(true);
+ /** Constant Step Size */
+ if(radioConstant->isChecked()){
+ lblFrom->show();
+ spinFrom->show();
+ lblTo->show();
+ spinTo->show();
+ lblSize->show();
+ spinSize->show();
+ lblSteps->setEnabled(false);
+ spinSteps->setEnabled(false);
+ }/** Specific Values */
+ else if(radioSpecific->isChecked())
+ comboSpecific->show();
+ /** Values from a File */
+ else{
+ dispValues->show();
+ btnValues->show();
+ }
+}
+
diff --git a/slsDetectorGui/src/qCloneWidget.cpp b/slsDetectorGui/src/qCloneWidget.cpp
index ad6557b9f..fd458a62a 100644
--- a/slsDetectorGui/src/qCloneWidget.cpp
+++ b/slsDetectorGui/src/qCloneWidget.cpp
@@ -52,7 +52,6 @@ void qCloneWidget::SetupWidgetWindow(QString title,int numDim,SlsQt1DPlot*& plot
gridClone = new QGridLayout(cloneBox);
cloneBox->setLayout(gridClone);
cloneBox->setContentsMargins(0,0,0,0);
- //cloneBox->resize(400,200);
cloneBox->setTitle(title);
cloneBox->setAlignment(Qt::AlignHCenter);
cloneBox->setFont(QFont("Sans Serif",11,QFont::Bold));
@@ -86,6 +85,7 @@ void qCloneWidget::SetupWidgetWindow(QString title,int numDim,SlsQt1DPlot*& plot
hLayoutSave->setSpacing(0);
/** file name */
dispFName = new QLineEdit(this);
+ dispFName->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
hLayoutSave->addWidget(dispFName);
/** file format */
comboFormat = new QComboBox(this);
@@ -118,6 +118,8 @@ void qCloneWidget::SetupWidgetWindow(QString title,int numDim,SlsQt1DPlot*& plot
/** Save */
connect(btnSave, SIGNAL(clicked()), this, SLOT(SavePlot()));
+ setMinimumHeight(300);
+ resize(500,350);
}
diff --git a/slsDetectorGui/src/qDetectorMain.cpp b/slsDetectorGui/src/qDetectorMain.cpp
index 5b5ec9fca..3d5090da2 100644
--- a/slsDetectorGui/src/qDetectorMain.cpp
+++ b/slsDetectorGui/src/qDetectorMain.cpp
@@ -36,7 +36,7 @@ int main (int argc, char **argv) {
qDetectorMain::qDetectorMain(int argc, char **argv, QApplication *app, QWidget *parent) :
- QMainWindow(parent), theApp(app),myPlot(NULL),tabs(NULL){
+ QMainWindow(parent), theApp(app),myPlot(NULL),tabs(NULL),isDeveloper(0){
myDet = 0;
setupUi(this);
SetUpWidgetWindow();
@@ -44,7 +44,7 @@ qDetectorMain::qDetectorMain(int argc, char **argv, QApplication *app, QWidget *
/**need to use argc and argv to determine which slsdet or multidet to use.*/
for(int iarg=1; iargsetFixedHeight(centralwidget->height());
}
@@ -88,7 +86,7 @@ void qDetectorMain::SetUpWidgetWindow(){
dockWidgetPlot->setWidget(myPlot);
/**tabs setup*/
- tabs = new QTabWidget(this);
+ tabs = new MyTabWidget(this);
layoutTabs->addWidget(tabs);
/** creating all the tab widgets */
tab_measurement = new qTabMeasurement (this, myDet,myPlot);
@@ -114,6 +112,7 @@ void qDetectorMain::SetUpWidgetWindow(){
scroll[Debugging] ->setWidget(tab_debugging);
scroll[Developer] ->setWidget(tab_developer);
+
/** inserting all the tabs*/
tabs->insertTab(Measurement, scroll[Measurement], "Measurement");
tabs->insertTab(DataOutput, scroll[DataOutput], "Data Output");
@@ -130,6 +129,9 @@ void qDetectorMain::SetUpWidgetWindow(){
SetExpertMode(false);
SetDeveloperMode(false);
+ tabs->tabBar()->setTabTextColor(0,QColor(0,0,200,255));
+
+
}
@@ -172,6 +174,9 @@ void qDetectorMain::Initialization(){
/** Plotting */
/** When the acquisition is finished, must update the meas tab */
+ connect(tab_measurement, SIGNAL(StartSignal()), this,SLOT(EnableTabs()));
+ connect(tab_measurement, SIGNAL(StopSignal()), this,SLOT(EnableTabs()));
+ connect(myPlot, SIGNAL(UpdatingPlotFinished()), this,SLOT(EnableTabs()));
connect(myPlot, SIGNAL(UpdatingPlotFinished()), tab_measurement,SLOT(UpdateFinished()));
@@ -195,7 +200,7 @@ void qDetectorMain::Initialization(){
connect(actionVersion,SIGNAL(triggered()),this,SLOT(Version()));
heightPlotWindow = dockWidgetPlot->size().height();
-
+ heightCentralWidget = centralwidget->size().height();
}
@@ -224,9 +229,8 @@ void qDetectorMain::SetExpertMode(bool b){
#ifdef VERBOSE
cout<<"Setting Expert Mode to "<setTabEnabled(Advanced,b);
- tab_advanced->setEnabled(b);
+
}
@@ -237,6 +241,13 @@ void qDetectorMain::refresh(int index){
else{
;
}
+ for(int i=0;iisTabEnabled(i))
+ tabs->tabBar()->setTabTextColor(i,Qt::black);
+ else
+ tabs->tabBar()->setTabTextColor(i,Qt::gray);
+ }
+ tabs->tabBar()->setTabTextColor(index,QColor(0,0,200,255));
}
@@ -324,24 +335,45 @@ void qDetectorMain::ResizeMainWindow(bool b){
cout<<"Resizing Main Window: height:"<setMinimumHeight(0);
+ cout<<"undocking it from main window"<setMinimumHeight(heightPlotWindow);
-
+ /** the minimum for plot will be set when the widget gets resized automatically*/
}
-
-
}
+
+void qDetectorMain::resizeEvent(QResizeEvent* event){
+ if(!dockWidgetPlot->isFloating()){
+ if(tabs->currentIndex()== Actions){
+ dockWidgetPlot->setMinimumHeight(heightPlotWindow-100);
+ centralwidget->setMaximumHeight(QWIDGETSIZE_MAX);
+
+ }
+ else{
+ dockWidgetPlot->setMinimumHeight(height()-centralwidget->height()-50);
+ centralwidget->setMaximumHeight(heightCentralWidget);
+ }
+ }
+#ifdef VERBOSE
+ cout<<"height:"<height()<setMinimumWidth(width()/2);
}
@@ -350,5 +382,34 @@ void qDetectorMain::SetTerminalWindowSize(bool b){
dockWidgetTerminal->setMinimumWidth(38);
QSizePolicy sizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
dockWidgetTerminal->setSizePolicy(sizePolicy);
+ }*/
+}
+
+
+
+void qDetectorMain::EnableTabs(){
+ bool enable;
+ enable=(tabs->isTabEnabled(DataOutput)?false:true);
+
+ // or use the Enable/Disable button
+ /** normal tabs*/
+ tabs->setTabEnabled(DataOutput,enable);
+ tabs->setTabEnabled(Actions,enable);
+ tabs->setTabEnabled(Settings,enable);
+
+ /** special tabs */
+ if(enable==false){
+ tabs->setTabEnabled(Debugging,enable);
+ tabs->setTabEnabled(Advanced,enable);
+ tabs->setTabEnabled(Developer,enable);
+ }
+ else{
+ /** enable these tabs only if they were enabled earlier */
+ if(actionDebug->isChecked())
+ tabs->setTabEnabled(Debugging,enable);
+ if(actionExpert->isChecked())
+ tabs->setTabEnabled(Advanced,enable);
+ if(isDeveloper)
+ tabs->setTabEnabled(Developer,enable);
}
}
diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp
index ba249a1c0..954f5b3c1 100644
--- a/slsDetectorGui/src/qDrawPlot.cpp
+++ b/slsDetectorGui/src/qDrawPlot.cpp
@@ -286,14 +286,14 @@ void* qDrawPlot::AcquireImages(){
/* if(framePeriodtitle(),(int)plot_in_scope,plot1D,plot2D,myDet->getFilePath());
if(plot_in_scope==1){
plot1D = new SlsQt1DPlot(boxPlot);
@@ -454,11 +457,16 @@ void qDrawPlot::ClonePlot(){
plot2D->SetZTitle(imageZAxisTitle);
plotLayout->addWidget(plot2D,1,1,1,1);
}
+ setMinimumHeight(preheight);
+ resize(width(),preheight);
+ /** update the actual plot */
UpdatePlot();
connect(this, SIGNAL(InterpolateSignal(bool)), plot2D, SIGNAL(InterpolateSignal(bool)));
connect(this, SIGNAL(ContourSignal(bool)), plot2D, SIGNAL(ContourSignal(bool)));
connect(this, SIGNAL(LogzSignal(bool)), plot2D, SLOT(SetZScaleToLog(bool)));
winClone[i]->show();
+
+ /** to remember which all clone widgets were closed*/
connect(winClone[i], SIGNAL(CloneClosedSignal(int)),this, SLOT(CloneCloseEvent(int)));
}
diff --git a/slsDetectorGui/src/qTabActions.cpp b/slsDetectorGui/src/qTabActions.cpp
index d79d9a765..bc7318f65 100644
--- a/slsDetectorGui/src/qTabActions.cpp
+++ b/slsDetectorGui/src/qTabActions.cpp
@@ -7,9 +7,18 @@
/** Qt Project Class Headers */
#include "qTabActions.h"
#include "qDefs.h"
+#include "qActionsWidget.h"
/** Project Class Headers */
#include "slsDetector.h"
#include "multiSlsDetector.h"
+/** Qt Include Headers */
+
+#include
+#include
+#include
+#include
+#include
+#include
/** C++ Include Headers */
#include
using namespace std;
@@ -20,7 +29,7 @@ using namespace std;
qTabActions::qTabActions(QWidget *parent,slsDetectorUtils*& detector):QWidget(parent),myDet(detector){
- setupUi(this);
+ //setupUi(this);
if(myDet)
{
SetupWidgetWindow();
@@ -39,20 +48,209 @@ qTabActions::~qTabActions(){
void qTabActions::SetupWidgetWindow(){
+ setupUi(this);
+ /** Window Settings*/
+ setFixedSize(705,350);
+ setContentsMargins(0,0,0,0);
+
+ /** Scroll Area Settings*/
+ QScrollArea *scroll = new QScrollArea;
+ scroll->setWidget(this);
+ scroll->setWidgetResizable(true);
+
+ /** Layout Settings*/
+ gridLayout = new QGridLayout(scroll);
+ setLayout(gridLayout);
+ gridLayout->setContentsMargins(10,5,0,0);
+ gridLayout->setVerticalSpacing(2);
+
+ /** Buttongroup to know which +/- button was clicked*/
+ group = new QButtonGroup(this);
+ palette = new QPalette();
+
+ /** For each level of Actions */
+ for(int i=0;isetFixedSize(20,20);
+ lblName[i] = new QLabel("");
+ group->addButton(btnExpand[i],i);
+ gridLayout->addWidget(btnExpand[i],(i*2),0);
+ gridLayout->addWidget(lblName[i],(i*2),1);
+ gridLayout->addWidget(actionWidget[i],(i*2)+1,1,1,2);
+
+ }
+
+ /** Label Values */
+ lblName[0]->setText("Action at Start");
+ lblName[1]->setText("Scan Level 0");
+ lblName[2]->setText("Scan Level 1");
+ lblName[3]->setText("Action before each Frame");
+ lblName[4]->setText("Number of Positions");
+ lblName[5]->setText("Header before Frame");
+ lblName[6]->setText("Header after Frame");
+ lblName[7]->setText("Action after each Frame");
+ lblName[8]->setText("Action at Stop");
+
+ /** initially hide all the widgets*/
+ for(int i=0;ihide();
+
}
void qTabActions::Initialization(){
+ connect(group,SIGNAL(buttonClicked(QAbstractButton*)),this,SLOT(Expand(QAbstractButton*)));
+}
+
+
+
+
+void qTabActions::Enable(bool enable){
+
+
+}
+
+
+
+void qTabActions::Expand(QAbstractButton *button ){
+ int index = group->id(button);
+ /** Collapse */
+ if(!QString::compare(button->text(), "-")){
+ palette->setColor(QPalette::WindowText,Qt::black);
+ lblName[index]->setPalette(*palette);
+ actionWidget[index]->hide();
+ button->setText("+");
+ if((index==1)||(index==2))
+ setFixedHeight(height()-130);
+ else
+ setFixedHeight(height()-30);
+ }else{
+ /** Expand */
+ palette->setColor(QPalette::WindowText,QColor(0,0,200,255));
+ lblName[index]->setPalette(*palette);
+ actionWidget[index]->show();
+ button->setText("-");
+ if((index==1)||(index==2))
+ setFixedHeight(height()+130);
+ else
+ setFixedHeight(height()+30);
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+void qTabActions::Initialization(){
+ connect(radio0Constant, SIGNAL(toggled(bool)),this,SLOT(ChangeStepSize(bool)));
+ connect(radio0Specific, SIGNAL(toggled(bool)),this,SLOT(ChangeStepSize(bool)));
+ connect(radio0Value, SIGNAL(toggled(bool)),this,SLOT(ChangeStepSize(bool)));
+ connect(radio1Constant, SIGNAL(toggled(bool)),this,SLOT(ChangeStepSize(bool)));
+ connect(radio1Specific, SIGNAL(toggled(bool)),this,SLOT(ChangeStepSize(bool)));
+ connect(radio1Value, SIGNAL(toggled(bool)),this,SLOT(ChangeStepSize(bool)));
+
+ connect(btntry, SIGNAL(clicked()),this,SLOT(Trial()));
+
}
void qTabActions::Enable(bool enable){
- //this->setEnabled(enable);
+
}
+void qTabActions::ChangeStepSize(bool b){
+ * defaults
+ lbl0From->hide();
+ lbl0Size->hide();
+ lbl0To->hide();
+ spin0From->hide();
+ spin0Size->hide();
+ spin0To->hide();
+ combo0Specific->hide();
+ btn0Browse->hide();
+ disp0File->hide();
+ lbl1From->hide();
+ lbl1Size->hide();
+ lbl1To->hide();
+ spin1From->hide();
+ spin1Size->hide();
+ spin1To->hide();
+ combo1Specific->hide();
+ btn1Browse->hide();
+ disp1File->hide();
+ *Scan 0
+ * constant step size
+ if(radio0Constant->isChecked()){
+ lbl0From->show();
+ lbl0Size->show();
+ lbl0To->show();
+ spin0From->show();
+ spin0Size->show();
+ spin0To->show();
+ }
+ * specific values
+ else if(radio0Specific->isChecked())
+ combo0Specific->show();
+ * values from a file
+ else{
+ btn0Browse->show();
+ disp0File->show();
+ }
+ *Scan 1
+ * constant step size
+ if(radio1Constant->isChecked()){
+ lbl1From->show();
+ lbl1Size->show();
+ lbl1To->show();
+ spin1From->show();
+ spin1Size->show();
+ spin1To->show();
+ }
+ * specific values
+ else if(radio1Specific->isChecked())
+ combo1Specific->show();
+ * values from a file
+ else{
+ btn1Browse->show();
+ disp1File->show();
+ }
+ //groupBox->hide();
+}
+
+
+ //if(!QString::compare(btntry->text(),"+")){
+*/
+
diff --git a/slsDetectorGui/src/qTabDataOutput.cpp b/slsDetectorGui/src/qTabDataOutput.cpp
index c03b6e3ec..778f3f908 100644
--- a/slsDetectorGui/src/qTabDataOutput.cpp
+++ b/slsDetectorGui/src/qTabDataOutput.cpp
@@ -9,8 +9,11 @@
/** Project Class Headers */
#include "slsDetector.h"
#include "multiSlsDetector.h"
+/** Qt Include Headers */
+#include
/** C++ Include Headers */
-#include
+#include
+#include
using namespace std;
@@ -18,7 +21,8 @@ using namespace std;
-qTabDataOutput::qTabDataOutput(QWidget *parent,slsDetectorUtils*& detector):QWidget(parent),myDet(detector){
+qTabDataOutput::qTabDataOutput(QWidget *parent,slsDetectorUtils*& detector):
+ QWidget(parent),myDet(detector){
setupUi(this);
if(myDet)
{
@@ -38,18 +42,39 @@ qTabDataOutput::~qTabDataOutput(){
void qTabDataOutput::SetupWidgetWindow(){
+ outputDir= QString(myDet->getFilePath().c_str());
+ dispOutputDir->setText(outputDir);
}
void qTabDataOutput::Initialization(){
+ connect(dispOutputDir, SIGNAL(textChanged(const QString&)), this, SLOT(setOutputDir(const QString&)));
+ connect(btnOutputBrowse, SIGNAL(clicked()), this, SLOT(browseOutputDir()));
}
void qTabDataOutput::Enable(bool enable){
- //this->setEnabled(enable);
-
+ layoutOutput->setEnabled(enable);
+ boxCorrection->setEnabled(enable);
+}
+
+
+void qTabDataOutput::setOutputDir(const QString& path){
+ outputDir = path;
+ myDet->setFilePath(string(outputDir.toAscii().constData()));
+#ifdef VERBOSE
+ cout<<"Output Directory changed to :"<getFilePath()<text());
+ if (!directory.isEmpty())
+ dispOutputDir->setText(directory);
}
diff --git a/slsDetectorGui/src/qTabMeasurement.cpp b/slsDetectorGui/src/qTabMeasurement.cpp
index 53001766b..a83220531 100644
--- a/slsDetectorGui/src/qTabMeasurement.cpp
+++ b/slsDetectorGui/src/qTabMeasurement.cpp
@@ -170,9 +170,8 @@ void qTabMeasurement::DeInitialization(){
void qTabMeasurement::Enable(bool enable){
- gridTimeResolved->setEnabled(enable);
- gridLayout->setEnabled(enable);
- boxProgress->setEnabled(enable);
+ frameTimeResolved->setEnabled(enable);
+ frameNotTimeResolved->setEnabled(enable);
/** Enable this always **/
if(!enable) btnStartStop->setEnabled(true);
}
@@ -217,12 +216,14 @@ void qTabMeasurement::startStopAcquisition(){
#endif
btnStartStop->setText("Stop");
Enable(0);
+ emit StartSignal();
}else{
#ifdef VERBOSE
cout<<"Stopping Acquisition"<setText("Start");
Enable(1);
+ emit StopSignal();
}
myPlot->StartStopDaqToggle();
}
diff --git a/slsDetectorGui/src/qTabPlot.cpp b/slsDetectorGui/src/qTabPlot.cpp
index ed39e931a..f1393b91b 100644
--- a/slsDetectorGui/src/qTabPlot.cpp
+++ b/slsDetectorGui/src/qTabPlot.cpp
@@ -36,7 +36,7 @@ qTabPlot::qTabPlot(QWidget *parent,slsDetectorUtils*& detector, qDrawPlot*& plot
//This also selects the text if unchecked
//includes setupwidgetwindow
//SelectPlot(1);
- Select1DPlot(false);
+ Select1DPlot(true);
Initialization();
}
}
@@ -115,10 +115,10 @@ void qTabPlot::Initialization(){
connect(chkXAxis, SIGNAL(toggled(bool)), this, SLOT(EnableTitles()));
connect(chkYAxis, SIGNAL(toggled(bool)), this, SLOT(EnableTitles()));
connect(chkZAxis, SIGNAL(toggled(bool)), this, SLOT(EnableTitles()));
- connect(dispTitle, SIGNAL(returnPressed()), this, SLOT(SetTitles()));
- connect(dispXAxis, SIGNAL(returnPressed()), this, SLOT(SetTitles()));
- connect(dispYAxis, SIGNAL(returnPressed()), this, SLOT(SetTitles()));
- connect(dispZAxis, SIGNAL(returnPressed()), this, SLOT(SetTitles()));
+ connect(dispTitle, SIGNAL(textChanged(const QString&)), this, SLOT(SetTitles()));
+ connect(dispXAxis, SIGNAL(textChanged(const QString&)), this, SLOT(SetTitles()));
+ connect(dispYAxis, SIGNAL(textChanged(const QString&)), this, SLOT(SetTitles()));
+ connect(dispZAxis, SIGNAL(textChanged(const QString&)), this, SLOT(SetTitles()));
/** Common Buttons*/
connect(btnClear, SIGNAL(clicked()), myPlot, SLOT(Clear1DPlot()));
/** Save */