- Main Page
- Related Pages
- Classes
- Files

- File List

# 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     virtual ~QwtPlotPicker();
    00036
    00037     explicit QwtPlotPicker(int xAxis, int yAxis,
    00038         QwtPlotCanvas *);
    00039
    00040     explicit QwtPlotPicker(int xAxis, int yAxis, int selectionFlags,
    00041         RubberBand rubberBand, DisplayMode trackerMode,
    00042         QwtPlotCanvas *);
    00043
    00044     virtual void setAxis(int xAxis, int yAxis);
    00045
    00046     int xAxis() const;
    00047     int yAxis() const;
    00048
    00049     QwtPlot *plot();
    00050     const QwtPlot *plot() const;
    00051
    00052     QwtPlotCanvas *canvas();
    00053     const QwtPlotCanvas *canvas() const;
    00054
    00055 signals:
    00056
    00061     void selected(const QwtDoublePoint &pos);
    00062
    00067     void selected(const QwtDoubleRect &rect);
    00068
    00075     void selected(const QwtArray<QwtDoublePoint> &pa);
    00076
    00083     void appended(const QwtDoublePoint &pos);
    00084
    00092     void moved(const QwtDoublePoint &pos);
    00093
    00094 protected:
    00095     QwtDoubleRect scaleRect() const;
    00096
    00097     QwtDoubleRect invTransform(const QRect &) const;
    00098     QRect transform(const QwtDoubleRect &) const;
    00099
    00100     QwtDoublePoint invTransform(const QPoint &) const;
    00101     QPoint transform(const QwtDoublePoint &) const;
    00102
    00103     virtual QwtText trackerText(const QPoint &) const;
    00104     virtual QwtText trackerText(const QwtDoublePoint &) const;
    00105
    00106     virtual void move(const QPoint &);
    00107     virtual void append(const QPoint &);
    00108     virtual bool end(bool ok = true);
    00109
    00110 private:
    00111     int d_xAxis;
    00112     int d_yAxis;
    00113 };
    00114
    00115 #endif