5#ifndef QWT_PLOT_SERIES_DATA_PICKER_H
6#define QWT_PLOT_SERIES_DATA_PICKER_H
9#include "qwt_canvas_picker.h"
67 TextOnCanvasBottomAuto
97 QPointF feature { 0, 0 };
122 bool isInterpolation()
const;
125 void setNearestSearchWindowSize(
int windowSize);
127 int nearestSearchWindowSize()
const;
130 void setEnableDrawFeaturePoint(
bool on =
true);
132 bool isEnableDrawFeaturePoint()
const;
135 void setDrawFeaturePointSize(
int px);
137 int drawFeaturePointSize()
const;
140 void setTextBackgroundBrush(
const QBrush& br);
142 QBrush textBackgroundBrush()
const;
145 void setTextAlignment(Qt::Alignment al);
147 Qt::Alignment textAlignment()
const;
150 void setEnableShowXValue(
bool on);
151 bool isEnableShowXValue()
const;
154 void setTextTrackerOffset(
const QPoint& offset);
155 QPoint textTrackerOffset()
const;
171 virtual int pickYValue(
const QwtPlot* p,
const QPoint& pos,
bool interpolate =
false);
173 virtual int pickNearestPoint(
const QwtPlot* plot,
const QPoint& pos,
int windowSize = -5);
176 void onPlotItemDetached(
QwtPlotItem* item,
bool on);
177 void onParasitePlotAttached(
QwtPlot* parasiteplot,
bool on);
183 virtual void drawFeaturePoint(QPainter* painter,
const QwtPlot* plot,
const QwtPlotItem* item,
const QPointF& itemPoint)
const;
185 virtual void move(
const QPoint& pos)
override;
187 QString formatAxisValue(
double value,
int axisId,
QwtPlot* plot)
const;
191 void drawAllFeaturePoints(QPainter* painter)
const;
193 void updateFeaturePoint(
const QPoint& pos);
195 QRect ensureRectInBounds(
const QRect& rect,
const QRect& bounds)
const;
Definition qwt_dyngrid_layout.h:33
Base picker class specifically for canvas.
Definition qwt_canvas_picker.h:29
virtual void drawRubberBand(QPainter *) const
Draw a rubber band, depending on rubberBand()
Definition qwt_picker.cpp:803
virtual void setTrackerPosition(const QPoint &pos)
Set the tracker position manually.
Definition qwt_picker.cpp:1052
virtual void move(const QPoint &)
Move the last point of the selection The moved() signal is emitted.
Definition qwt_picker.cpp:1499
virtual QwtText trackerText(const QPoint &pos) const
Return the label for a position.
Definition qwt_picker.cpp:660
virtual QRect trackerRect(const QFont &) const
Calculate the bounding rectangle for the tracker text from the current position of the tracker.
Definition qwt_picker.cpp:984
Base class for items on the plot canvas.
Definition qwt_plot_item.h:119
A plot data picker class for displaying current y-values or nearest points.
Definition qwt_plot_series_data_picker.h:28
InterpolationMode
Interpolation modes .
Definition qwt_plot_series_data_picker.h:80
@ NoInterpolation
No interpolation, use nearest data point.
Definition qwt_plot_series_data_picker.h:81
~QwtPlotSeriesDataPicker()
Destructor.
TextPlacement
Text placement options .
Definition qwt_plot_series_data_picker.h:57
@ TextOnCanvasTopRight
Text on canvas top right.
Definition qwt_plot_series_data_picker.h:62
@ TextOnCanvasTopAuto
Text on canvas top, left or right auto-detected based on mouse position.
Definition qwt_plot_series_data_picker.h:66
@ TextOnCanvasBottomRight
Text on canvas bottom right.
Definition qwt_plot_series_data_picker.h:64
@ TextOnCanvasBottomLeft
Text on canvas bottom left.
Definition qwt_plot_series_data_picker.h:65
@ TextPlaceAuto
Auto placement (top for pick y, follow mouse for pick nearest)
Definition qwt_plot_series_data_picker.h:58
@ TextFollowOnTop
On top of the plot area (default)
Definition qwt_plot_series_data_picker.h:59
@ TextFollowOnBottom
On bottom of the plot area.
Definition qwt_plot_series_data_picker.h:60
@ TextOnCanvasTopLeft
Text on canvas top left.
Definition qwt_plot_series_data_picker.h:63
@ TextFollowMouse
Follow mouse pointer.
Definition qwt_plot_series_data_picker.h:61
PickSeriesMode
Pick modes .
Definition qwt_plot_series_data_picker.h:42
@ PickYValue
Pick y-value (default)
Definition qwt_plot_series_data_picker.h:43
A 2-D plotting widget.
Definition qwt_plot.h:138
A class representing a text.
Definition qwt_text.h:93
Feature point structure .
Definition qwt_plot_series_data_picker.h:95