QtiPlot  0.9.8.2
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:
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:
71  QwtPlotCurve *d_selected_curve;
72  QwtDoublePoint d_curve_point;
74 };
75 
76 #endif // TRANSLATE_CURVE_TOOL_H