mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-25 15:50:03 +02:00

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@2 af1100a4-978c-4157-bff7-07162d2ba061
68 lines
1.2 KiB
C++
68 lines
1.2 KiB
C++
/*
|
|
* qTabSettings.cpp
|
|
*
|
|
* Created on: May 10, 2012
|
|
* Author: l_maliakal_d
|
|
*/
|
|
|
|
#include "qTabSettings.h"
|
|
#include "qDefs.h"
|
|
/** Project Class Headers */
|
|
#include "slsDetector.h"
|
|
#include "multiSlsDetector.h"
|
|
/** C++ Include Headers */
|
|
#include<iostream>
|
|
using namespace std;
|
|
|
|
|
|
#define Detector_Index 0
|
|
|
|
|
|
|
|
qTabSettings::qTabSettings(QWidget *parent,slsDetectorUtils*& detector):QWidget(parent),myDet(detector){
|
|
setupUi(this);
|
|
if(myDet)
|
|
{
|
|
SetupWidgetWindow();
|
|
Initialization();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
qTabSettings::~qTabSettings(){
|
|
delete myDet;
|
|
}
|
|
|
|
|
|
|
|
|
|
void qTabSettings::SetupWidgetWindow(){
|
|
/** Settings */
|
|
comboSettings->setCurrentIndex(myDet->getSettings(Detector_Index));
|
|
}
|
|
|
|
|
|
|
|
void qTabSettings::Initialization(){
|
|
/** Settings */
|
|
connect(comboSettings,SIGNAL(currentIndexChanged(int)),this,SLOT(setSettings(int)));
|
|
}
|
|
|
|
|
|
|
|
void qTabSettings::Enable(bool enable){
|
|
comboSettings->setEnabled(enable);
|
|
}
|
|
|
|
|
|
void qTabSettings::setSettings(int index){
|
|
slsDetectorDefs::detectorSettings sett = myDet->setSettings((slsDetectorDefs::detectorSettings)index,Detector_Index);
|
|
#ifdef VERBOSE
|
|
cout<<"Settings have been set to "<<myDet->slsDetectorBase::getDetectorSettings(sett)<<endl;
|
|
#endif
|
|
|
|
}
|
|
|