mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-01 18:30:05 +02:00
bug fix: run index, plots only new data, lockimage for clone
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@83 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
7eb48a300d
commit
9fc66d571e
@ -21,7 +21,7 @@ public:
|
||||
qDefs(){};
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#define GUI_VERSION 0.11
|
||||
#define GUI_VERSION 0.12
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -96,7 +96,7 @@ void qCloneWidget::SetupWidgetWindow(QString title,int numDim,SlsQt1DPlot*& plot
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis[],string histTitle[],bool lines,bool markers){
|
||||
/** for each plot*/cout<<"qclone histYAxis[0][500]:"<<histYAxis[0][500]<<endl;
|
||||
/** for each plot*/
|
||||
for(int hist_num=0;hist_num<nHists;hist_num++){
|
||||
/** create hists */
|
||||
SlsQtH1D* k;
|
||||
@ -131,7 +131,7 @@ void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,doub
|
||||
|
||||
|
||||
void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis,string histTitle[],bool lines,bool markers){
|
||||
/** for each plot*/cout<<"qclone angle nhists:"<<nHists<<endl;
|
||||
/** for each plot*/
|
||||
for(int hist_num=0;hist_num<nHists;hist_num++){
|
||||
/** create hists */
|
||||
SlsQtH1D* k;
|
||||
|
@ -894,6 +894,8 @@ void qDrawPlot::UpdatePlot(){
|
||||
// only if no plot isnt enabled
|
||||
if(plotEnable){
|
||||
LockLastImageArray();
|
||||
//so that it doesnt plot every single thing
|
||||
if(lastImageNumber!=last_plot_number){
|
||||
//1-d plot stuff
|
||||
if(plot_in_scope==1){
|
||||
if(lastImageNumber){
|
||||
@ -964,14 +966,14 @@ void qDrawPlot::UpdatePlot(){
|
||||
if(saveAll) SavePlotAutomatic();
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
last_plot_number=lastImageNumber;
|
||||
|
||||
//set plot title
|
||||
boxPlot->setTitle(plotTitle);
|
||||
|
||||
if(plotEnable) UnlockLastImageArray();
|
||||
|
||||
}
|
||||
UnlockLastImageArray();
|
||||
}
|
||||
|
||||
//if acqq stopped before this line, it continues from here, shouldnt restart plotting timer
|
||||
if(!stop_signal){
|
||||
@ -1042,15 +1044,16 @@ void qDrawPlot::ClonePlot(){
|
||||
}
|
||||
if(found) winClone[i]->SetRange(IsXYRange,XYRangeValues);
|
||||
//copy data
|
||||
LockLastImageArray();
|
||||
//LockLastImageArray();
|
||||
if(!anglePlot)
|
||||
winClone[i]->SetCloneHists((int)nHists,histNBins,histXAxis,histYAxis,histTitle,lines,markers);
|
||||
else
|
||||
winClone[i]->SetCloneHists((int)nHists,histNBins,histXAngleAxis,histYAngleAxis,histTitle,lines,markers);
|
||||
UnlockLastImageArray();
|
||||
//UnlockLastImageArray();
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
plot2D = new SlsQt2DPlotLayout(boxPlot);
|
||||
plot2D->setFont(QFont("Sans Serif",9,QFont::Normal));
|
||||
plot2D->setTitle(GetImageTitle());
|
||||
|
@ -310,7 +310,12 @@ void qTabMeasurement::startStopAcquisition(){
|
||||
emit StopSignal();
|
||||
myDet->stopAcquisition();
|
||||
progressTimer->stop();
|
||||
spinIndex->setValue(myPlot->GetFileIndex());
|
||||
//spin index
|
||||
disconnect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||
spinIndex->setValue(myDet->getFileIndex());
|
||||
lblProgressIndex->setText(QString::number(spinIndex->value()));
|
||||
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||
|
||||
btnStartStop->setText("Start");
|
||||
btnStartStop->setIcon(*iconStart);
|
||||
btnStartStop->setChecked(false);
|
||||
@ -330,8 +335,14 @@ void qTabMeasurement::UpdateFinished(){
|
||||
btnStartStop->setChecked(false);
|
||||
Enable(1);
|
||||
connect(btnStartStop,SIGNAL(clicked()),this,SLOT(startStopAcquisition()));
|
||||
|
||||
UpdateProgress();
|
||||
spinIndex->setValue(myPlot->GetFileIndex());
|
||||
//spin index
|
||||
disconnect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||
spinIndex->setValue(myDet->getFileIndex());
|
||||
lblProgressIndex->setText(QString::number(spinIndex->value()));
|
||||
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(setRunIndex(int)));
|
||||
|
||||
progressTimer->stop();
|
||||
}
|
||||
}
|
||||
@ -352,7 +363,7 @@ void qTabMeasurement::SetCurrentMeasurement(int val){
|
||||
|
||||
void qTabMeasurement::UpdateProgress(){
|
||||
progressBar->setValue((int)myPlot->GetProgress());
|
||||
lblProgressIndex->setText(QString::number(myPlot->GetFileIndex()));
|
||||
lblProgressIndex->setText(QString::number(myPlot->GetFileIndex()+1));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user