mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-21 00:58:01 +02:00
merging refactor (replacing)
This commit is contained in:
137
slsDetectorGui/include/qTabSettings.h
Normal file → Executable file
137
slsDetectorGui/include/qTabSettings.h
Normal file → Executable file
@ -1,22 +1,10 @@
|
||||
/*
|
||||
* qTabSettings.h
|
||||
*
|
||||
* Created on: May 10, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
#ifndef QTABSETTINGS_H_
|
||||
#define QTABSETTINGS_H_
|
||||
#pragma once
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
/** Form Header */
|
||||
#include "ui_form_tab_settings.h"
|
||||
/** Project Class Headers */
|
||||
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
#include <QStandardItemModel>
|
||||
|
||||
/**
|
||||
*@short sets up the Settings parameters
|
||||
@ -25,92 +13,77 @@ class qTabSettings:public QWidget, private Ui::TabSettingsObject{
|
||||
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
|
||||
*/
|
||||
qTabSettings(QWidget *parent,multiSlsDetector*& detector);
|
||||
qTabSettings(QWidget *parent, multiSlsDetector* detector);
|
||||
|
||||
/** Destructor
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~qTabSettings();
|
||||
|
||||
/** To refresh and update widgets
|
||||
/**
|
||||
* Refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
/** To enable expert mode
|
||||
* @param enable to enable if true
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* Set settings according to selection
|
||||
* @param index index of selection
|
||||
*/
|
||||
void SetExpertMode(bool enable){expertMode = enable;};
|
||||
void SetSettings(int index);
|
||||
|
||||
/**
|
||||
* Set dynamic range if possible
|
||||
* @param index selection
|
||||
*/
|
||||
void SetDynamicRange(int index);
|
||||
|
||||
/**
|
||||
* Set threshold energy
|
||||
*/
|
||||
void SetEnergy();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/**
|
||||
* Sets up the detector settings
|
||||
*/
|
||||
void SetupDetectorSettings();
|
||||
|
||||
/**
|
||||
* Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/**
|
||||
* Get Settings
|
||||
*/
|
||||
void GetSettings();
|
||||
|
||||
/**
|
||||
* Gets the dynamic range and sets it on the gui
|
||||
*/
|
||||
void GetDynamicRange();
|
||||
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
/** detector type */
|
||||
slsDetectorDefs::detectorType detType;
|
||||
|
||||
/** expert mode */
|
||||
bool expertMode;
|
||||
|
||||
enum{Standard,Fast,HighGain,DynamicGain,LowGain,MediumGain,VeryHighGain,LowNoise,
|
||||
DynamicHG0,FixGain1,FixGain2,ForceSwitchG1,ForceSwitchG2, VeryLowGain,
|
||||
Undefined,Uninitialized,NumSettings};
|
||||
|
||||
/** To be able to index items on a combo box */
|
||||
QStandardItemModel* model;
|
||||
QModelIndex index[NumSettings];
|
||||
QStandardItem* item[NumSettings];
|
||||
|
||||
/** Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/** Sets up the detector settings
|
||||
*/
|
||||
void SetupDetectorSettings();
|
||||
|
||||
/** Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/** Gets the dynamic range and sets it on the gui
|
||||
* @param setvalue the value set by the gui when used as a check
|
||||
*/
|
||||
void GetDynamicRange(int setvalue = -1);
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/** Set settings according to selection
|
||||
* @param index index of selection
|
||||
*/
|
||||
void setSettings(int index);
|
||||
|
||||
/** Set number of modules if possible
|
||||
* @param index number of modules
|
||||
*/
|
||||
void SetNumberOfModules(int index);
|
||||
|
||||
/** Set dynamic range if possible
|
||||
* @param index selection
|
||||
*/
|
||||
void SetDynamicRange(int index);
|
||||
|
||||
/** Set threshold energy
|
||||
*/
|
||||
void SetEnergy();
|
||||
|
||||
|
||||
signals:
|
||||
/**Update Trimbits after Set Settings */
|
||||
void UpdateTrimbitSignal(int);
|
||||
enum{STANDARD, FAST, HIGHGAIN, DYNAMICGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN, LOWNOISE,
|
||||
DYNAMICHG0, FIXGAIN1, FIXGAIN2, FORCESWITCHG1, FORCESWITCHG2, VERLOWGAIN,
|
||||
UNDEFINED, UNINITIALIZED, NUMSETTINGS};
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QTABSETTINGS_H_ */
|
||||
|
Reference in New Issue
Block a user