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 #include <qvector.h>
16 
17 class QwtPlot;
18 
28 {
29  Q_OBJECT
30 
31 public:
32  explicit QwtPlotPicker( QWidget *canvas );
33  virtual ~QwtPlotPicker();
34 
35  explicit QwtPlotPicker( int xAxis, int yAxis, QWidget * );
36 
37  explicit QwtPlotPicker( int xAxis, int yAxis,
38  RubberBand rubberBand, DisplayMode trackerMode, QWidget * );
39 
40  virtual void setAxis( int xAxis, int yAxis );
41 
42  int xAxis() const;
43  int yAxis() const;
44 
45  QwtPlot *plot();
46  const QwtPlot *plot() const;
47 
48  QWidget *canvas();
49  const QWidget *canvas() const;
50 
51 Q_SIGNALS:
52 
57  void selected( const QPointF &pos );
58 
63  void selected( const QRectF &rect );
64 
71  void selected( const QVector<QPointF> &pa );
72 
79  void appended( const QPointF &pos );
80 
88  void moved( const QPointF &pos );
89 
90 protected:
91  QRectF scaleRect() const;
92 
93  QRectF invTransform( const QRect & ) const;
94  QRect transform( const QRectF & ) const;
95 
96  QPointF invTransform( const QPoint & ) const;
97  QPoint transform( const QPointF & ) const;
98 
99  virtual QwtText trackerText( const QPoint & ) const;
100  virtual QwtText trackerTextF( const QPointF & ) const;
101 
102  virtual void move( const QPoint & );
103  virtual void append( const QPoint & );
104  virtual bool end( bool ok = true );
105 
106 private:
107  int d_xAxis;
108  int d_yAxis;
109 };
110 
111 #endif
virtual bool end(bool ok=true)
Close a selection setting the state to inactive.
DisplayMode
Display mode.
Definition: qwt_picker.h:153
#define QWT_EXPORT
Definition: qwt_global.h:38
A 2-D plotting widget.
Definition: qwt_plot.h:74
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:95
virtual void append(const QPoint &)


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17