l_maliakal_d 0b05f67f9d included sls defs in every file so that int is 32 bit
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@132 af1100a4-978c-4157-bff7-07162d2ba061
2013-01-11 09:59:29 +00:00

112 lines
2.0 KiB
C++

/*
* qTabSettings.h
*
* Created on: May 10, 2012
* Author: l_maliakal_d
*/
#ifndef QTABSETTINGS_H_
#define QTABSETTINGS_H_
#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
*/
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
*/
qTabSettings(QWidget *parent,multiSlsDetector*& detector);
/** Destructor
*/
~qTabSettings();
/** To refresh and update widgets
*/
void Refresh();
/** To enable expert mode
* @param enable to enable if true
*/
void SetExpertMode(bool enable){expertMode = enable;};
private:
/** The sls detector object */
multiSlsDetector *myDet;
/** detector type */
slsDetectorDefs::detectorType detType;
/** expert mode */
bool expertMode;
enum{Standard,Fast,HighGain,DynamicGain,LowGain,MediumGain,VeryHighGain,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();
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);
};
#endif /* QTABSETTINGS_H_ */