merging refactor (replacing)

This commit is contained in:
2019-04-12 10:53:09 +02:00
parent 0bb800cc8a
commit 89a06f099c
1176 changed files with 82698 additions and 159058 deletions

176
slsDetectorGui/include/qTabDeveloper.h Normal file → Executable file
View File

@ -1,18 +1,9 @@
/*
* qTabDeveloper.h
*
* Created on: May 10, 2012
* Author: l_maliakal_d
*/
#ifndef QTABDEVELOPER_H_
#define QTABDEVELOPER_H_
#pragma once
#include "qDefs.h"
/** Project Class Headers */
class multiSlsDetector;
/** Qt Include Headers */
#include <QWidget>
#include <QGridLayout>
#include <QGroupBox>
@ -26,10 +17,8 @@ class multiSlsDetector;
#include <QPalette>
class qDetectorMain;
/** C++ Include Headers */
#include <string>
#include <vector>
using namespace std;
/**To override the spin box class to have an id and emit it*/
@ -41,11 +30,8 @@ private:
void valueChangedWithID() {emit editingFinished(myId);};
public:
/** Overridden constructor from QDoubleSpinBox */
MyDoubleSpinBox(int id,QWidget* parent = 0)
:QDoubleSpinBox(parent),myId(id){
//setParent(parent);
connect(this,SIGNAL(editingFinished()),
this,SLOT(valueChangedWithID()));
MyDoubleSpinBox(int id,QWidget* parent = 0) :QDoubleSpinBox(parent), myId(id){
connect(this, SIGNAL(editingFinished()), this, SLOT(valueChangedWithID()));
}
signals:
void editingFinished(int myId);
@ -59,100 +45,104 @@ class qTabDeveloper:public QWidget {
Q_OBJECT
public:
/** \short The constructor
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
/**
* The constructor
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
*/
qTabDeveloper(qDetectorMain *parent,multiSlsDetector*& detector);
qTabDeveloper(QWidget *parent, multiSlsDetector* detector);
/** Destructor
/**
* Destructor
*/
~qTabDeveloper();
/** To stop ADC Timer when starting acquisition
*/
void StopADCTimer(){if(adcTimer) adcTimer->stop();};
private:
/** parent widget */
qDetectorMain *thisParent;
/** The sls detector object */
multiSlsDetector *myDet;
/** The sls detector object */
slsDetector *det;
/** detector type */
slsDetectorDefs::detectorType detType;
/**number of dac widgets*/
static int NUM_DAC_WIDGETS;
/**number of adc widgets*/
static int NUM_ADC_WIDGETS;
static const int ADC_TIMEOUT = 5000;
vector<string>dacNames;
vector<string>adcNames;
/**widgets needed*/
QGridLayout *layout;
QScrollArea *scroll;
QGroupBox *boxDacs;
QGroupBox *boxAdcs;
QLabel *lblDacs[20];
QLabel *lblAdcs[20];
MyDoubleSpinBox *spinDacs[20];
QLabel *lblDacsmV[20];
QLineEdit *spinAdcs[20];
QLabel *lblHV;
QComboBox *comboHV;
QTimer *adcTimer;
QGridLayout *dacLayout;
QString tipHV;
QPalette red;
QComboBox *comboDetector;
/** Sets up the widget
*/
void SetupWidgetWindow();
/** Sets up all the slots and signals
*/
void Initialization();
/** Sets up the DAC Widgets
*/
void CreateDACWidgets();
/** Sets up the ADC Widgets
*/
void CreateADCWidgets();
/** Gets the sls index to set/get dac/adc
* @param index is the gui dac/adc index
* returns the sls index
*/
slsDetectorDefs::dacIndex getSLSIndex(int index);
public slots:
/** To refresh and update widgets
/**
* Refresh and update widgets
*/
void Refresh();
private slots:
/** Refreshes the adcs
/**
* Refreshes the adcs
*/
void RefreshAdcs();
/** Set Dac values
/**
* Set Dac values
* @param id id of dac
*/
void SetDacValues(int id);
/** Set High Voltage
/**
* Set High Voltage
*/
void SetHighVoltage();
private:
/**
* Sets up the widget
*/
void SetupWidgetWindow();
/**
* Sets up all the slots and signals
*/
void Initialization();
/**
* Sets up the DAC Widgets
*/
void CreateDACWidgets();
/**
* Sets up the ADC Widgets
*/
void CreateADCWidgets();
/**
* Sets up HV widget
*/
void CreateHVWidget();
/**
* Gets the sls index to set/get dac/adc
* @param index is the gui dac/adc index
* @returns the sls index
*/
slsDetectorDefs::dacIndex getSLSIndex(int index);
/** The sls detector object */
multiSlsDetector *myDet;
/** detector type */
slsDetectorDefs::detectorType detType;
/**number of dac widgets*/
int numDACWidgets;
/**number of adc widgets*/
int numADCWidgets;
/** list of dac and adc names */
std::vector<std::string>dacNames;
std::vector<std::string>adcNames;
/**widgets needed*/
QGroupBox *boxDacs;
QGroupBox *boxAdcs;
std::vector<QLabel*>lblDacs;
std::vector<QLabel*>lblAdcs;
std::vector<MyDoubleSpinBox*>spinDacs;
std::vector<QLabel*>lblDacsmV;
std::vector<QLineEdit*>spinAdcs;
QLabel *lblHV;
QComboBox *comboHV;
QSpinBox *spinHV;
QGridLayout *dacLayout;
QString tipHV;
QPalette red;
QComboBox *comboDetector;
};
#endif /* QTABDEVELOPER_H_ */