29 #ifndef SODAPLOTPICKER_H 30 #define SODAPLOTPICKER_H 34 #include <qwt/qwt_picker_machine.h> 35 #include <boost/format.hpp> 41 PlotPicker(
int xAxis,
int yAxis, QWidget * canvas) : QwtPlotPicker(xAxis, yAxis, canvas)
43 setStateMachine(
new QwtPickerClickPointMachine);
44 setTrackerMode(QwtPicker::AlwaysOn);
45 setTrackerPen(QPen(Qt::white));
49 QColor trbgcolor(Qt::white);
50 trbgcolor.setAlpha(128);
52 QwtText text((boost::format(
"%.4f MHz, %.1f dB") % (pos.x() * 1e-6) % pos.y()).str().c_str());
53 text.setBackgroundBrush(QBrush(trbgcolor));
59 #endif // SODAPLOTPICKER_H PlotPicker(int xAxis, int yAxis, QWidget *canvas)
QwtText trackerTextF(const QPointF &pos) const