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();
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
};