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 */
|
||||
int DoesOutputDirExist(){return tab_dataoutput->VerifyOutputDirectory();};
|
||||
|
||||
bool isCurrentlyTabDeveloper();
|
||||
|
||||
private:
|
||||
/** The Qt Application */
|
||||
QApplication *theApp;
|
||||
|
@ -24,6 +24,8 @@ class multiSlsDetector;
|
||||
#include <QTimer>
|
||||
#include <QString>
|
||||
#include <QPalette>
|
||||
class qDetectorMain;
|
||||
|
||||
/** C++ Include Headers */
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -62,7 +64,7 @@ public:
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabDeveloper(QWidget *parent,multiSlsDetector*& detector);
|
||||
qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector);
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
@ -73,6 +75,8 @@ public:
|
||||
void StopADCTimer(){if(adcTimer) adcTimer->stop();};
|
||||
|
||||
private:
|
||||
/** parent widget */
|
||||
qDetectorMain *thisParent;
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/** 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
|
||||
*/
|
||||
#include "qTabDeveloper.h"
|
||||
#include "qDetectorMain.h"
|
||||
//Project Class Headers
|
||||
#include "slsDetector.h"
|
||||
#include "multiSlsDetector.h"
|
||||
@ -24,8 +25,8 @@ int qTabDeveloper::NUM_ADC_WIDGETS(0);
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
qTabDeveloper::qTabDeveloper(QWidget *parent,multiSlsDetector*& detector):
|
||||
QWidget(parent),
|
||||
qTabDeveloper::qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector):
|
||||
thisParent(parent),
|
||||
myDet(detector),
|
||||
det(0),
|
||||
boxDacs(0),
|
||||
@ -52,6 +53,7 @@ qTabDeveloper::qTabDeveloper(QWidget *parent,multiSlsDetector*& detector):
|
||||
qTabDeveloper::~qTabDeveloper(){
|
||||
delete myDet;
|
||||
if(det) delete det;
|
||||
if(thisParent) delete thisParent;
|
||||
}
|
||||
|
||||
|
||||
@ -523,6 +525,9 @@ slsDetectorDefs::dacIndex qTabDeveloper::getSLSIndex(int index){
|
||||
|
||||
|
||||
void qTabDeveloper::RefreshAdcs(){
|
||||
if(!thisParent->isCurrentlyTabDeveloper())
|
||||
return;
|
||||
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "Updating ADCs" <<endl;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user