mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +02:00
adcs refresh only in developer tab
This commit is contained in:
parent
5b5e1e32b3
commit
5d52e41e37
@ -83,6 +83,8 @@ public:
|
|||||||
/** Verifies if output directories for all the receivers exist */
|
/** Verifies if output directories for all the receivers exist */
|
||||||
int DoesOutputDirExist(){return tab_dataoutput->VerifyOutputDirectory();};
|
int DoesOutputDirExist(){return tab_dataoutput->VerifyOutputDirectory();};
|
||||||
|
|
||||||
|
bool isCurrentlyTabDeveloper();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** The Qt Application */
|
/** The Qt Application */
|
||||||
QApplication *theApp;
|
QApplication *theApp;
|
||||||
|
@ -24,6 +24,8 @@ class multiSlsDetector;
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
|
class qDetectorMain;
|
||||||
|
|
||||||
/** C++ Include Headers */
|
/** C++ Include Headers */
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -62,7 +64,7 @@ public:
|
|||||||
* @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
|
||||||
*/
|
*/
|
||||||
qTabDeveloper(QWidget *parent,multiSlsDetector*& detector);
|
qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector);
|
||||||
|
|
||||||
/** Destructor
|
/** Destructor
|
||||||
*/
|
*/
|
||||||
@ -73,6 +75,8 @@ public:
|
|||||||
void StopADCTimer(){if(adcTimer) adcTimer->stop();};
|
void StopADCTimer(){if(adcTimer) adcTimer->stop();};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/** parent widget */
|
||||||
|
qDetectorMain *thisParent;
|
||||||
/** The sls detector object */
|
/** The sls detector object */
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
/** The sls detector object */
|
/** The sls detector object */
|
||||||
|
@ -878,4 +878,12 @@ void qDetectorMain::UncheckServer(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
bool qDetectorMain::isCurrentlyTabDeveloper(){
|
||||||
|
return (tabs->currentIndex()==Developer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
* Author: l_maliakal_d
|
* Author: l_maliakal_d
|
||||||
*/
|
*/
|
||||||
#include "qTabDeveloper.h"
|
#include "qTabDeveloper.h"
|
||||||
|
#include "qDetectorMain.h"
|
||||||
//Project Class Headers
|
//Project Class Headers
|
||||||
#include "slsDetector.h"
|
#include "slsDetector.h"
|
||||||
#include "multiSlsDetector.h"
|
#include "multiSlsDetector.h"
|
||||||
@ -24,8 +25,8 @@ int qTabDeveloper::NUM_ADC_WIDGETS(0);
|
|||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
qTabDeveloper::qTabDeveloper(QWidget *parent,multiSlsDetector*& detector):
|
qTabDeveloper::qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector):
|
||||||
QWidget(parent),
|
thisParent(parent),
|
||||||
myDet(detector),
|
myDet(detector),
|
||||||
det(0),
|
det(0),
|
||||||
boxDacs(0),
|
boxDacs(0),
|
||||||
@ -52,6 +53,7 @@ qTabDeveloper::qTabDeveloper(QWidget *parent,multiSlsDetector*& detector):
|
|||||||
qTabDeveloper::~qTabDeveloper(){
|
qTabDeveloper::~qTabDeveloper(){
|
||||||
delete myDet;
|
delete myDet;
|
||||||
if(det) delete det;
|
if(det) delete det;
|
||||||
|
if(thisParent) delete thisParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -523,6 +525,9 @@ slsDetectorDefs::dacIndex qTabDeveloper::getSLSIndex(int index){
|
|||||||
|
|
||||||
|
|
||||||
void qTabDeveloper::RefreshAdcs(){
|
void qTabDeveloper::RefreshAdcs(){
|
||||||
|
if(!thisParent->isCurrentlyTabDeveloper())
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef VERYVERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "Updating ADCs" <<endl;
|
cout << "Updating ADCs" <<endl;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user