#include <RangeSelectorTool.h>
As detailed in the documentation of PlotToolInterface, this one is different from most other plot tools in that other tools depend on it. Thus, either RangeSelectorTool should cease to inherit from PlotToolInterface and be renamed to RangeSelector, drawing a clear destinction to the other tools, or the notion of multiple tools being active in parallel and possibly depending on each other should be generalized somehow.
In any case, gathering the code specific to range selection in a seperate class makes Graph/CanvasPicker more manageable; maybe something similar can be done for zooming.
Public Slots | |
virtual void | pointSelected (const QPoint &point) |
Signals | |
void | changed () |
Emitted whenever the selected curve and/or range have changed. | |
void | statusText (const QString &) |
Public Member Functions | |
int | dataSize () const |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
bool | keyEventFilter (QKeyEvent *ke) |
double | maxXValue () const |
double | minXValue () const |
RangeSelectorTool (Graph *graph, const QObject *status_target=NULL, const char *status_slot="") | |
QwtPlotCurve * | selectedCurve () const |
void | setSelectedCurve (QwtPlotCurve *curve) |
Caller is responsible for replot. | |
virtual | ~RangeSelectorTool () |
Protected Member Functions | |
virtual void | append (const QPoint &point) |
void | emitStatusText () |
void | setActivePoint (int index) |
Caller is responsible for replot. | |
void | switchActiveMarker () |
Private Attributes | |
QwtPlotMarker | d_active_marker |
int | d_active_point |
QwtPlotMarker | d_inactive_marker |
int | d_inactive_point |
QwtPlotCurve * | d_selected_curve |
RangeSelectorTool::RangeSelectorTool | ( | Graph * | graph, | |
const QObject * | status_target = NULL , |
|||
const char * | status_slot = "" | |||
) |
RangeSelectorTool::~RangeSelectorTool | ( | ) | [virtual] |
virtual void RangeSelectorTool::append | ( | const QPoint & | point | ) | [inline, protected, virtual] |
void RangeSelectorTool::changed | ( | ) | [signal] |
Emitted whenever the selected curve and/or range have changed.
int RangeSelectorTool::dataSize | ( | ) | const [inline] |
void RangeSelectorTool::emitStatusText | ( | ) | [protected] |
bool RangeSelectorTool::eventFilter | ( | QObject * | obj, | |
QEvent * | event | |||
) | [virtual] |
bool RangeSelectorTool::keyEventFilter | ( | QKeyEvent * | ke | ) |
double RangeSelectorTool::maxXValue | ( | ) | const [inline] |
double RangeSelectorTool::minXValue | ( | ) | const [inline] |
void RangeSelectorTool::pointSelected | ( | const QPoint & | point | ) | [virtual, slot] |
QwtPlotCurve* RangeSelectorTool::selectedCurve | ( | ) | const [inline] |
void RangeSelectorTool::setActivePoint | ( | int | index | ) | [protected] |
Caller is responsible for replot.
void RangeSelectorTool::setSelectedCurve | ( | QwtPlotCurve * | curve | ) |
Caller is responsible for replot.
void RangeSelectorTool::statusText | ( | const QString & | ) | [signal] |
Emitted whenever a new message should be presented to the user.
You don't have to connect to this signal if you alreay specified a reciever during initialization.
void RangeSelectorTool::switchActiveMarker | ( | ) | [protected] |
QwtPlotMarker RangeSelectorTool::d_active_marker [private] |
int RangeSelectorTool::d_active_point [private] |
QwtPlotMarker RangeSelectorTool::d_inactive_marker [private] |
int RangeSelectorTool::d_inactive_point [private] |
QwtPlotCurve* RangeSelectorTool::d_selected_curve [private] |