SciDAVis  1.D4
TranslateCurveTool.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : TranslateCurveTool.h
3  Project : SciDAVis
4  --------------------------------------------------------------------
5  Copyright : (C) 2006,2007 by Ion Vasilief,
6  Tilman Benkert, Knut Franke
7  Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net,
8  knut.franke*gmx.de
9  Description : Plot tool for translating curves.
10 
11  ***************************************************************************/
12 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  * This program is distributed in the hope that it will be useful, *
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
23  * GNU General Public License for more details. *
24  * *
25  * You should have received a copy of the GNU General Public License *
26  * along with this program; if not, write to the Free Software *
27  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
28  * Boston, MA 02110-1301 USA *
29  * *
30  ***************************************************************************/
31 #ifndef TRANSLATE_CURVE_TOOL_H
32 #define TRANSLATE_CURVE_TOOL_H
33 
34 #include "PlotToolInterface.h"
35 #include <QObject>
36 #include <qwt_double_rect.h>
37 
38 class ApplicationWindow;
39 class QwtPlotCurve;
40 
42 class TranslateCurveTool : public QObject, public PlotToolInterface
43 {
44  Q_OBJECT
45  public:
56  TranslateCurveTool(Graph *graph, ApplicationWindow *app, Direction dir, const QObject *status_target=NULL, const char *status_slot="");
57  virtual RTTI rtti() const { return TranslateCurve; }
58  signals:
63  void statusText(const QString&);
64  public slots:
66  void selectCurvePoint(QwtPlotCurve *curve, int point_index);
68  void selectDestination(const QwtDoublePoint &point);
69  private:
72  QwtPlotCurve *d_selected_curve;
73  QwtDoublePoint d_curve_point;
75 };
76 
77 #endif // TRANSLATE_CURVE_TOOL_H
78