mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
bug fix:scans: backward scan plotting works now
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@77 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -50,6 +50,8 @@ public:
|
|||||||
bool isRunning(){return running;};
|
bool isRunning(){return running;};
|
||||||
/** gets the progress of acquisition to the measurement tab*/
|
/** gets the progress of acquisition to the measurement tab*/
|
||||||
int GetProgress(){return progress;};
|
int GetProgress(){return progress;};
|
||||||
|
/** gets the file index to the measurement tab*/
|
||||||
|
int GetFileIndex(){return currentFileIndex;};
|
||||||
|
|
||||||
/** sets plot Title */
|
/** sets plot Title */
|
||||||
void SetPlotTitle(QString title) {plotTitle = title;}
|
void SetPlotTitle(QString title) {plotTitle = title;}
|
||||||
@ -308,6 +310,8 @@ int number_of_frames;
|
|||||||
double acquisitionPeriod;
|
double acquisitionPeriod;
|
||||||
/** Acquisition Time */
|
/** Acquisition Time */
|
||||||
double exposureTime;
|
double exposureTime;
|
||||||
|
/** Current index*/
|
||||||
|
int currentFileIndex;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,6 +103,8 @@ void qDrawPlot::SetupWidgetWindow(){
|
|||||||
alreadyDisplayed = false;
|
alreadyDisplayed = false;
|
||||||
|
|
||||||
backwardScanPlot = false;
|
backwardScanPlot = false;
|
||||||
|
|
||||||
|
currentFileIndex = 0;
|
||||||
// This is so that it initially stop and plots
|
// This is so that it initially stop and plots
|
||||||
running = 1;
|
running = 1;
|
||||||
for(int i=0;i<MAX_1DPLOTS;i++)
|
for(int i=0;i<MAX_1DPLOTS;i++)
|
||||||
@ -271,6 +273,8 @@ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
|
|||||||
//update file path and file name
|
//update file path and file name
|
||||||
filePath = QString(myDet->getFilePath().c_str());
|
filePath = QString(myDet->getFilePath().c_str());
|
||||||
fileName = QString(myDet->getFileName().c_str());
|
fileName = QString(myDet->getFileName().c_str());
|
||||||
|
//update index
|
||||||
|
currentFileIndex = myDet->getFileIndex();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -530,6 +534,7 @@ int qDrawPlot::GetData(detectorData *data){
|
|||||||
SetPlotTitle(QString(data->fileName).section('/',-1));
|
SetPlotTitle(QString(data->fileName).section('/',-1));
|
||||||
//set progress
|
//set progress
|
||||||
progress=(int)data->progressIndex;
|
progress=(int)data->progressIndex;
|
||||||
|
currentFileIndex = fileIOStatic::getFileIndexFromFileName(string(data->fileName));
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "progress:" << progress << endl;
|
cout << "progress:" << progress << endl;
|
||||||
#endif
|
#endif
|
||||||
|
@ -354,7 +354,7 @@ void qTabMeasurement::SetCurrentMeasurement(int val){
|
|||||||
void qTabMeasurement::UpdateProgress(){
|
void qTabMeasurement::UpdateProgress(){
|
||||||
//progressBar->setValue((int)(((currentMeasurement*100)+(myPlot->GetProgress()))/spinNumMeasurements->value()));
|
//progressBar->setValue((int)(((currentMeasurement*100)+(myPlot->GetProgress()))/spinNumMeasurements->value()));
|
||||||
progressBar->setValue((int)myPlot->GetProgress());
|
progressBar->setValue((int)myPlot->GetProgress());
|
||||||
lblProgressIndex->setText(QString::number(myDet->getFileIndex()));
|
lblProgressIndex->setText(QString::number(myPlot->GetFileIndex()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user