no plot histogram, messages work

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@16 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2012-07-04 13:39:30 +00:00
parent ec0878d008
commit 81ac62dd49
30 changed files with 1133 additions and 580 deletions

View File

@@ -35,7 +35,24 @@ public:
//-------------------------------------------------------------------------------------------------------------------------------------------------
/** returns the value in ns to send to server.
/** returns the unit in words
* @param unit is the time unit
*/
static string getUnitString(timeUnit unit){
switch(unit){
case HOURS: return string("hrs");
case MINUTES: return string("min");
case SECONDS: return string("sec");
case MILLISECONDS: return string("msec");
case MICROSECONDS: return string("usec");
case NANOSECONDS: return string("nsec");
default: return string("error");
}
};
//-------------------------------------------------------------------------------------------------------------------------------------------------
/** returns the value in ns to send to server as the
* server class slsdetector accepts in ns.
* @param unit unit of time
* @param value time
* returns time value in ns
@@ -95,9 +112,22 @@ public:
* @param source is the tab or the source of the error
* */
static void ErrorMessage(string errorMessage,char source[])
{
static QMessageBox* errorBox;
errorBox= new QMessageBox(QMessageBox::Warning,source,tr(errorMessage.c_str()),QMessageBox::Ok, errorBox);
errorBox->exec();
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
/**displays an information message
* @param infoMessage the message to be displayed
* @param source is the tab or the source of the information
* */
static void InfoMessage(string infoMessage,char source[])
{
static QMessageBox* msgBox;
msgBox= new QMessageBox(QMessageBox::Warning,source,tr(errorMessage.c_str()),QMessageBox::Ok, msgBox);
msgBox= new QMessageBox(QMessageBox::Information,source,tr(infoMessage.c_str()),QMessageBox::Ok, msgBox);
msgBox->exec();
}