SciDAVis
1.D4
|
#include <RangeSelectorTool.h>
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="") | |
virtual RTTI | rtti () const |
QwtPlotCurve * | selectedCurve () const |
void | setSelectedCurve (QwtPlotCurve *curve) |
Caller is responsible for replot. | |
virtual | ~RangeSelectorTool () |
Public Member Functions inherited from PlotToolInterface | |
PlotToolInterface (Graph *graph) | |
virtual | ~PlotToolInterface () |
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 |
Additional Inherited Members | |
Public Types inherited from PlotToolInterface | |
enum | RTTI { DataPicker, ScreenPicker, LineProfile, MultiPeak, RangeSelector, TranslateCurve } |
Protected Attributes inherited from PlotToolInterface | |
Graph * | d_graph |
Plot tool for selecting ranges on curves.
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.
RangeSelectorTool::RangeSelectorTool | ( | Graph * | graph, |
const QObject * | status_target = NULL , |
||
const char * | status_slot = "" |
||
) |
|
virtual |
References d_active_marker, PlotToolInterface::d_graph, d_inactive_marker, and Graph::plotWidget().
|
inlineprotectedvirtual |
References pointSelected().
|
signal |
Emitted whenever the selected curve and/or range have changed.
Referenced by pointSelected(), setActivePoint(), and setSelectedCurve().
|
inline |
References d_active_point, and d_inactive_point.
|
protected |
References Table::colIndex(), d_active_marker, d_active_point, d_inactive_marker, d_selected_curve, Graph::Function, statusText(), and Table::text().
Referenced by pointSelected(), setActivePoint(), setSelectedCurve(), and switchActiveMarker().
|
virtual |
References keyEventFilter().
bool RangeSelectorTool::keyEventFilter | ( | QKeyEvent * | ke | ) |
References Graph::curve(), Graph::curveIndex(), Graph::curves(), d_active_point, PlotToolInterface::d_graph, d_selected_curve, Graph::plotWidget(), setActivePoint(), setSelectedCurve(), and switchActiveMarker().
Referenced by eventFilter().
|
inline |
References d_active_marker, and d_inactive_marker.
|
inline |
References d_active_marker, and d_inactive_marker.
|
virtualslot |
References changed(), Plot::closestCurve(), Plot::curve(), d_active_marker, d_active_point, PlotToolInterface::d_graph, d_inactive_marker, d_inactive_point, d_selected_curve, emitStatusText(), Graph::plotWidget(), and setActivePoint().
Referenced by append().
|
inlinevirtual |
Implements PlotToolInterface.
References PlotToolInterface::RangeSelector.
|
inline |
References d_selected_curve.
|
protected |
Caller is responsible for replot.
References changed(), d_active_marker, d_active_point, d_selected_curve, and emitStatusText().
Referenced by keyEventFilter(), and pointSelected().
void RangeSelectorTool::setSelectedCurve | ( | QwtPlotCurve * | curve | ) |
Caller is responsible for replot.
References changed(), d_active_marker, d_active_point, d_inactive_marker, d_inactive_point, d_selected_curve, and emitStatusText().
Referenced by keyEventFilter().
|
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.
Referenced by emitStatusText(), and RangeSelectorTool().
|
protected |
References d_active_marker, d_active_point, PlotToolInterface::d_graph, d_inactive_marker, d_inactive_point, emitStatusText(), and Graph::plotWidget().
Referenced by keyEventFilter().
|
private |
|
private |
Referenced by dataSize(), emitStatusText(), keyEventFilter(), pointSelected(), RangeSelectorTool(), setActivePoint(), setSelectedCurve(), and switchActiveMarker().
|
private |
Referenced by emitStatusText(), maxXValue(), minXValue(), pointSelected(), RangeSelectorTool(), setSelectedCurve(), switchActiveMarker(), and ~RangeSelectorTool().
|
private |
Referenced by dataSize(), pointSelected(), RangeSelectorTool(), setSelectedCurve(), and switchActiveMarker().
|
private |
Referenced by emitStatusText(), keyEventFilter(), pointSelected(), RangeSelectorTool(), selectedCurve(), setActivePoint(), and setSelectedCurve().