Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

qwt_plot_picker.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 // vim: expandtab
11
12 #ifndef QWT_PLOT_PICKER_H
13 #define QWT_PLOT_PICKER_H
14
15 #include "qwt_double_rect.h"
16 #include "qwt_plot_canvas.h"
17 #include "qwt_picker.h"
18
19 class QwtPlot;
20
29 class QWT_EXPORT QwtPlotPicker: public QwtPicker
30 {
31 Q_OBJECT
32
33 public:
34 explicit QwtPlotPicker(QwtPlotCanvas *);
35 virtual ~QwtPlotPicker();
36
37 explicit QwtPlotPicker(int xAxis, int yAxis,
38 QwtPlotCanvas *);
39
40 explicit QwtPlotPicker(int xAxis, int yAxis, int selectionFlags,
41 RubberBand rubberBand, DisplayMode trackerMode,
42 QwtPlotCanvas *);
43
44 virtual void setAxis(int xAxis, int yAxis);
45
46 int xAxis() const;
47 int yAxis() const;
48
49 QwtPlot *plot();
50 const QwtPlot *plot() const;
51
52 QwtPlotCanvas *canvas();
53 const QwtPlotCanvas *canvas() const;
54
55 signals:
56
61 void selected(const QwtDoublePoint &pos);
62
67 void selected(const QwtDoubleRect &rect);
68
75 void selected(const QwtArray<QwtDoublePoint> &pa);
76
83 void appended(const QwtDoublePoint &pos);
84
92 void moved(const QwtDoublePoint &pos);
93
94 protected:
95 QwtDoubleRect scaleRect() const;
96
97 QwtDoubleRect invTransform(const QRect &) const;
98 QRect transform(const QwtDoubleRect &) const;
99
100 QwtDoublePoint invTransform(const QPoint &) const;
101 QPoint transform(const QwtDoublePoint &) const;
102
103 virtual QwtText trackerText(const QPoint &) const;
104 virtual QwtText trackerText(const QwtDoublePoint &) const;
105
106 virtual void move(const QPoint &);
107 virtual void append(const QPoint &);
108 virtual bool end(bool ok = true);
109
110 private:
111 int d_xAxis;
112 int d_yAxis;
113 };
114
115 #endif