Qwt User's Guide: qwt_plot_picker.h Source File

- Main Page
- Classes
- Files
- 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
    00029 class QWT_EXPORT QwtPlotPicker: public QwtPicker
    00030 {
    00031     Q_OBJECT
    00032
    00033 public:
    00034     explicit QwtPlotPicker(QwtPlotCanvas *);
    00035
    00036     explicit QwtPlotPicker(int xAxis, int yAxis,
    00037         QwtPlotCanvas *);
    00038
    00039     explicit QwtPlotPicker(int xAxis, int yAxis, int selectionFlags,
    00040         RubberBand rubberBand, DisplayMode trackerMode,
    00041         QwtPlotCanvas *);
    00042
    00043     virtual void setAxis(int xAxis, int yAxis);
    00044
    00045     int xAxis() const;
    00046     int yAxis() const;
    00047
    00048     QwtPlot *plot();
    00049     const QwtPlot *plot() const;
    00050
    00051     QwtPlotCanvas *canvas();
    00052     const QwtPlotCanvas *canvas() const;
    00053
    00054 signals:
    00055
    00060     void selected(const QwtDoublePoint &pos);
    00061
    00066     void selected(const QwtDoubleRect &rect);
    00067
    00074     void selected(const QwtArray<QwtDoublePoint> &pa);
    00075
    00082     void appended(const QwtDoublePoint &pos);
    00083
    00091     void moved(const QwtDoublePoint &pos);
    00092
    00093 protected:
    00094     QwtDoubleRect scaleRect() const;
    00095
    00096     QwtDoubleRect invTransform(const QRect &) const;
    00097     QRect transform(const QwtDoubleRect &) const;
    00098
    00099     QwtDoublePoint invTransform(const QPoint &) const;
    00100     QPoint transform(const QwtDoublePoint &) const;
    00101
    00102     virtual QwtText trackerText(const QPoint &) const;
    00103     virtual QwtText trackerText(const QwtDoublePoint &) const;
    00104
    00105     virtual void move(const QPoint &);
    00106     virtual void append(const QPoint &);
    00107     virtual bool end(bool ok = true);
    00108
    00109 private:
    00110     int d_xAxis;
    00111     int d_yAxis;
    00112 };
    00113
    00114 #endif