ScreenPickerTool.h

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

Generated on Tue Jun 17 08:36:13 2008 for QtiPlot by  doxygen 1.5.5