QtiPlot  0.9.8.2
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DataPickerTool Class Reference

Plot tool for selecting, moving or removing individual points of a curve. More...

#include <DataPickerTool.h>

Inheritance diagram for DataPickerTool:
PlotToolInterface BaselineTool

Public Types

enum  Mode { Display, Move, Remove, MoveCurve }
enum  MoveMode { Free, Vertical, Horizontal }
- 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
}

Public Slots

void pasteSelectionAsLayerText ()

Signals

void selected (QwtPlotCurve *, int)
 Emitted whenever a new data point has been selected.
void statusText (const QString &)

Public Member Functions

ApplicationWindowapplicationWindow ()
void copySelection ()
void cutSelection ()
 DataPickerTool (Graph *graph, ApplicationWindow *app, Mode mode, const QObject *status_target=NULL, const char *status_slot="")
virtual bool eventFilter (QObject *obj, QEvent *event)
int findClosestPoint (QwtPlotCurve *c, double x, bool up)
 Searches the index of the closest point to the given x coordinate.
bool keyEventFilter (QKeyEvent *ke)
Mode mode ()
 Returns the information about the functioning mode of the tool.
void pasteSelection ()
void removePoint ()
virtual int rtti () const
QwtPlotCurve * selectedCurve () const
int selectedPointIndex ()
void selectTableRow ()
void setMode (Mode m)
void setSelectedCurve (QwtPlotCurve *c)
virtual ~DataPickerTool ()
- 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)
virtual bool end (bool ok)
virtual void move (const QPoint &point)
void moveBy (int dx, int dy)
void movePoint (const QPoint &cursor)
virtual void setSelection (QwtPlotCurve *curve, int point_index)

Protected Attributes

ApplicationWindowd_app
Mode d_mode
MoveMode d_move_mode
QPoint d_restricted_move_pos
QwtPlotCurve * d_selected_curve
int d_selected_point
QwtPlotMarker d_selection_marker
- Protected Attributes inherited from PlotToolInterface
Graphd_graph
const char * d_status_slot
const QObject * d_status_target

Detailed Description

Plot tool for selecting, moving or removing individual points of a curve.

Member Enumeration Documentation

Enumerator:
Display 
Move 
Remove 
MoveCurve 
Enumerator:
Free 
Vertical 
Horizontal 

Constructor & Destructor Documentation

DataPickerTool::DataPickerTool ( Graph graph,
ApplicationWindow app,
Mode  mode,
const QObject *  status_target = NULL,
const char *  status_slot = "" 
)
DataPickerTool::~DataPickerTool ( )
virtual

Member Function Documentation

void DataPickerTool::append ( const QPoint &  point)
protectedvirtual
ApplicationWindow* DataPickerTool::applicationWindow ( )
inline

References d_app.

void DataPickerTool::copySelection ( )

References d_app, d_selected_curve, and d_selected_point.

Referenced by cutSelection().

void DataPickerTool::cutSelection ( )

References copySelection(), and removePoint().

bool DataPickerTool::end ( bool  ok)
protectedvirtual
bool DataPickerTool::eventFilter ( QObject *  obj,
QEvent *  event 
)
virtual
int DataPickerTool::findClosestPoint ( QwtPlotCurve *  c,
double  x,
bool  up 
)

Searches the index of the closest point to the given x coordinate.

bool DataPickerTool::keyEventFilter ( QKeyEvent *  ke)
Mode DataPickerTool::mode ( )
inline

Returns the information about the functioning mode of the tool.

References d_mode.

void DataPickerTool::move ( const QPoint &  point)
protectedvirtual
void DataPickerTool::moveBy ( int  dx,
int  dy 
)
protected
void DataPickerTool::movePoint ( const QPoint &  cursor)
protected
void DataPickerTool::pasteSelection ( )
void DataPickerTool::pasteSelectionAsLayerText ( )
slot
void DataPickerTool::removePoint ( )
virtual int DataPickerTool::rtti ( ) const
inlinevirtual

Reimplemented from PlotToolInterface.

References PlotToolInterface::Rtti_DataPicker.

void DataPickerTool::selected ( QwtPlotCurve *  ,
int   
)
signal

Emitted whenever a new data point has been selected.

Referenced by eventFilter(), and keyEventFilter().

QwtPlotCurve* DataPickerTool::selectedCurve ( ) const
inline

References d_selected_curve.

int DataPickerTool::selectedPointIndex ( )
inline

References d_selected_point.

void DataPickerTool::selectTableRow ( )
void DataPickerTool::setMode ( Mode  m)
inline

References d_mode.

Referenced by ApplicationWindow::movePoints().

void DataPickerTool::setSelectedCurve ( QwtPlotCurve *  c)
inline

References setSelection().

Referenced by BaselineTool::BaselineTool().

void DataPickerTool::setSelection ( QwtPlotCurve *  curve,
int  point_index 
)
protectedvirtual
void DataPickerTool::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 DataPickerTool(), movePoint(), pasteSelection(), and setSelection().

Member Data Documentation

ApplicationWindow* DataPickerTool::d_app
protected
Mode DataPickerTool::d_mode
protected
MoveMode DataPickerTool::d_move_mode
protected

Referenced by eventFilter(), move(), and movePoint().

QPoint DataPickerTool::d_restricted_move_pos
protected

Referenced by move(), movePoint(), and setSelection().

QwtPlotCurve* DataPickerTool::d_selected_curve
protected
int DataPickerTool::d_selected_point
protected
QwtPlotMarker DataPickerTool::d_selection_marker
protected

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