SciDAVis  1.D4
ScreenPickerTool.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : ScreenPickerTool.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 selecting arbitrary points.
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 SCREEN_PICKER_TOOL_H
32 #define SCREEN_PICKER_TOOL_H
33 
34 #include "PlotToolInterface.h"
35 #include <QObject>
36 #include <qwt_double_rect.h>
37 #include <qwt_plot_marker.h>
38 #include <qwt_plot_picker.h>
39 
45 class ScreenPickerTool : public QwtPlotPicker, public PlotToolInterface
46 {
47  Q_OBJECT
48  public:
49  ScreenPickerTool(Graph *graph, const QObject *status_target=NULL, const char *status_slot="");
50  virtual ~ScreenPickerTool();
51  virtual RTTI rtti() const { return ScreenPicker; }
52  virtual bool eventFilter(QObject *obj, QEvent *event);
53  signals:
58  void statusText(const QString&);
59  protected:
60  virtual void append(const QPoint &point);
61  QwtPlotMarker d_selection_marker;
62  virtual QwtText trackerText(const QwtDoublePoint &point) const;
63 };
64 
65 #endif // ifndef SCREEN_PICKER_TOOL_H
66