QXRD  0.11.16
qcepplotmeasurer.cpp
Go to the documentation of this file.
1 #include "qcepplotmeasurer.h"
2 #include "qcepplot.h"
3 #include "qwt_picker_machine.h"
4 
6  : QwtPlotPicker(canvas),
7  m_Plot(plot)
8 {
9  qRegisterMetaType< QVector<QPointF> >("QVector<QPointF>");
10 
11  setTrackerMode(QwtPicker::AlwaysOn);
12  setStateMachine(new QwtPickerPolygonMachine());
13  setRubberBand(QwtPicker::PolygonRubberBand);
14 }
15 
16 QwtText QcepPlotMeasurer::trackerTextF(const QPointF &pos) const
17 {
18  return (m_Plot ? m_Plot->trackerTextF(pos) : tr("%1, %2").arg(pos.x()).arg(pos.y()));
19 }
virtual QwtText trackerTextF(const QPointF &pos)
Definition: qcepplot.cpp:394
QcepPlotPtr m_Plot
virtual QwtText trackerTextF(const QPointF &pos) const
QcepPlotMeasurer(QWidget *canvas, QcepPlotPtr plot)