libPacPlot 2.0(r200)
Improved Qwt Plot Widget

PacPlot.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2008-2011 by Matthias Nagl                              *
00003  *   mnagl@uni-goettingen.de                                               *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef PACPLOT_H
00022 #define PACPLOT_H
00023 
00034 #include <qwt_plot.h>
00035 
00036 #if defined(PACPLOT_LIBRARY)
00037 #  define PACPLOT_EXPORT Q_DECL_EXPORT
00038 #else
00039 #  define PACPLOT_EXPORT Q_DECL_IMPORT
00040 #endif
00041 
00042 class QWidget;
00043 class QwtText;
00044 class QToolButton;
00045 class PacPlotZoomer;
00046 class QwtPlotPicker;
00047 class QwtPlotMagnifier;
00048 class QwtPlotPanner;
00049 class QwtPlotGrid;
00050 
00055 class PACPLOT_EXPORT PacPlot : public QwtPlot
00056 {
00057 Q_OBJECT
00058 public:
00059     explicit PacPlot(QWidget *parent = 0);
00060     explicit PacPlot(const QwtText &title, QWidget *p = 0);
00061     void setHelpText(const QString &helptitle, const QString &helptext);
00062     bool markerToolIsChecked() const;
00063     bool zoomToolIsChecked() const;
00064     void setMarkerToolChecked(bool checked);
00065     void setZoomToolChecked(bool checked);
00066     void setToolSelectionWidgetsVisible(bool visible);
00067     virtual void setZoomBase();
00068 
00069 signals:
00070     //void markerToolSelected(bool selected);
00071     //void zoomToolSelected(bool selected);
00072     void pickerAppended(QwtDoublePoint p);
00073     void pickerMoved(QwtDoublePoint p);
00074 
00075 private slots:
00076     void markerToggled(bool marker);
00077     void showHelp();
00078 
00079 protected:
00080     virtual bool eventFilter(QObject *, QEvent *);
00081     virtual void changeEvent (QEvent *event);
00082 
00083 private:
00084     void createButtons();
00085 
00086     QToolButton *marker, *zoom, *help;
00087     QWidget *toolbar, *line;
00088     QString helptitle, helptext;
00089 
00090     PacPlotZoomer *zoomer;
00091     QwtPlotPicker *picker;
00092     QwtPlotMagnifier *magnifier;
00093     QwtPlotPanner *panner;
00094     QwtPlotGrid *grid;
00095 };
00096 
00097 #endif // PACPLOT_H
 All Classes Namespaces Files Functions Variables Enumerations Properties Friends Defines