mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
Changes for Qwt6, but 2D plot still does not work...and should be checked if Qwt5 still works
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@100 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -27,7 +27,12 @@ class SlsQt2DZoomer:public QwtPlotZoomer{
|
||||
hist=h;
|
||||
}
|
||||
|
||||
virtual QwtText trackerText(const QwtDoublePoint &pos) const{
|
||||
|
||||
#if QWT_VERSION<0x060000
|
||||
virtual QwtText trackerText(const QwtDoublePoint &pos) const{
|
||||
#else
|
||||
virtual QwtText trackerText(const QPointF &pos) const{
|
||||
#endif
|
||||
QColor bg(Qt::white);
|
||||
#if QT_VERSION >= 0x040300
|
||||
bg.setAlpha(200);
|
||||
@ -41,8 +46,15 @@ class SlsQt2DZoomer:public QwtPlotZoomer{
|
||||
static char t[200];
|
||||
sprintf(t,"%3.2f, %3.2f, %3.2f",pos.x(),pos.y(),hist->value(pos.x(),pos.y()));
|
||||
text.setText(t);
|
||||
}else text = QwtPlotZoomer::trackerText(pos);
|
||||
}else {
|
||||
#if QWT_VERSION<0x060000
|
||||
QwtText text = QwtPlotZoomer::trackerText(pos);
|
||||
#else
|
||||
QPoint p=pos.toPoint();
|
||||
QwtText text = QwtPlotZoomer::trackerText(p);
|
||||
#endif
|
||||
|
||||
}
|
||||
text.setBackgroundBrush( QBrush( bg ));
|
||||
return text;
|
||||
}
|
||||
|
Reference in New Issue
Block a user