TranslateCurveTool Class Reference

Plot tool for translating curves. More...

`#include <TranslateCurveTool.h>`

Inheritance diagram for TranslateCurveTool:

## Public Types

enum | Direction { 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 | selectCurvePoint (QwtPlotCurve *curve, int point_index)
| Select curve to translate, using the specified point as base point. More...
void | selectDestination (const QwtDoublePoint &point)
| Select the coordinates where the base point should end up (modulo projection on d_dir direction). More...

## Signals

void | statusText (const QString &)
| Emitted whenever a new message should be presented to the user. More...

## Public Member Functions

virtual int | rtti () const
| TranslateCurveTool (Graph *graph, ApplicationWindow *app, Direction dir, const QObject *status_target=NULL, const char *status_slot="")
| Standard constructor. More...
Public Member Functions inherited from PlotToolInterface
| PlotToolInterface (Graph *graph, const QObject *status_target=NULL, const char *status_slot="")
virtual | ~PlotToolInterface ()

## Private Attributes

ApplicationWindow * | d_app
QwtDoublePoint | d_curve_point
Direction | d_dir
QwtPlotCurve * | d_selected_curve
PlotToolInterface * | d_sub_tool

## Additional Inherited Members

Protected Attributes inherited from PlotToolInterface
Graph * | d_graph
const char * | d_status_slot
const QObject * | d_status_target

## Detailed Description

Plot tool for translating curves.

## Member Enumeration Documentation

enum TranslateCurveTool::Direction

Enumerator
Vertical |
Horizontal |

## Constructor & Destructor Documentation

TranslateCurveTool::TranslateCurveTool | ( | Graph * | graph,
|  | ApplicationWindow * | app,
|  | Direction | dir,
|  | const QObject * | status_target = `NULL`,
|  | const char * | status_slot = `""`
| ) |  |

Standard constructor.

Parameters

  graph | the Graph to operate on (or rather, on whose image markers to operate on)
  app | parent window of graph
  dir | the direction in which to translate curves
  status_target | target to which the statusText(const QString&) signal will be connected
  status_slot | slot on status_target to which the statusText(const QString&) signal will be connected The status_target/status_slot arguments are provided, because statusText(const QString&) is emitted during initialization, before there's any other chance of connecting to it.

References PlotToolInterface::d_graph, d_sub_tool, DataPickerTool::Display, selectCurvePoint(), and statusText().

## Member Function Documentation

virtual int TranslateCurveTool::rtti | ( |  | ) | const

inline virtual

Reimplemented from PlotToolInterface.

References PlotToolInterface::Rtti_TranslateCurveTool.

void TranslateCurveTool::selectCurvePoint | ( | QwtPlotCurve * | curve,
|  | int | point_index
| ) |  |

slot

Select curve to translate, using the specified point as base point.

References Table::colIndex(), d_app, d_curve_point, d_dir, PlotToolInterface::d_graph, d_selected_curve, d_sub_tool, Graph::Function, Horizontal, ScreenPickerTool::Horizontal, Table::isReadOnlyColumn(), selectDestination(), Graph::setActiveTool(), statusText(), DataCurve::table(), Vertical, ScreenPickerTool::Vertical, and DataCurve::xColumnName().

Referenced by TranslateCurveTool().

void TranslateCurveTool::selectDestination | ( | const QwtDoublePoint & | point | ) |

slot

Select the coordinates where the base point should end up (modulo projection on d_dir direction).

References Table::colIndex(), Table::columnNumericFormat(), Table::columnType(), d_app, d_curve_point, d_dir, PlotToolInterface::d_graph, d_selected_curve, d_sub_tool, FunctionCurve::formulas(), Graph::Function, FunctionCurve::functionType(), Horizontal, FunctionCurve::loadData(), ApplicationWindow::modifiedProject(), FunctionCurve::Normal, Table::Numeric, Graph::setActiveTool(), FunctionCurve::setFormula(), Table::setText(), ApplicationWindow::table(), DataCurve::tableRow(), Table::text(), ApplicationWindow::updateCurves(), Vertical, and DataCurve::xColumnName().

Referenced by selectCurvePoint().

void TranslateCurveTool::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 selectCurvePoint(), and TranslateCurveTool().

## Member Data Documentation

ApplicationWindow* TranslateCurveTool::d_app

private

Referenced by selectCurvePoint(), and selectDestination().

QwtDoublePoint TranslateCurveTool::d_curve_point

private

Referenced by selectCurvePoint(), and selectDestination().

Direction TranslateCurveTool::d_dir

private

Referenced by selectCurvePoint(), and selectDestination().

QwtPlotCurve* TranslateCurveTool::d_selected_curve

private

Referenced by selectCurvePoint(), and selectDestination().

PlotToolInterface* TranslateCurveTool::d_sub_tool

private

Referenced by selectCurvePoint(), selectDestination(), and TranslateCurveTool().

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

- qtiplot/src/plot2D/TranslateCurveTool.h
- qtiplot/src/plot2D/TranslateCurveTool.cpp