included images

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@52 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2012-09-07 16:29:32 +00:00
parent a4a0237711
commit c9db2c4272
25 changed files with 331 additions and 147 deletions

View File

@ -109,6 +109,10 @@
<property name="text"> <property name="text">
<string>Browse</string> <string>Browse</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="3"> <item row="0" column="3">
@ -158,6 +162,8 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="../include/icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -428,6 +428,10 @@ Defines scan range for a &lt;b&gt;Constant Step Size&lt;/b&gt; with the followin
<property name="text"> <property name="text">
<string>Browse</string> <string>Browse</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -466,6 +470,8 @@ Defines scan range for a &lt;b&gt;Constant Step Size&lt;/b&gt; with the followin
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="../include/icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -31,6 +31,10 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<property name="windowIcon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
</property>
<widget class="QGroupBox" name="boxTrimming"> <widget class="QGroupBox" name="boxTrimming">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@ -38,8 +42,8 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>25</x> <x>25</x>
<y>90</y> <y>100</y>
<width>721</width> <width>726</width>
<height>226</height> <height>226</height>
</rect> </rect>
</property> </property>
@ -63,7 +67,7 @@
<rect> <rect>
<x>15</x> <x>15</x>
<y>25</y> <y>25</y>
<width>691</width> <width>696</width>
<height>195</height> <height>195</height>
</rect> </rect>
</property> </property>
@ -302,6 +306,10 @@ An extension given by the modules serial number will be attached.
<property name="text"> <property name="text">
<string>Browse</string> <string>Browse</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
</property>
</widget> </widget>
</item> </item>
<item row="5" column="4"> <item row="5" column="4">
@ -320,7 +328,11 @@ An extension given by the modules serial number will be attached.
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Start Trimming</string> <string>Start Trimming </string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/start.png</normaloff>:/icons/images/start.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -540,70 +552,101 @@ An extension given by the modules serial number will be attached.
</layout> </layout>
</widget> </widget>
</widget> </widget>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="boxPlot">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>25</x> <x>25</x>
<y>10</y> <y>10</y>
<width>341</width> <width>341</width>
<height>61</height> <height>76</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
<string>Trimbits Plot Mode</string> <string>Trimbits Plot</string>
</property>
<property name="checkable">
<bool>true</bool>
</property> </property>
<widget class="QWidget" name="horizontalLayoutWidget"> <widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>15</x> <x>120</x>
<y>20</y> <y>22</y>
<width>311</width> <width>211</width>
<height>31</height> <height>44</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing"> <property name="spacing">
<number>34</number> <number>17</number>
</property> </property>
<item> <item>
<widget class="QRadioButton" name="radioNoPlot"> <widget class="QPushButton" name="btnRefresh">
<property name="sizePolicy"> <property name="toolTip">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <string>&lt;nobr&gt;
<horstretch>0</horstretch> Updates plot with Trimbits from Shared Memory, not from Detector.
<verstretch>0</verstretch> &lt;/nobr&gt;</string>
</sizepolicy> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property> </property>
<property name="text"> <property name="text">
<string>No Plot</string> <string>Refresh </string>
</property> </property>
<property name="checked"> <property name="icon">
<bool>true</bool> <iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/refresh.png</normaloff>:/icons/images/refresh.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="radioDataGraph"> <widget class="QPushButton" name="btnGetTrimbits">
<property name="sizePolicy"> <property name="toolTip">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <string>&lt;nobr&gt;
<horstretch>0</horstretch> Plots Trimbits from Detector. This will take time.
<verstretch>0</verstretch> &lt;/nobr&gt;</string>
</sizepolicy>
</property> </property>
<property name="text">
<string>Get Trimbits </string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/download.png</normaloff>:/icons/images/download.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>15</x>
<y>20</y>
<width>101</width>
<height>46</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QRadioButton" name="radioHistogram">
<property name="text">
<string>Histogram</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="radioDataGraph">
<property name="text"> <property name="text">
<string>Data Graph</string> <string>Data Graph</string>
</property> </property>
</widget> <property name="checked">
</item> <bool>true</bool>
<item>
<widget class="QRadioButton" name="radioHistogram">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Histogram</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -615,56 +658,58 @@ An extension given by the modules serial number will be attached.
<rect> <rect>
<x>405</x> <x>405</x>
<y>10</y> <y>10</y>
<width>341</width> <width>346</width>
<height>61</height> <height>76</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
<string>Calibration Logs</string> <string>Calibration Logs</string>
</property> </property>
<widget class="QWidget" name="horizontalLayoutWidget_2"> </widget>
<property name="geometry"> <widget class="QWidget" name="horizontalLayoutWidget_2">
<rect> <property name="geometry">
<x>15</x> <rect>
<y>20</y> <x>420</x>
<width>311</width> <y>37</y>
<height>31</height> <width>313</width>
</rect> <height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>42</number>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <item>
<property name="spacing"> <widget class="QCheckBox" name="chkEnergyLog">
<number>42</number> <property name="sizePolicy">
</property> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<item> <horstretch>0</horstretch>
<widget class="QCheckBox" name="chkEnergyLog"> <verstretch>0</verstretch>
<property name="sizePolicy"> </sizepolicy>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> </property>
<horstretch>0</horstretch> <property name="text">
<verstretch>0</verstretch> <string>Energy Calibration</string>
</sizepolicy> </property>
</property> </widget>
<property name="text"> </item>
<string>Energy Calibration</string> <item>
</property> <widget class="QCheckBox" name="chkAngularLog">
</widget> <property name="sizePolicy">
</item> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<item> <horstretch>0</horstretch>
<widget class="QCheckBox" name="chkAngularLog"> <verstretch>0</verstretch>
<property name="sizePolicy"> </sizepolicy>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> </property>
<horstretch>0</horstretch> <property name="text">
<verstretch>0</verstretch> <string>Angular Calibration</string>
</sizepolicy> </property>
</property> </widget>
<property name="text"> </item>
<string>Angular Calibration</string> </layout>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</widget> </widget>
<resources/> <resources>
<include location="../include/icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -234,6 +234,10 @@
<property name="text"> <property name="text">
<string>Browse</string> <string>Browse</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="5"> <item row="1" column="5">
@ -309,12 +313,18 @@
<property name="text"> <property name="text">
<string>Browse</string> <string>Browse</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
</widget> </widget>
<resources/> <resources>
<include location="../include/icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -87,6 +87,10 @@
<property name="text"> <property name="text">
<string>Run</string> <string>Run</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/start.png</normaloff>:/icons/images/start.png</iconset>
</property>
</widget> </widget>
</widget> </widget>
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
@ -145,6 +149,10 @@
<property name="text"> <property name="text">
<string>Run</string> <string>Run</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/start.png</normaloff>:/icons/images/start.png</iconset>
</property>
</widget> </widget>
</widget> </widget>
<widget class="QWidget" name="horizontalLayoutWidget_3"> <widget class="QWidget" name="horizontalLayoutWidget_3">
@ -234,11 +242,17 @@
<property name="text"> <property name="text">
<string>Get Information</string> <string>Get Information</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/download.png</normaloff>:/icons/images/download.png</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
<resources/> <resources>
<include location="../include/icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -157,6 +157,16 @@
<property name="text"> <property name="text">
<string>Start</string> <string>Start</string>
</property> </property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/start.png</normaloff>:/icons/images/start.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QFrame" name="frameTimeResolved"> <widget class="QFrame" name="frameTimeResolved">
<property name="geometry"> <property name="geometry">
@ -930,6 +940,8 @@ p, li { white-space: pre-wrap; }
</widget> </widget>
</widget> </widget>
</widget> </widget>
<resources/> <resources>
<include location="../include/icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -377,7 +377,7 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>30</width> <width>18</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -409,7 +409,7 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>18</width> <width>15</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -495,7 +495,17 @@
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="text"> <property name="text">
<string>Save</string> <string>Save </string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/save.png</normaloff>:/icons/images/save.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property> </property>
</widget> </widget>
</widget> </widget>
@ -1315,7 +1325,7 @@
<rect> <rect>
<x>10</x> <x>10</x>
<y>15</y> <y>15</y>
<width>336</width> <width>331</width>
<height>31</height> <height>31</height>
</rect> </rect>
</property> </property>
@ -1323,7 +1333,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QPushButton" name="btnClone"> <widget class="QPushButton" name="btnClone">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -1369,7 +1379,11 @@
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="text"> <property name="text">
<string>Create</string> <string>Create </string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/new.png</normaloff>:/icons/images/new.png</iconset>
</property> </property>
<property name="flat"> <property name="flat">
<bool>false</bool> <bool>false</bool>
@ -1379,7 +1393,7 @@
<item row="0" column="2"> <item row="0" column="2">
<widget class="QPushButton" name="btnCloseClones"> <widget class="QPushButton" name="btnCloseClones">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -1425,7 +1439,11 @@
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="text"> <property name="text">
<string>Close All</string> <string>Close All </string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/close.png</normaloff>:/icons/images/close.png</iconset>
</property> </property>
<property name="flat"> <property name="flat">
<bool>false</bool> <bool>false</bool>
@ -1442,7 +1460,7 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -1458,7 +1476,7 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -1470,7 +1488,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -1516,7 +1534,11 @@
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="text"> <property name="text">
<string>Save All</string> <string>Save All </string>
</property>
<property name="icon">
<iconset resource="../include/icons.qrc">
<normaloff>:/icons/images/saveAll.png</normaloff>:/icons/images/saveAll.png</iconset>
</property> </property>
<property name="flat"> <property name="flat">
<bool>false</bool> <bool>false</bool>
@ -1527,6 +1549,8 @@
</widget> </widget>
</widget> </widget>
</widget> </widget>
<resources/> <resources>
<include location="../include/icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -200,6 +200,8 @@
</layout> </layout>
</widget> </widget>
</widget> </widget>
<resources/> <resources>
<include location="../include/icons.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -1,5 +1,17 @@
<RCC version="1.0"> <RCC version="1.0">
<qresource prefix="/icons"> <qresource prefix="/icons">
<file>../images/mountain.png</file> <file>../images/mountain.png</file>
<file>../images/refresh.png</file>
<file>../images/save.png</file>
<file>../images/saveAll.png</file>
<file>../images/close.png</file>
<file>../images/add.png</file>
<file>../images/new.png</file>
<file>../images/download.png</file>
<file>../images/browse.png</file>
<file>../images/start.png</file>
<file>../images/erase.png</file>
<file>../images/remove.png</file>
<file>../images/stop.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -35,6 +35,7 @@ public:
/**to update the widgets*/ /**to update the widgets*/
void Refresh(); void Refresh();
/**number of action widgets*/ /**number of action widgets*/
static int NUM_ACTION_WIDGETS; static int NUM_ACTION_WIDGETS;
@ -46,7 +47,6 @@ private:
/**id of the action widget*/ /**id of the action widget*/
int id; int id;
/** Sets up the widget /** Sets up the widget
*/ */
void SetupWidgetWindow(); void SetupWidgetWindow();

View File

@ -35,6 +35,7 @@ public:
/**to update the widgets*/ /**to update the widgets*/
void Refresh(); void Refresh();
/**number of scan widgets*/ /**number of scan widgets*/
static int NUM_SCAN_WIDGETS; static int NUM_SCAN_WIDGETS;

View File

@ -48,6 +48,7 @@ public:
*/ */
void Refresh(); void Refresh();
public slots: public slots:
/** Disable Positions /** Disable Positions
* @param enable true if to disable * @param enable true if to disable
@ -83,6 +84,7 @@ private:
slsDetectorDefs::detectorType detType; slsDetectorDefs::detectorType detType;
enum actionIndex{Scan0=1, Scan1, NumPositions=4, NumTotalActions=9}; enum actionIndex{Scan0=1, Scan1, NumPositions=4, NumTotalActions=9};
QGridLayout *gridLayout; QGridLayout *gridLayout;
@ -109,6 +111,8 @@ private:
double *positions; double *positions;
QPalette normal; QPalette normal;
QIcon *iconPlus;
QIcon *iconMinus;
private slots: private slots:
/** To Expand the Action Widget /** To Expand the Action Widget

View File

@ -90,6 +90,10 @@ private slots:
*/ */
void StartTrimming(); void StartTrimming();
/**Updates plot from shared memory
*/
void UpdatePlot();
private: private:
/** The sls detector object */ /** The sls detector object */
multiSlsDetector *myDet; multiSlsDetector *myDet;

View File

@ -27,9 +27,8 @@ public:
/** \short The constructor /** \short The constructor
* @param parent is the parent tab widget * @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab * @param detector is the detector returned from the detector tab
* @param detID is the id of the detector
*/ */
qTabDataOutput(QWidget *parent,multiSlsDetector*& detector,int detID); qTabDataOutput(QWidget *parent,multiSlsDetector*& detector);
/** Destructor /** Destructor
*/ */
@ -45,9 +44,6 @@ private:
/** The sls detector object */ /** The sls detector object */
multiSlsDetector *myDet; multiSlsDetector *myDet;
/**detector id */
int detID;
/** detector type */ /** detector type */
slsDetectorDefs::detectorType detType; slsDetectorDefs::detectorType detType;

View File

@ -173,7 +173,8 @@ private:
QPalette red; QPalette red;
/** expert mode */ /** expert mode */
bool expertMode; bool expertMode;
QIcon *iconStart;
QIcon *iconStop;
signals: signals:

View File

@ -26,9 +26,8 @@ public:
/** \short The constructor /** \short The constructor
* @param parent is the parent tab widget * @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab * @param detector is the detector returned from the detector tab
* @param detID is the id of the detector
*/ */
qTabSettings(QWidget *parent,multiSlsDetector*& detector,int detID); qTabSettings(QWidget *parent,multiSlsDetector*& detector);
/** Destructor /** Destructor
*/ */
@ -43,9 +42,6 @@ private:
/** The sls detector object */ /** The sls detector object */
multiSlsDetector *myDet; multiSlsDetector *myDet;
/**detector id */
int detID;
/** detector type */ /** detector type */
slsDetectorDefs::detectorType detType; slsDetectorDefs::detectorType detType;

View File

@ -45,6 +45,7 @@ void qActionsWidget::SetupWidgetWindow(){
NUM_ACTION_WIDGETS++; NUM_ACTION_WIDGETS++;
setFixedHeight(25); setFixedHeight(25);
} }

View File

@ -99,10 +99,10 @@ void qDetectorMain::SetUpWidgetWindow(){
// creating all the tab widgets // creating all the tab widgets
tab_messages = new qTabMessages (this, myDet); cout<<"Messages ready"<<endl; tab_messages = new qTabMessages (this, myDet); cout<<"Messages ready"<<endl;
tab_measurement = new qTabMeasurement (this, myDet,myPlot); cout<<"Measurement ready"<<endl; tab_measurement = new qTabMeasurement (this, myDet,myPlot); cout<<"Measurement ready"<<endl;
tab_dataoutput = new qTabDataOutput (this, myDet, detID); cout<<"DataOutput ready"<<endl; tab_dataoutput = new qTabDataOutput (this, myDet); cout<<"DataOutput ready"<<endl;
tab_plot = new qTabPlot (this, myDet,myPlot); cout<<"Plot ready"<<endl; tab_plot = new qTabPlot (this, myDet,myPlot); cout<<"Plot ready"<<endl;
tab_actions = new qTabActions (this, myDet); cout<<"Actions ready"<<endl; tab_actions = new qTabActions (this, myDet); cout<<"Actions ready"<<endl;
tab_settings = new qTabSettings (this, myDet, detID); cout<<"Settings ready"<<endl; tab_settings = new qTabSettings (this, myDet); cout<<"Settings ready"<<endl;
tab_advanced = new qTabAdvanced (this, myDet); cout<<"Advanced ready"<<endl; tab_advanced = new qTabAdvanced (this, myDet); cout<<"Advanced ready"<<endl;
tab_debugging = new qTabDebugging (this, myDet); cout<<"Debugging ready"<<endl; tab_debugging = new qTabDebugging (this, myDet); cout<<"Debugging ready"<<endl;
tab_developer = new qTabDeveloper (this, myDet); cout<<"Developer ready"<<endl; tab_developer = new qTabDeveloper (this, myDet); cout<<"Developer ready"<<endl;

View File

@ -129,7 +129,8 @@ void qScanWidget::SetupWidgetWindow(){
QHBoxLayout *layoutCustom = new QHBoxLayout(widgetCustom); QHBoxLayout *layoutCustom = new QHBoxLayout(widgetCustom);
layoutCustom->setContentsMargins(0, 0, 0, 0); layoutCustom->setContentsMargins(0, 0, 0, 0);
comboCustom = new QComboBox(widgetCustom); comboCustom = new QComboBox(widgetCustom);
btnCustom = new QPushButton("Delete",widgetCustom); btnCustom = new QPushButton("Delete ",widgetCustom);
btnCustom->setIcon(QIcon( ":/icons/images/close.png" ));
comboCustom->setEditable(true); comboCustom->setEditable(true);
comboCustom->setCompleter(false); comboCustom->setCompleter(false);
comboCustom->setValidator(new QDoubleValidator(comboCustom)); comboCustom->setValidator(new QDoubleValidator(comboCustom));

View File

@ -56,8 +56,13 @@ void qTabActions::SetupWidgetWindow(){
// Buttongroup to know which +/- button was clicked // Buttongroup to know which +/- button was clicked
group = new QButtonGroup(this); group = new QButtonGroup(this);
group->setExclusive(false);
palette = new QPalette(); palette = new QPalette();
QPalette p;
p.setColor(QPalette::Shadow,QColor(0,0,0,0));
p.setColor(QPalette::Button,QColor(0,0,0,0));
char names[NumTotalActions][200] = { char names[NumTotalActions][200] = {
"Action at Start", "Action at Start",
"Scan Level 0", "Scan Level 0",
@ -70,15 +75,30 @@ void qTabActions::SetupWidgetWindow(){
"Action at Stop" "Action at Stop"
}; };
//creating the icons for the buttons
iconPlus = new QIcon(":/icons/images/add.png");
iconMinus = new QIcon(":/icons/images/remove.png");
QString tip = "<nobr>Click on the \"+\" to Expand or \"-\" to Collapse.</nobr>";
// For each level of Actions // For each level of Actions
for(int i=0;i<NumTotalActions;i++){ for(int i=0;i<NumTotalActions;i++){
//common widgets //common widgets
lblName[i] = new QLabel(QString(names[i])); lblName[i] = new QLabel(QString(names[i]));
btnExpand[i] = new QPushButton("+"); btnExpand[i] = new QPushButton();
btnExpand[i]->setFixedSize(20,20);
QString tip = "<nobr>Click on the \"+\" to Expand or \"-\" to Collapse.</nobr>";
lblName[i]->setToolTip(tip); lblName[i]->setToolTip(tip);
btnExpand[i]->setCheckable(true);
btnExpand[i]->setChecked(false);
btnExpand[i]->setFixedSize(16,16);
btnExpand[i]->setToolTip(tip); btnExpand[i]->setToolTip(tip);
btnExpand[i]->setIcon(*iconPlus);
btnExpand[i]->setFocusPolicy(Qt::NoFocus);
btnExpand[i]->setFlat(true);
btnExpand[i]->setIconSize(QSize(16,16));
btnExpand[i]->setPalette(p);
group->addButton(btnExpand[i],i); group->addButton(btnExpand[i],i);
//add the widgets to the layout , depending on the type create the widgets //add the widgets to the layout , depending on the type create the widgets
@ -157,7 +177,9 @@ void qTabActions::CreatePositionsWidget(){
comboPos->setValidator(validate); comboPos->setValidator(validate);
layout->addWidget(comboPos,0,5); layout->addWidget(comboPos,0,5);
layout->addItem(new QSpacerItem(5,20,QSizePolicy::Fixed,QSizePolicy::Fixed),0,6); layout->addItem(new QSpacerItem(5,20,QSizePolicy::Fixed,QSizePolicy::Fixed),0,6);
btnDelete = new QPushButton("Delete"); btnDelete = new QPushButton("Delete ");
btnDelete->setEnabled(false);
btnDelete->setIcon(QIcon( ":/icons/images/close.png" ));
btnDelete->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); btnDelete->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
layout->addWidget(btnDelete,0,7); layout->addWidget(btnDelete,0,7);
@ -202,11 +224,12 @@ void qTabActions::Initialization(){
void qTabActions::Expand(QAbstractButton *button ){ void qTabActions::Expand(QAbstractButton *button ){
int index = group->id(button); int index = group->id(button);
// Collapse // Collapse
if(!QString::compare(button->text(), "-")){ if(!button->isChecked()){
palette->setColor(QPalette::WindowText,Qt::black); palette->setColor(QPalette::WindowText,Qt::black);
lblName[index]->setPalette(*palette); lblName[index]->setPalette(*palette);
button->setText("+"); button->setIcon(*iconPlus);
if(index==NumPositions) { if(index==NumPositions) {
positionWidget->hide(); positionWidget->hide();
@ -234,9 +257,11 @@ void qTabActions::Expand(QAbstractButton *button ){
} }
}else{ }else{
// Expand // Expand
//always set title color to blue for expan\d
palette->setColor(QPalette::WindowText,QColor(0,0,200,255)); palette->setColor(QPalette::WindowText,QColor(0,0,200,255));
lblName[index]->setPalette(*palette); lblName[index]->setPalette(*palette);
button->setText("-"); button->setIcon(*iconMinus);
if(index==NumPositions){ if(index==NumPositions){
positionWidget->show(); positionWidget->show();
setFixedHeight(height()+30);//+80 if the checkboxes are included setFixedHeight(height()+30);//+80 if the checkboxes are included
@ -265,6 +290,7 @@ void qTabActions::SetPosition(){
comboPos->setMaxCount(numPos); comboPos->setMaxCount(numPos);
comboPos->setEnabled(numPos); comboPos->setEnabled(numPos);
lblPosList->setEnabled(numPos); lblPosList->setEnabled(numPos);
btnDelete->setEnabled(numPos);
//deleting too many or not entering enough //deleting too many or not entering enough
if(numPos>comboPos->count()){ if(numPos>comboPos->count()){
@ -378,6 +404,7 @@ void qTabActions::Refresh(){
disconnect(comboPos,SIGNAL(currentIndexChanged(int)), this, SLOT(SetPosition())); disconnect(comboPos,SIGNAL(currentIndexChanged(int)), this, SLOT(SetPosition()));
comboPos->setEnabled(numPos); comboPos->setEnabled(numPos);
lblPosList->setEnabled(numPos); lblPosList->setEnabled(numPos);
btnDelete->setEnabled(numPos);
lblPosList->setText("List of Positions: "); lblPosList->setText("List of Positions: ");
lblPosList->setPalette(normal); lblPosList->setPalette(normal);
for(int i=0;i<comboPos->count();i++) for(int i=0;i<comboPos->count();i++)

View File

@ -87,6 +87,9 @@ void qTabAdvanced::Initialization(){
//start Trimming //start Trimming
connect(btnStart, SIGNAL(clicked()), this, SLOT(StartTrimming())); connect(btnStart, SIGNAL(clicked()), this, SLOT(StartTrimming()));
//refresh
connect(btnRefresh, SIGNAL(clicked()), this, SLOT(UpdatePlot()));
} }
@ -319,9 +322,6 @@ void qTabAdvanced::StartTrimming(){
break; break;
} }
#ifdef VERBOSE
#endif
//execute //execute
int ret = myDet->executeTrimming(trimmingMode,parameter1,parameter2,-1); int ret = myDet->executeTrimming(trimmingMode,parameter1,parameter2,-1);
if((ret!=slsDetectorDefs::FAIL)&&(ret!=-1)){ if((ret!=slsDetectorDefs::FAIL)&&(ret!=-1)){
@ -330,6 +330,8 @@ void qTabAdvanced::StartTrimming(){
if((ret!=slsDetectorDefs::FAIL)&&(ret!=-1)) if((ret!=slsDetectorDefs::FAIL)&&(ret!=-1))
qDefs::Message(qDefs::INFORMATION,"The Trimbits have been saved successfully.","Advanced"); qDefs::Message(qDefs::INFORMATION,"The Trimbits have been saved successfully.","Advanced");
else qDefs::Message(qDefs::WARNING,string("Could not Save the Trimbits to file:\n")+dispFile->text().toAscii().constData(),"Advanced"); else qDefs::Message(qDefs::WARNING,string("Could not Save the Trimbits to file:\n")+dispFile->text().toAscii().constData(),"Advanced");
//updates plots
UpdatePlot();
} }
else else
qDefs::Message(qDefs::WARNING,"Atleast 1 channel could not be trimmed.","Advanced"); qDefs::Message(qDefs::WARNING,"Atleast 1 channel could not be trimmed.","Advanced");
@ -339,6 +341,16 @@ void qTabAdvanced::StartTrimming(){
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabAdvanced::UpdatePlot(){
#ifdef VERBOSE
cout << "Updating Plot" << endl;
#endif
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabAdvanced::Refresh(){ void qTabAdvanced::Refresh(){
//disconnect //disconnect
disconnect(chkEnergyLog, SIGNAL(toggled(bool)), this, SLOT(SetLogs())); disconnect(chkEnergyLog, SIGNAL(toggled(bool)), this, SLOT(SetLogs()));

View File

@ -25,8 +25,9 @@ using namespace std;
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
qTabDataOutput::qTabDataOutput(QWidget *parent,multiSlsDetector*& detector,int detID):
QWidget(parent),myDet(detector),detID(detID){ qTabDataOutput::qTabDataOutput(QWidget *parent,multiSlsDetector*& detector):
QWidget(parent),myDet(detector){
setupUi(this); setupUi(this);
SetupWidgetWindow(); SetupWidgetWindow();
Initialization(); Initialization();
@ -241,7 +242,7 @@ void qTabDataOutput::SetRateCorrection(){
#ifdef VERBOSE #ifdef VERBOSE
cout << "Entering Set Rate Correction function" << endl; cout << "Entering Set Rate Correction function" << endl;
#endif #endif
slsDetector *s = myDet->getSlsDetector(detID);
if(chkRate->isChecked()){ if(chkRate->isChecked()){
radioAuto->setEnabled(true); radioAuto->setEnabled(true);
radioDeadTime->setEnabled(true); radioDeadTime->setEnabled(true);
@ -251,14 +252,14 @@ void qTabDataOutput::SetRateCorrection(){
//auto //auto
if(radioAuto->isChecked()){ if(radioAuto->isChecked()){
spinDeadTime->setEnabled(false); spinDeadTime->setEnabled(false);
s->setRateCorrection(-1); myDet->setRateCorrection(-1);
#ifdef VERBOSE #ifdef VERBOSE
cout << "Setting rate corrections with default dead time" << endl; cout << "Setting rate corrections with default dead time" << endl;
#endif #endif
}//custom dead time }//custom dead time
else{ else{
spinDeadTime->setEnabled(true); spinDeadTime->setEnabled(true);
s->setRateCorrection((double)spinDeadTime->value()); myDet->setRateCorrection((double)spinDeadTime->value());
#ifdef VERBOSE #ifdef VERBOSE
cout << "Setting rate corrections with dead time "<< spinDeadTime->value() << endl; cout << "Setting rate corrections with dead time "<< spinDeadTime->value() << endl;
#endif #endif
@ -270,7 +271,7 @@ void qTabDataOutput::SetRateCorrection(){
spinDeadTime->setEnabled(false); spinDeadTime->setEnabled(false);
//Unsetting rate correction //Unsetting rate correction
s->setRateCorrection(0); myDet->setRateCorrection(0);
#ifdef VERBOSE #ifdef VERBOSE
cout << "Unsetting rate correction" << endl; cout << "Unsetting rate correction" << endl;
#endif #endif
@ -291,8 +292,7 @@ void qTabDataOutput::UpdateRateCorrectionFromServer(){
disconnect(spinDeadTime, SIGNAL(valueChanged(double)), this, SLOT(SetRateCorrection())); disconnect(spinDeadTime, SIGNAL(valueChanged(double)), this, SLOT(SetRateCorrection()));
double rate; double rate;
slsDetector *s = myDet->getSlsDetector(detID); rate = (double)myDet->getRateCorrectionTau();
rate = (double)s->getRateCorrectionTau();
#ifdef VERBOSE #ifdef VERBOSE
cout << "Getting rate correction from server:" << rate << " : "; cout << "Getting rate correction from server:" << rate << " : ";
#endif #endif

View File

@ -81,6 +81,11 @@ void qTabMeasurement::SetupWidgetWindow(){
//file write enabled/disabled //file write enabled/disabled
chkFile->setChecked(myDet->enableWriteToFile()); chkFile->setChecked(myDet->enableWriteToFile());
//creating the icons for the buttons
iconStart = new QIcon(":/icons/images/start.png");
iconStop = new QIcon(":/icons/images/stop.png");
} }
@ -278,12 +283,13 @@ void qTabMeasurement::setRunIndex(int index){
void qTabMeasurement::startStopAcquisition(){ void qTabMeasurement::startStopAcquisition(){
if(!btnStartStop->text().compare("Start")){ if(btnStartStop->isChecked()){
#ifdef VERBOSE #ifdef VERBOSE
cout << endl << endl << "Starting Acquisition" << endl; cout << endl << endl << "Starting Acquisition" << endl;
#endif #endif
//btnStartStop->setStyleSheet("color:red"); //btnStartStop->setStyleSheet("color:red");
btnStartStop->setText("Stop"); btnStartStop->setText("Stop");
btnStartStop->setIcon(*iconStop);
Enable(0); Enable(0);
progressBar->setValue(0); progressBar->setValue(0);
//the progress which keeps adding up for all the measurements //the progress which keeps adding up for all the measurements
@ -301,6 +307,8 @@ void qTabMeasurement::startStopAcquisition(){
//btnStartStop->setStyleSheet("background:rgb(239,239,239)"); //btnStartStop->setStyleSheet("background:rgb(239,239,239)");
progressTimer->stop(); progressTimer->stop();
btnStartStop->setText("Start"); btnStartStop->setText("Start");
btnStartStop->setIcon(*iconStart);
btnStartStop->setChecked(false);
Enable(1); Enable(1);
emit StopSignal(); emit StopSignal();
} }
@ -313,6 +321,8 @@ void qTabMeasurement::startStopAcquisition(){
void qTabMeasurement::UpdateFinished(){ void qTabMeasurement::UpdateFinished(){
disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition())); disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
btnStartStop->setText("Start"); btnStartStop->setText("Start");
btnStartStop->setIcon(*iconStart);
btnStartStop->setChecked(false);
//btnStartStop->setStyleSheet("color:green"); //btnStartStop->setStyleSheet("color:green");
//btnStartStop->setStyleSheet("background:rgb(239,239,239)"); //btnStartStop->setStyleSheet("background:rgb(239,239,239)");
Enable(1); Enable(1);

View File

@ -16,7 +16,6 @@
#include <QFile> #include <QFile>
#include <QTextStream> #include <QTextStream>
#include <QFileDialog> #include <QFileDialog>
#include <QSizePolicy>
/** C++ Include Headers */ /** C++ Include Headers */
#include <iostream> #include <iostream>
#include <string> #include <string>
@ -47,15 +46,16 @@ void qTabMessages::SetupWidgetWindow(){
dispLog->setFocusPolicy(Qt::NoFocus); dispLog->setFocusPolicy(Qt::NoFocus);
dispLog->setTextColor(Qt::darkBlue); dispLog->setTextColor(Qt::darkBlue);
QSizePolicy sizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
btnSave = new QPushButton("Save Log",this); btnSave = new QPushButton("Save Log ",this);
btnSave->setFocusPolicy(Qt::NoFocus); btnSave->setFocusPolicy(Qt::NoFocus);
btnSave->setSizePolicy(sizePolicy); btnSave->setFixedWidth(100);
btnSave->setIcon(QIcon( ":/icons/images/save.png" ));
btnClear = new QPushButton("Clear",this); btnClear = new QPushButton("Clear ",this);
btnClear->setFocusPolicy(Qt::NoFocus); btnClear->setFocusPolicy(Qt::NoFocus);
btnClear->setSizePolicy(sizePolicy); btnClear->setFixedWidth(100);
btnClear->setIcon(QIcon( ":/icons/images/erase.png" ));
gridLayout->addWidget(btnSave,0,0,1,1); gridLayout->addWidget(btnSave,0,0,1,1);
gridLayout->addWidget(btnClear,0,4,1,1); gridLayout->addWidget(btnClear,0,4,1,1);

View File

@ -17,8 +17,8 @@ using namespace std;
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
qTabSettings::qTabSettings(QWidget *parent,multiSlsDetector*& detector,int detID): qTabSettings::qTabSettings(QWidget *parent,multiSlsDetector*& detector):
QWidget(parent),myDet(detector),detID(detID){ QWidget(parent),myDet(detector){
setupUi(this); setupUi(this);
SetupWidgetWindow(); SetupWidgetWindow();
@ -40,7 +40,7 @@ void qTabSettings::SetupWidgetWindow(){
// Settings // Settings
SetupDetectorSettings(); SetupDetectorSettings();
comboSettings->setCurrentIndex(myDet->getSettings(detID)); comboSettings->setCurrentIndex(myDet->getSettings());
//threshold //threshold
spinThreshold->setValue(myDet->getThresholdEnergy()); spinThreshold->setValue(myDet->getThresholdEnergy());
@ -68,7 +68,7 @@ void qTabSettings::SetupWidgetWindow(){
void qTabSettings::SetupDetectorSettings(){ void qTabSettings::SetupDetectorSettings(){
// Get detector settings from detector // Get detector settings from detector
slsDetectorDefs::detectorSettings sett = myDet->getSettings(detID); slsDetectorDefs::detectorSettings sett = myDet->getSettings();
// To be able to index items on a combo box // To be able to index items on a combo box
model = qobject_cast<QStandardItemModel*>(comboSettings->model()); model = qobject_cast<QStandardItemModel*>(comboSettings->model());
@ -163,7 +163,7 @@ void qTabSettings::setSettings(int index){
if(index!=(int)Uninitialized) if(index!=(int)Uninitialized)
item[(int)Uninitialized]->setEnabled(false); item[(int)Uninitialized]->setEnabled(false);
} }
slsDetectorDefs::detectorSettings sett = myDet->setSettings((slsDetectorDefs::detectorSettings)index,detID); slsDetectorDefs::detectorSettings sett = myDet->setSettings((slsDetectorDefs::detectorSettings)index);
#ifdef VERBOSE #ifdef VERBOSE
cout << "Settings have been set to " << myDet->slsDetectorBase::getDetectorSettings(sett) << endl; cout << "Settings have been set to " << myDet->slsDetectorBase::getDetectorSettings(sett) << endl;
#endif #endif
@ -256,7 +256,7 @@ void qTabSettings::SetEnergy(){
void qTabSettings::Refresh(){ void qTabSettings::Refresh(){
// Settings // Settings
SetupDetectorSettings(); SetupDetectorSettings();
comboSettings->setCurrentIndex(myDet->getSettings(detID)); comboSettings->setCurrentIndex(myDet->getSettings());
// Number of Modules // Number of Modules
spinNumModules->setValue(myDet->setNumberOfModules()); spinNumModules->setValue(myDet->setNumberOfModules());