qwt_plot_picker.h
Go to the documentation of this file.
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_picker.h"
15 
16 class QwtPlot;
17 class QPointF;
18 class QRectF;
19 template <typename T> class QVector;
20 
30 {
31  Q_OBJECT
32 
33 public:
34  explicit QwtPlotPicker( QWidget *canvas );
35  virtual ~QwtPlotPicker();
36 
37  explicit QwtPlotPicker( int xAxis, int yAxis, QWidget * );
38 
39  explicit QwtPlotPicker( int xAxis, int yAxis,
40  RubberBand rubberBand, DisplayMode trackerMode, QWidget * );
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  QWidget *canvas();
51  const QWidget *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 QWT_OVERRIDE;
102  virtual QwtText trackerTextF( const QPointF & ) const;
103 
104  virtual void move( const QPoint & ) QWT_OVERRIDE;
105  virtual void append( const QPoint & ) QWT_OVERRIDE;
106  virtual bool end( bool ok = true ) QWT_OVERRIDE;
107 
108 private:
109  int d_xAxis;
110  int d_yAxis;
111 };
112 
113 #endif
virtual bool end(bool ok=true)
Close a selection setting the state to inactive.
DisplayMode
Display mode.
Definition: qwt_picker.h:162
#define QWT_EXPORT
Definition: qwt_global.h:38
A 2-D plotting widget.
Definition: qwt_plot.h:75
void selected(const QPolygon &polygon)
void moved(const QPoint &pos)
A class representing a text.
Definition: qwt_text.h:51
virtual void move(const QPoint &)
QwtPlotPicker provides selections on a plot canvas.
void appended(const QPoint &pos)
virtual QwtText trackerText(const QPoint &pos) const
Return the label for a position.
Definition: qwt_picker.cpp:502
QwtPicker provides selections on a widget.
Definition: qwt_picker.h:104
#define QWT_OVERRIDE
Definition: qwt_global.h:53
virtual void append(const QPoint &)


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10