#pragma once #include "qDefs.h" class multiSlsDetector; #include #include #include #include #include #include #include #include #include #include #include class qDetectorMain; #include #include /**To override the spin box class to have an id and emit it*/ class MyDoubleSpinBox:public QDoubleSpinBox{ Q_OBJECT private: int myId; private slots: void valueChangedWithID() {emit editingFinished(myId);}; public: /** Overridden constructor from QDoubleSpinBox */ MyDoubleSpinBox(int id,QWidget* parent = 0) :QDoubleSpinBox(parent), myId(id){ connect(this, SIGNAL(editingFinished()), this, SLOT(valueChangedWithID())); } signals: void editingFinished(int myId); }; /** *@short sets up the Developer parameters */ class qTabDeveloper:public QWidget { Q_OBJECT public: /** * The constructor * @param parent is the parent tab widget * @param detector is the detector returned from the detector tab */ qTabDeveloper(QWidget *parent, multiSlsDetector* detector); /** * Destructor */ ~qTabDeveloper(); public slots: /** * Refresh and update widgets */ void Refresh(); private slots: /** * Refreshes the adcs */ void RefreshAdcs(); /** * Set Dac values * @param id id of dac */ void SetDacValues(int id); /** * 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::vectordacNames; std::vectoradcNames; /**widgets needed*/ QGroupBox *boxDacs; QGroupBox *boxAdcs; std::vectorlblDacs; std::vectorlblAdcs; std::vectorspinDacs; std::vectorlblDacsmV; std::vectorspinAdcs; QLabel *lblHV; QComboBox *comboHV; QSpinBox *spinHV; QGridLayout *dacLayout; QString tipHV; QPalette red; QComboBox *comboDetector; };