mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
set current measurement dont work
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@17 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -24,6 +24,7 @@ using namespace std;
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
qTabMeasurement::qTabMeasurement(QWidget *parent,slsDetectorUtils*& detector, qDrawPlot*& plot):
|
||||
QWidget(parent),myDet(detector),myPlot(plot){
|
||||
setupUi(this);
|
||||
@ -32,15 +33,19 @@ qTabMeasurement::qTabMeasurement(QWidget *parent,slsDetectorUtils*& detector, qD
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
qTabMeasurement::~qTabMeasurement(){
|
||||
delete myDet;
|
||||
delete myPlot;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::SetupWidgetWindow(){
|
||||
/** Timer to update the progress bar **/
|
||||
progressTimer = new QTimer(this);
|
||||
@ -65,8 +70,10 @@ void qTabMeasurement::SetupWidgetWindow(){
|
||||
SetupTimingMode();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::SetupTimingMode(){
|
||||
/** Get timing mode from detector*/
|
||||
slsDetectorDefs::externalCommunicationMode mode = myDet->setExternalCommunicationMode();
|
||||
@ -148,8 +155,10 @@ void qTabMeasurement::SetupTimingMode(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::Initialization(int timingChange){
|
||||
/** These signals are connected only at start up. The others are reinitialized when changing timing mode*/
|
||||
if(!timingChange){
|
||||
@ -183,11 +192,12 @@ void qTabMeasurement::Initialization(int timingChange){
|
||||
connect(spinNumGates,SIGNAL(valueChanged(int)), this, SLOT(setNumGates(int)));//
|
||||
/** Number of Probes**/
|
||||
connect(spinNumProbes,SIGNAL(valueChanged(int)), this, SLOT(setNumProbes(int)));//
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::DeInitialization(){
|
||||
/** Number of Frames**/
|
||||
disconnect(spinNumFrames,SIGNAL(valueChanged(int)), this, SLOT(setNumFrames(int)));
|
||||
@ -208,8 +218,10 @@ void qTabMeasurement::DeInitialization(){
|
||||
disconnect(spinNumProbes,SIGNAL(valueChanged(int)), this, SLOT(setNumProbes(int)));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::Enable(bool enable){
|
||||
frameTimeResolved->setEnabled(enable);
|
||||
frameNotTimeResolved->setEnabled(enable);
|
||||
@ -217,8 +229,10 @@ void qTabMeasurement::Enable(bool enable){
|
||||
if(!enable) btnStartStop->setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setFileName(const QString& fName){
|
||||
myDet->setFileName(fName.toAscii().data());
|
||||
#ifdef VERBOSE
|
||||
@ -226,6 +240,7 @@ void qTabMeasurement::setFileName(const QString& fName){
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void qTabMeasurement::setRunIndex(int index){
|
||||
@ -238,6 +253,7 @@ void qTabMeasurement::setRunIndex(int index){
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::startStopAcquisition(){
|
||||
if(!btnStartStop->text().compare("Start")){
|
||||
#ifdef VERBOSE
|
||||
@ -265,8 +281,10 @@ void qTabMeasurement::startStopAcquisition(){
|
||||
myPlot->StartStopDaqToggle();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::UpdateFinished(){
|
||||
disconnect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
|
||||
btnStartStop->setText("Start");
|
||||
@ -278,15 +296,28 @@ void qTabMeasurement::UpdateFinished(){
|
||||
progressTimer->stop();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void SetCurrentMeasurement(int val){
|
||||
lblCurrentMeasurement->setText("0u");//lblCurrentMeasurement->setText(QString::number(val));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::UpdateProgress(){
|
||||
|
||||
progressBar->setValue(myPlot->GetProgress());
|
||||
lblProgressIndex->setText(QString::number(myDet->getFileIndex()));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setNumFrames(int val){
|
||||
myDet->setTimer(slsDetectorDefs::FRAME_NUMBER,val);
|
||||
#ifdef VERBOSE
|
||||
@ -295,8 +326,10 @@ void qTabMeasurement::setNumFrames(int val){
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setExposureTime(){
|
||||
int64_t exptimeNS;
|
||||
/** Get the value of timer in ns **/
|
||||
@ -322,8 +355,10 @@ void qTabMeasurement::setExposureTime(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setAcquisitionPeriod(){
|
||||
int64_t acqtimeNS;
|
||||
/** Get the value of timer in ns **/
|
||||
@ -347,8 +382,10 @@ void qTabMeasurement::setAcquisitionPeriod(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setNumTriggers(int val){
|
||||
myDet->setTimer(slsDetectorDefs::CYCLES_NUMBER,val);
|
||||
#ifdef VERBOSE
|
||||
@ -356,8 +393,10 @@ void qTabMeasurement::setNumTriggers(int val){
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setDelay(){
|
||||
int64_t exptimeNS;
|
||||
/** Get the value of timer in ns **/
|
||||
@ -368,8 +407,10 @@ void qTabMeasurement::setDelay(){
|
||||
myDet->setTimer(slsDetectorDefs::DELAY_AFTER_TRIGGER,exptimeNS);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setNumGates(int val){
|
||||
myDet->setTimer(slsDetectorDefs::GATES_NUMBER,val);
|
||||
#ifdef VERBOSE
|
||||
@ -377,8 +418,10 @@ void qTabMeasurement::setNumGates(int val){
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setNumProbes(int val){
|
||||
myDet->setTimer(slsDetectorDefs::PROBES_NUMBER,val);
|
||||
#ifdef VERBOSE
|
||||
@ -386,8 +429,10 @@ void qTabMeasurement::setNumProbes(int val){
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabMeasurement::setTimingMode(int mode){
|
||||
#ifdef VERBOSE
|
||||
cout<<"Setting Timing mode to " << comboTimingMode->currentText().toAscii().data()<<endl;
|
||||
@ -570,8 +615,6 @@ void qTabMeasurement::setTimingMode(int mode){
|
||||
|
||||
/** To reconnect all the signals after changing their values*/
|
||||
Initialization(1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -586,7 +629,7 @@ void qTabMeasurement::Refresh(){
|
||||
/** progress label index **/
|
||||
lblProgressIndex->setText(QString::number(myDet->getFileIndex()));
|
||||
/** Progress bar **/
|
||||
progressBar->setValue(myDet->getCurrentProgress());
|
||||
progressBar->setValue((int)myDet->getCurrentProgress());
|
||||
/** Timing mode**/
|
||||
SetupTimingMode();//comboTimingMode->setCurrentIndex((int)myDet->setExternalCommunicationMode());
|
||||
}
|
||||
|
Reference in New Issue
Block a user