The timing mode works now

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@12 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2012-06-20 15:02:35 +00:00
parent 69e6500522
commit 31b65642cb
4 changed files with 163 additions and 86 deletions

View File

@ -9,15 +9,19 @@
#define QDEFS_H
#include <iostream>
#include <QMessageBox>
using namespace std;
class qDefs
{
class qDefs:public QWidget{
public:
//-------------------------------------------------------------------------------------------------------------------------------------------------
/** Empty Constructor
*/
qDefs(){};
//-------------------------------------------------------------------------------------------------------------------------------------------------
/** unit of time
*/
enum timeUnit{
@ -29,6 +33,7 @@ public:
NANOSECONDS /** ns */
};
//-------------------------------------------------------------------------------------------------------------------------------------------------
/** returns the value in ns to send to server.
* @param unit unit of time
@ -49,7 +54,20 @@ public:
return valueNS;
};
//-------------------------------------------------------------------------------------------------------------------------------------------------
/**displays an error message
* @param errorMessage the message to be displayed
* @param source is the tab or the source of the error
* */
static void ErrorMessage(string errorMessage,char source[])
{
static QMessageBox* msgBox;
msgBox= new QMessageBox(QMessageBox::Warning,source,tr(errorMessage.c_str()),QMessageBox::Ok, msgBox);
msgBox->exec();
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
};

View File

@ -27,11 +27,12 @@ class slsDetectorUtils;
#include <QGridLayout>
#include <QResizeEvent>
/** To Over-ride the QTabWidget class to get the tabBar */
class MyTabWidget:public QTabWidget{
public:
MyTabWidget(QWidget* parent = 0) {setParent(parent);}
//Overridden method from QTabWidget
/** Overridden method from QTabWidget */
QTabBar* tabBar(){return QTabWidget::tabBar();}
};
@ -53,11 +54,9 @@ public:
*/
qDetectorMain(int argc, char **argv, QApplication *app, QWidget *parent = 0);
/**Destructor
*/
/**Destructor */
~qDetectorMain();
private:
/** The Qt Application */
QApplication *theApp;
@ -73,12 +72,12 @@ private:
int heightPlotWindow;
/** default height of central widgetwhen plot Window when docked */
int heightCentralWidget;
/** The default zooming tool tip */
QString zoomToolTip;
/** The default tab heading color */
QColor defaultTabColor;
/** enumeration of the tabs */
enum {Measurement, Settings, DataOutput, Plot, Actions, Advanced, Debugging, Developer, NumberOfTabs };
QColor defaultTabColor;
QString zoomToolTip;
/* Scroll Area for the tabs**/
QScrollArea *scroll[NumberOfTabs];
/**Measurement tab */
@ -99,8 +98,6 @@ private:
qTabDeveloper *tab_developer;
/**if the developer tab should be enabled,known from command line */
int isDeveloper;
/**Sets up the layout of the widget
*/
void SetUpWidgetWindow();