works with qwt5, but qwt6 except for 2D plots

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@101 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
bergamaschi
2012-10-23 10:30:32 +00:00
parent 8715a416a0
commit 1d03067bd5
2 changed files with 64 additions and 32 deletions

View File

@ -40,7 +40,6 @@ private:
QwtLinearColorMap* colorMapLinearScale;
QwtLinearColorMap* colorMapLogScale;
QwtLinearColorMap* currentColorMap;
#if QWT_VERSION<0x060000
QwtValueList* contourLevelsLinear;
QwtValueList* contourLevelsLog;
@ -52,6 +51,11 @@ private:
void SetupZoom();
void SetupColorMap();
QwtLinearColorMap* myColourMap(QVector<double> colourStops);
public:
SlsQt2DPlot(QWidget * = NULL);
@ -80,12 +84,20 @@ public:
void SetData(int nbinsx, double xmin, double xmax, int nbinsy,double ymin, double ymax,double *d,double zmin=0, double zmax=-1){
hist->SetData(nbinsx,xmin,xmax,nbinsy,ymin,ymax,d,zmin,zmax);
#if QWT_VERSION<0x060000
;
#else
d_spectrogram->setData(hist);
#endif
}
double* GetDataPtr() {return hist->GetDataPtr();}
int GetBinIndex(int bx,int by) {return hist->GetBinIndex(bx,by);}
int FindBinIndex(double x,double y) {return hist->FindBinIndex(x,y);}
void SetBinValue(int bx,int by,double v) {hist->SetBinValue(bx,by,v);}
void SetBinValue(int bx,int by,double v) { hist->SetBinValue(bx,by,v);}
double GetBinValue(int bx,int by) {return hist->GetBinValue(bx,by);}