00001 /*************************************************************************** 00002 File : ScreenPickerTool.h 00003 Project : QtiPlot 00004 -------------------------------------------------------------------- 00005 Copyright : (C) 2006,2007 by Ion Vasilief, 00006 Tilman Hoener zu Siederdissen, Knut Franke 00007 Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net, 00008 knut.franke*gmx.de 00009 Description : Plot tool for selecting arbitrary points. 00010 00011 ***************************************************************************/ 00012 00013 /*************************************************************************** 00014 * * 00015 * This program is free software; you can redistribute it and/or modify * 00016 * it under the terms of the GNU General Public License as published by * 00017 * the Free Software Foundation; either version 2 of the License, or * 00018 * (at your option) any later version. * 00019 * * 00020 * This program is distributed in the hope that it will be useful, * 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00023 * GNU General Public License for more details. * 00024 * * 00025 * You should have received a copy of the GNU General Public License * 00026 * along with this program; if not, write to the Free Software * 00027 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00028 * Boston, MA 02110-1301 USA * 00029 * * 00030 ***************************************************************************/ 00031 #ifndef SCREEN_PICKER_TOOL_H 00032 #define SCREEN_PICKER_TOOL_H 00033 00034 #include "PlotToolInterface.h" 00035 #include <QObject> 00036 #include <qwt_double_rect.h> 00037 #include <qwt_plot_marker.h> 00038 #include <qwt_plot_picker.h> 00039 00045 class ScreenPickerTool : public QwtPlotPicker, public PlotToolInterface 00046 { 00047 Q_OBJECT 00048 public: 00049 ScreenPickerTool(Graph *graph, const QObject *status_target=NULL, const char *status_slot=""); 00050 virtual ~ScreenPickerTool(); 00051 virtual bool eventFilter(QObject *obj, QEvent *event); 00052 signals: 00057 void statusText(const QString&); 00058 protected: 00059 virtual void append(const QPoint &point); 00060 QwtPlotMarker d_selection_marker; 00061 }; 00062 00063 #endif // ifndef SCREEN_PICKER_TOOL_H 00064