gui_client more stable with 2 servers for stop and acquire

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@169 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2013-03-21 09:27:16 +00:00
parent 303d84b24a
commit 10e47581e0
6 changed files with 281 additions and 80 deletions

View File

@ -285,6 +285,10 @@ void qDetectorMain::Initialization(){
connect(menuUtilities, SIGNAL(triggered(QAction*)), this,SLOT(ExecuteUtilities(QAction*)));
// Help Menu
connect(menuHelp, SIGNAL(triggered(QAction*)), this,SLOT(ExecuteHelp(QAction*)));
//server
connect(myServer, SIGNAL(ServerStoppedSignal()), this,SLOT(UncheckServer()));
}
@ -329,9 +333,12 @@ void qDetectorMain::EnableModes(QAction *action){
//listen to gui client
if(action==actionListenGuiClient){
disconnect(menuModes, SIGNAL(triggered(QAction*)), this,SLOT(EnableModes(QAction*)));
actionListenGuiClient->setChecked(myServer->StartStopServer(actionListenGuiClient->isChecked()));
connect(menuModes, SIGNAL(triggered(QAction*)), this,SLOT(EnableModes(QAction*)));
myServer->StartStopServer(actionListenGuiClient->isChecked());
//disconnect(menuModes, SIGNAL(triggered(QAction*)), this,SLOT(EnableModes(QAction*)));
//actionListenGuiClient->setChecked(myServer->StartStopServer(actionListenGuiClient->isChecked()));
//connect(menuModes, SIGNAL(triggered(QAction*)), this,SLOT(EnableModes(QAction*)));
}
//Set DebugMode
else if(action==actionDebug){
@ -782,4 +789,17 @@ int qDetectorMain::StartStopAcquisitionFromClient(bool start){
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qDetectorMain::UncheckServer(){
#ifdef VERBOSE
cout << "Unchecking Mode : Listen to Gui Client" << endl;
#endif
disconnect(menuModes, SIGNAL(triggered(QAction*)), this,SLOT(EnableModes(QAction*)));
actionListenGuiClient->setChecked(false);
connect(menuModes, SIGNAL(triggered(QAction*)), this,SLOT(EnableModes(QAction*)));
}
//-------------------------------------------------------------------------------------------------------------------------------------------------