QtiPlot
0.9.8.2
qtiplot
src
plot2D
TranslateCurveTool.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : TranslateCurveTool.h
3
Project : QtiPlot
4
--------------------------------------------------------------------
5
Copyright : (C) 2006,2007 by Ion Vasilief, Knut Franke
6
Email (use @ for *) : ion_vasilief*yahoo.fr, knut.franke*gmx.de
7
Description : Plot tool for translating curves.
8
9
***************************************************************************/
10
11
/***************************************************************************
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* *
18
* This program is distributed in the hope that it will be useful, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
22
* *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
27
* *
28
***************************************************************************/
29
#ifndef TRANSLATE_CURVE_TOOL_H
30
#define TRANSLATE_CURVE_TOOL_H
31
32
#include "
PlotToolInterface.h
"
33
#include <QObject>
34
#include <qwt_double_rect.h>
35
36
class
ApplicationWindow
;
37
class
QwtPlotCurve;
38
40
class
TranslateCurveTool
:
public
QObject,
public
PlotToolInterface
41
{
42
Q_OBJECT
43
public
:
44
enum
Direction
{
Vertical
,
Horizontal
};
54
TranslateCurveTool
(
Graph
*graph,
ApplicationWindow
*app,
Direction
dir,
const
QObject *status_target=NULL,
const
char
*status_slot=
""
);
55
56
virtual
int
rtti
()
const
{
return
PlotToolInterface::Rtti_TranslateCurveTool
;};
57
signals:
62
void
statusText
(
const
QString&);
63
public
slots:
65
void
selectCurvePoint
(QwtPlotCurve *curve,
int
point_index);
67
void
selectDestination
(
const
QwtDoublePoint &point);
68
private
:
69
Direction
d_dir
;
70
PlotToolInterface
*
d_sub_tool
;
71
QwtPlotCurve *
d_selected_curve
;
72
QwtDoublePoint
d_curve_point
;
73
ApplicationWindow
*
d_app
;
74
};
75
76
#endif // TRANSLATE_CURVE_TOOL_H
TranslateCurveTool::rtti
virtual int rtti() const
Definition:
TranslateCurveTool.h:56
TranslateCurveTool::d_app
ApplicationWindow * d_app
Definition:
TranslateCurveTool.h:73
Graph
A 2D-plotting widget.
Definition:
Graph.h:123
TranslateCurveTool::d_sub_tool
PlotToolInterface * d_sub_tool
Definition:
TranslateCurveTool.h:70
TranslateCurveTool::statusText
void statusText(const QString &)
Emitted whenever a new message should be presented to the user.
TranslateCurveTool::d_curve_point
QwtDoublePoint d_curve_point
Definition:
TranslateCurveTool.h:72
TranslateCurveTool
Plot tool for translating curves.
Definition:
TranslateCurveTool.h:40
PlotToolInterface::Rtti_TranslateCurveTool
Definition:
PlotToolInterface.h:70
ApplicationWindow
QtiPlot's main window.
Definition:
ApplicationWindow.h:133
TranslateCurveTool::Horizontal
Definition:
TranslateCurveTool.h:44
TranslateCurveTool::Direction
Direction
Definition:
TranslateCurveTool.h:44
TranslateCurveTool::selectDestination
void selectDestination(const QwtDoublePoint &point)
Select the coordinates where the base point should end up (modulo projection on d_dir direction)...
Definition:
TranslateCurveTool.cpp:98
TranslateCurveTool::Vertical
Definition:
TranslateCurveTool.h:44
PlotToolInterface.h
PlotToolInterface
Definition:
PlotToolInterface.h:60
TranslateCurveTool::d_dir
Direction d_dir
Definition:
TranslateCurveTool.h:69
TranslateCurveTool::d_selected_curve
QwtPlotCurve * d_selected_curve
Definition:
TranslateCurveTool.h:71
TranslateCurveTool::TranslateCurveTool
TranslateCurveTool(Graph *graph, ApplicationWindow *app, Direction dir, const QObject *status_target=NULL, const char *status_slot="")
Standard constructor.
Definition:
TranslateCurveTool.cpp:41
TranslateCurveTool::selectCurvePoint
void selectCurvePoint(QwtPlotCurve *curve, int point_index)
Select curve to translate, using the specified point as base point.
Definition:
TranslateCurveTool.cpp:57
Generated by
1.8.12