mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 10:30:41 +02:00
stop signal works, call back works, number of probes to expert mode, angular works
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@50 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
e32c1de0af
commit
b67f3a83d8
@ -62,8 +62,10 @@ public:
|
||||
* @param histXAxis X Axis value in 1D
|
||||
* @param histYAxis Y Axis value in 1D
|
||||
* @param histTitle Title for all the graphs in 1D
|
||||
* @param lines style of plot if lines or dots
|
||||
* @param markers style of plot markers or not
|
||||
* */
|
||||
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis[],string histTitle[]);
|
||||
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis[],string histTitle[],bool lines,bool markers);
|
||||
|
||||
/** Get the 1D hist values to plot for angle plotting
|
||||
* @param nHists Number of graphs in 1D
|
||||
@ -71,8 +73,10 @@ public:
|
||||
* @param histXAxis X Axis value in 1D
|
||||
* @param histYAxis Y Axis value in 1D
|
||||
* @param histTitle Title for all the graphs in 1D
|
||||
* @param lines style of plot if lines or dots
|
||||
* @param markers style of plot markers or not
|
||||
* */
|
||||
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis,string histTitle[]);
|
||||
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis,string histTitle[],bool lines,bool markers);
|
||||
|
||||
public slots:
|
||||
/** Save Plots automatically by save all clones
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <QImage>
|
||||
#include <QPainter>
|
||||
#include <QFileDialog>
|
||||
#include "qwt_symbol.h"
|
||||
/** C++ Include Headers */
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
@ -97,7 +98,7 @@ void qCloneWidget::SetupWidgetWindow(QString title,int numDim,SlsQt1DPlot*& plot
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis[],string histTitle[]){
|
||||
void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis[],string histTitle[],bool lines,bool markers){
|
||||
/** for each plot*/cout<<"qclone nhists:"<<nHists<<endl;
|
||||
for(int hist_num=0;hist_num<nHists;hist_num++){
|
||||
/** create hists */
|
||||
@ -109,6 +110,19 @@ void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,doub
|
||||
k=cloneplot1D_hists.at(hist_num);
|
||||
k->SetData(histNBins,histXAxis,histYAxis[hist_num]);
|
||||
}
|
||||
//style of plot
|
||||
if(lines) k->setStyle(QwtPlotCurve::Lines);
|
||||
else k->setStyle(QwtPlotCurve::Dots);
|
||||
if(markers) {
|
||||
QwtSymbol *marker = new QwtSymbol();
|
||||
marker->setStyle(QwtSymbol::Cross);
|
||||
marker->setSize(5,5);
|
||||
k->setSymbol(*marker);
|
||||
}else {
|
||||
QwtSymbol *noMarker = new QwtSymbol();
|
||||
k->setSymbol(*noMarker);
|
||||
}
|
||||
//set title and attach plot
|
||||
k->setTitle(histTitle[hist_num].c_str());
|
||||
k->Attach(cloneplot1D);
|
||||
}
|
||||
@ -119,7 +133,7 @@ void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,doub
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis,string histTitle[]){
|
||||
void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis,string histTitle[],bool lines,bool markers){
|
||||
/** for each plot*/cout<<"qclone nhists:"<<nHists<<endl;
|
||||
for(int hist_num=0;hist_num<nHists;hist_num++){
|
||||
/** create hists */
|
||||
@ -131,6 +145,19 @@ void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,doub
|
||||
k=cloneplot1D_hists.at(hist_num);
|
||||
k->SetData(histNBins,histXAxis,histYAxis);
|
||||
}
|
||||
//style of plot
|
||||
if(lines) k->setStyle(QwtPlotCurve::Lines);
|
||||
else k->setStyle(QwtPlotCurve::Dots);
|
||||
if(markers) {
|
||||
QwtSymbol *marker = new QwtSymbol();
|
||||
marker->setStyle(QwtSymbol::Cross);
|
||||
marker->setSize(5,5);
|
||||
k->setSymbol(*marker);
|
||||
}else {
|
||||
QwtSymbol *noMarker = new QwtSymbol();
|
||||
k->setSymbol(*noMarker);
|
||||
}
|
||||
//set title and attach plot
|
||||
k->setTitle(histTitle[hist_num].c_str());
|
||||
k->Attach(cloneplot1D);
|
||||
}
|
||||
|
@ -808,6 +808,13 @@ void qDrawPlot::ClonePlot(){
|
||||
winClone[i]->SetCloneHists((int)nHists,histNBins,histXAxis,histYAxis,histTitle);
|
||||
else
|
||||
winClone[i]->SetCloneHists((int)nHists,histNBins,histXAngleAxis,histYAngleAxis,histTitle);
|
||||
// update range
|
||||
if(!IsXYRange[qDefs::XMINIMUM]) XYRangeValues[qDefs::XMINIMUM]= plot1D->GetXMinimum();
|
||||
if(!IsXYRange[qDefs::XMAXIMUM]) XYRangeValues[qDefs::XMAXIMUM]= plot1D->GetXMaximum();
|
||||
if(!IsXYRange[qDefs::YMINIMUM]) XYRangeValues[qDefs::YMINIMUM]= plot1D->GetYMinimum();
|
||||
if(!IsXYRange[qDefs::YMAXIMUM]) XYRangeValues[qDefs::YMAXIMUM]= plot1D->GetYMaximum();
|
||||
plot1D->SetXMinMax(XYRangeValues[qDefs::XMINIMUM],XYRangeValues[qDefs::XMAXIMUM]);
|
||||
plot1D->SetYMinMax(XYRangeValues[qDefs::YMINIMUM],XYRangeValues[qDefs::YMAXIMUM]);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user