Qwt User's Guide 6.0.2

- 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 #ifndef QWT_PLOT_PICKER_H
11 #define QWT_PLOT_PICKER_H
12
13 #include "qwt_global.h"
14 #include "qwt_plot_canvas.h"
15 #include "qwt_picker.h"
16 #include <qvector.h>
17
18 class QwtPlot;
19
28 class QWT_EXPORT QwtPlotPicker: public QwtPicker
29 {
30 Q_OBJECT
31
32 public:
33 explicit QwtPlotPicker( QwtPlotCanvas * );
34 virtual ~QwtPlotPicker();
35
36 explicit QwtPlotPicker( int xAxis, int yAxis, QwtPlotCanvas * );
37
38 explicit QwtPlotPicker( int xAxis, int yAxis,
39 RubberBand rubberBand, DisplayMode trackerMode,
40 QwtPlotCanvas * );
41
42 virtual void setAxis( int xAxis, int yAxis );
43
44 int xAxis() const;
45 int yAxis() const;
46
47 QwtPlot *plot();
48 const QwtPlot *plot() const;
49
50 QwtPlotCanvas *canvas();
51 const QwtPlotCanvas *canvas() const;
52
53 Q_SIGNALS:
54
59 void selected( const QPointF &pos );
60
65 void selected( const QRectF &rect );
66
73 void selected( const QVector<QPointF> &pa );
74
81 void appended( const QPointF &pos );
82
90 void moved( const QPointF &pos );
91
92 protected:
93 QRectF scaleRect() const;
94
95 QRectF invTransform( const QRect & ) const;
96 QRect transform( const QRectF & ) const;
97
98 QPointF invTransform( const QPoint & ) const;
99 QPoint transform( const QPointF & ) const;
100
101 virtual QwtText trackerText( const QPoint & ) const;
102 virtual QwtText trackerTextF( const QPointF & ) const;
103
104 virtual void move( const QPoint & );
105 virtual void append( const QPoint & );
106 virtual bool end( bool ok = true );
107
108 private:
109 int d_xAxis;
110 int d_yAxis;
111 };
112
113 #endif