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. More...
 
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. More...
 
bool keyEventFilter (QKeyEvent *ke)
 
Mode mode ()
 Returns the information about the functioning mode of the tool. More...
 
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

◆ Mode

Enumerator
Display 
Move 
Remove 
MoveCurve 

◆ MoveMode

Enumerator
Free 
Vertical 
Horizontal 

Constructor & Destructor Documentation

◆ DataPickerTool()

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

◆ ~DataPickerTool()

DataPickerTool::~DataPickerTool ( )
virtual

Member Function Documentation

◆ append()

void DataPickerTool::append ( const QPoint &  point)
protectedvirtual

◆ applicationWindow()

ApplicationWindow* DataPickerTool::applicationWindow ( )
inline

◆ copySelection()

void DataPickerTool::copySelection ( )

◆ cutSelection()

void DataPickerTool::cutSelection ( )

References copySelection(), and removePoint().

Referenced by selectedPointIndex().

◆ end()

bool DataPickerTool::end ( bool  ok)
protectedvirtual

Referenced by applicationWindow().

◆ eventFilter()

bool DataPickerTool::eventFilter ( QObject *  obj,
QEvent *  event 
)
virtual

◆ findClosestPoint()

int DataPickerTool::findClosestPoint ( QwtPlotCurve *  c,
double  x,
bool  up 
)

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

Referenced by setMode().

◆ keyEventFilter()

bool DataPickerTool::keyEventFilter ( QKeyEvent *  ke)

◆ mode()

Mode DataPickerTool::mode ( )
inline

Returns the information about the functioning mode of the tool.

References d_mode.

◆ move()

void DataPickerTool::move ( const QPoint &  point)
protectedvirtual

◆ moveBy()

void DataPickerTool::moveBy ( int  dx,
int  dy 
)
protected

◆ movePoint()

void DataPickerTool::movePoint ( const QPoint &  cursor)
protected

◆ pasteSelection()

void DataPickerTool::pasteSelection ( )

◆ pasteSelectionAsLayerText

void DataPickerTool::pasteSelectionAsLayerText ( )
slot

◆ removePoint()

void DataPickerTool::removePoint ( )

◆ rtti()

virtual int DataPickerTool::rtti ( ) const
inlinevirtual

◆ selected

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

Emitted whenever a new data point has been selected.

Referenced by applicationWindow(), eventFilter(), and keyEventFilter().

◆ selectedCurve()

QwtPlotCurve* DataPickerTool::selectedCurve ( ) const
inline

References d_selected_curve.

◆ selectedPointIndex()

int DataPickerTool::selectedPointIndex ( )
inline

◆ selectTableRow()

void DataPickerTool::selectTableRow ( )

◆ setMode()

void DataPickerTool::setMode ( Mode  m)
inline

◆ setSelectedCurve()

void DataPickerTool::setSelectedCurve ( QwtPlotCurve *  c)
inline

References setSelection().

Referenced by BaselineTool::BaselineTool().

◆ setSelection()

void DataPickerTool::setSelection ( QwtPlotCurve *  curve,
int  point_index 
)
protectedvirtual

◆ statusText

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 applicationWindow(), DataPickerTool(), movePoint(), pasteSelection(), and setSelection().

Member Data Documentation

◆ d_app

ApplicationWindow* DataPickerTool::d_app
protected

◆ d_mode

Mode DataPickerTool::d_mode
protected

◆ d_move_mode

MoveMode DataPickerTool::d_move_mode
protected

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

◆ d_restricted_move_pos

QPoint DataPickerTool::d_restricted_move_pos
protected

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

◆ d_selected_curve

QwtPlotCurve* DataPickerTool::d_selected_curve
protected

◆ d_selected_point

int DataPickerTool::d_selected_point
protected

◆ d_selection_marker

QwtPlotMarker DataPickerTool::d_selection_marker
protected

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