Main Page | Class Hierarchy | Alphabetical List | Class List | 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 00013 #define QWT_PLOT_PICKER 00014 00015 #include "qwt_double_rect.h" 00016 #include "qwt_array.h" 00017 #include "qwt_plot_canvas.h" 00018 #include "qwt_picker.h" 00019 00020 class QwtPlot; 00021 00038 class QWT_EXPORT QwtPlotPicker: public QwtPicker 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 QwtPlotPicker(QwtPlotCanvas *, const char *name = 0); 00044 00045 QwtPlotPicker(int xAxis, int yAxis, 00046 QwtPlotCanvas *, const char *name = 0); 00047 00048 QwtPlotPicker(int xAxis, int yAxis, int selectionFlags, 00049 RubberBand rubberBand, DisplayMode cursorLabelMode, 00050 QwtPlotCanvas *, const char *name = 0); 00051 00052 virtual void setAxis(int xAxis, int yAxis); 00053 00054 int xAxis() const; 00055 int yAxis() const; 00056 00057 QwtPlot *plot(); 00058 const QwtPlot *plot() const; 00059 00060 QwtPlotCanvas *canvas(); 00061 const QwtPlotCanvas *canvas() const; 00062 00063 signals: 00064 00069 void selected(const QwtDoublePoint &pos); 00070 00075 void selected(const QwtDoubleRect &rect); 00076 00083 void selected(const QwtArray<QwtDoublePoint> &pa); 00084 00091 void appended(const QwtDoublePoint &pos); 00092 00100 void moved(const QwtDoublePoint &pos); 00101 00102 protected: 00103 QwtDoubleRect scaleRect() const; 00104 00105 QwtDoubleRect invTransform(const QRect &) const; 00106 QRect transform(const QwtDoubleRect &) const; 00107 00108 QwtDoublePoint invTransform(const QPoint &) const; 00109 QPoint transform(const QwtDoublePoint &) const; 00110 00111 virtual QString cursorLabel(const QPoint &) const; 00112 virtual QString cursorLabel(const QwtDoublePoint &) const; 00113 00114 virtual void move(const QPoint &); 00115 virtual void append(const QPoint &); 00116 virtual bool end(bool ok = TRUE); 00117 00118 private: 00119 int d_xAxis; 00120 int d_yAxis; 00121 }; 00122 00123 #endif 00124 00125 // Local Variables: 00126 // mode: C++ 00127 // c-file-style: "stroustrup" 00128 // indent-tabs-mode: nil 00129 // End:

Generated on Tue Nov 16 21:12:20 2004 for Qwt User's Guide by doxygen 1.3.8