Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

qwt_plot_picker.h

00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  * 
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 // vim: expandtab
00011 
00012 #ifndef QWT_PLOT_PICKER_H
00013 #define QWT_PLOT_PICKER_H
00014 
00015 #include "qwt_double_rect.h"
00016 #include "qwt_plot_canvas.h"
00017 #include "qwt_picker.h"
00018 
00019 class QwtPlot;
00020 
00037 class QWT_EXPORT QwtPlotPicker: public QwtPicker
00038 {
00039     Q_OBJECT
00040 
00041 public:
00042     explicit QwtPlotPicker(QwtPlotCanvas *);
00043 
00044     explicit QwtPlotPicker(int xAxis, int yAxis,
00045         QwtPlotCanvas *);
00046 
00047     explicit QwtPlotPicker(int xAxis, int yAxis, int selectionFlags, 
00048         RubberBand rubberBand, DisplayMode trackerMode, 
00049         QwtPlotCanvas *);
00050 
00051     virtual void setAxis(int xAxis, int yAxis);
00052 
00053     int xAxis() const;
00054     int yAxis() const;
00055 
00056     QwtPlot *plot();
00057     const QwtPlot *plot() const;
00058     
00059     QwtPlotCanvas *canvas();
00060     const QwtPlotCanvas *canvas() const;
00061 
00062 signals:
00063 
00068     void selected(const QwtDoublePoint &pos);
00069 
00074     void selected(const QwtDoubleRect &rect);
00075 
00082     void selected(const QwtArray<QwtDoublePoint> &pa);
00083 
00090     void appended(const QwtDoublePoint &pos);
00091 
00099     void moved(const QwtDoublePoint &pos);
00100 
00101 protected:
00102     QwtDoubleRect scaleRect() const;
00103 
00104     QwtDoubleRect invTransform(const QRect &) const;
00105     QRect transform(const QwtDoubleRect &) const;
00106 
00107     QwtDoublePoint invTransform(const QPoint &) const;
00108     QPoint transform(const QwtDoublePoint &) const;
00109 
00110     virtual QString trackerText(const QPoint &) const;
00111     virtual QString trackerText(const QwtDoublePoint &) const;
00112 
00113     virtual void move(const QPoint &);
00114     virtual void append(const QPoint &);
00115     virtual bool end(bool ok = true);
00116 
00117 private:
00118     int d_xAxis;
00119     int d_yAxis;
00120 };
00121             
00122 #endif

Generated on Wed Aug 31 23:02:29 2005 for Qwt User's Guide by  doxygen 1.4.1