QtiPlot  0.9.8.2
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes
RangeSelectorTool Class Reference

#include <RangeSelectorTool.h>

Inheritance diagram for RangeSelectorTool:
PlotToolInterface

List of all members.

Public Slots

virtual void pointSelected (const QPoint &point)
void setCurveRange ()
void setEnabled (bool on=true)

Signals

void changed ()
 Emitted whenever the selected curve and/or range have changed.
void statusText (const QString &)

Public Member Functions

void clearSelection ()
void copySelection ()
void cutSelection ()
int dataSize () const
virtual bool eventFilter (QObject *obj, QEvent *event)
bool isVisible ()
bool keyEventFilter (QKeyEvent *ke)
double maxXValue () const
double maxYValue () const
double minXValue () const
double minYValue () const
void pasteSelection ()
 RangeSelectorTool (Graph *graph, const QObject *status_target=NULL, const char *status_slot="")
virtual int rtti () const
QwtPlotCurve * selectedCurve () const
void setSelectedCurve (QwtPlotCurve *curve)
 Caller is responsible for replot.
void setVisible (bool on)
virtual ~RangeSelectorTool ()
- Public Member Functions inherited from PlotToolInterface
 PlotToolInterface (Graph *graph, const QObject *status_target=NULL, const char *status_slot="")
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 Types

enum  RangeEditOperation { Copy, Cut, Delete }

Private Slots

void clearMultipleSelection ()
void copyMultipleSelection ()
void cutMultipleSelection ()

Private Member Functions

void clearSelectedCurve ()
 Clears data range from the selected curve.
void copySelectedCurve ()
 Copies data range from the selected curve to clipboard.
bool mightNeedMultipleSelection ()
void showSelectionDialog (RangeEditOperation op=Copy)

Private Attributes

QwtPlotMarker d_active_marker
int d_active_point
bool d_enabled
QwtPlotMarker d_inactive_marker
int d_inactive_point
QwtPlotCurve * d_selected_curve
QPointer< QDialog > d_selection_dialog
QList< QCheckBox * > d_selection_lst
 Keeps track of the multiple curves selection.
bool d_visible

Additional Inherited Members

- Public Types inherited from PlotToolInterface
enum  RttiValues {
  Rtti_PlotTool = 0, Rtti_RangeSelector, Rtti_DataPicker, Rtti_TranslateCurveTool,
  Rtti_MultiPeakFitTool, Rtti_LineProfileTool, Rtti_AddWidgetTool, Rtti_DrawDataPoints,
  Rtti_ImageProfilesTool, Rtti_SubtractLineTool, Rtti_PlotUserTool = 1000
}
- Protected Attributes inherited from PlotToolInterface
Graphd_graph
const char * d_status_slot
const QObject * d_status_target

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
Copy 
Cut 
Delete 

Constructor & Destructor Documentation

RangeSelectorTool::RangeSelectorTool ( Graph graph,
const QObject *  status_target = NULL,
const char *  status_slot = "" 
)
RangeSelectorTool::~RangeSelectorTool ( )
virtual

Member Function Documentation

virtual void RangeSelectorTool::append ( const QPoint &  point)
inlineprotectedvirtual

References pointSelected().

void RangeSelectorTool::changed ( )
signal

Emitted whenever the selected curve and/or range have changed.

Referenced by clearMultipleSelection(), clearSelectedCurve(), pasteSelection(), pointSelected(), setActivePoint(), and setSelectedCurve().

void RangeSelectorTool::clearMultipleSelection ( )
privateslot
void RangeSelectorTool::clearSelectedCurve ( )
private
void RangeSelectorTool::clearSelection ( )
void RangeSelectorTool::copyMultipleSelection ( )
privateslot
void RangeSelectorTool::copySelectedCurve ( )
private
void RangeSelectorTool::copySelection ( )
void RangeSelectorTool::cutMultipleSelection ( )
privateslot
void RangeSelectorTool::cutSelection ( )
int RangeSelectorTool::dataSize ( ) const
inline

References d_active_point, and d_inactive_point.

void RangeSelectorTool::emitStatusText ( )
protected
bool RangeSelectorTool::eventFilter ( QObject *  obj,
QEvent *  event 
)
virtual

References keyEventFilter().

bool RangeSelectorTool::isVisible ( )
inline

References d_visible.

bool RangeSelectorTool::keyEventFilter ( QKeyEvent *  ke)
double RangeSelectorTool::maxXValue ( ) const
inline
double RangeSelectorTool::maxYValue ( ) const
inline
bool RangeSelectorTool::mightNeedMultipleSelection ( )
private
double RangeSelectorTool::minXValue ( ) const
inline
double RangeSelectorTool::minYValue ( ) const
inline
void RangeSelectorTool::pasteSelection ( )
void RangeSelectorTool::pointSelected ( const QPoint &  point)
virtualslot
virtual int RangeSelectorTool::rtti ( ) const
inlinevirtual
QwtPlotCurve* RangeSelectorTool::selectedCurve ( ) const
inline

References d_selected_curve.

void RangeSelectorTool::setActivePoint ( int  index)
protected

Caller is responsible for replot.

References changed(), d_active_marker, d_active_point, d_enabled, d_selected_curve, and emitStatusText().

Referenced by keyEventFilter(), and pointSelected().

void RangeSelectorTool::setCurveRange ( )
slot
void RangeSelectorTool::setEnabled ( bool  on = true)
slot
void RangeSelectorTool::setSelectedCurve ( QwtPlotCurve *  curve)
void RangeSelectorTool::setVisible ( bool  on)
void RangeSelectorTool::showSelectionDialog ( RangeEditOperation  op = Copy)
private
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.

Referenced by emitStatusText(), and RangeSelectorTool().

void RangeSelectorTool::switchActiveMarker ( )
protected

Member Data Documentation

QwtPlotMarker RangeSelectorTool::d_active_marker
private
int RangeSelectorTool::d_active_point
private
bool RangeSelectorTool::d_enabled
private
QwtPlotMarker RangeSelectorTool::d_inactive_marker
private
int RangeSelectorTool::d_inactive_point
private
QwtPlotCurve* RangeSelectorTool::d_selected_curve
private
QPointer<QDialog> RangeSelectorTool::d_selection_dialog
private
QList<QCheckBox *> RangeSelectorTool::d_selection_lst
private

Keeps track of the multiple curves selection.

Referenced by clearMultipleSelection(), copyMultipleSelection(), and showSelectionDialog().

bool RangeSelectorTool::d_visible
private

The documentation for this class was generated from the following files: