Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_picker.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_picker.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_picker.h
r8127 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 13 13 #include "qwt_global.h" 14 14 #include "qwt_picker.h" 15 #include <qvector.h>15 #include "qwt_axis_id.h" 16 16 17 17 class QwtPlot; 18 class QPointF; 19 class QRectF; 20 21 #if QT_VERSION < 0x060000 22 template< typename T > class QVector; 23 #endif 18 24 19 25 /*! 20 \brief QwtPlotPicker provides selections on a plot canvas 26 \brief QwtPlotPicker provides selections on a plot canvas 21 27 22 QwtPlotPicker is a QwtPicker tailored for selections on 23 a plot canvas. It is set to a x-Axis and y-Axis and 24 translates all pixel coordinates into this coordinate system. 25 */ 28 QwtPlotPicker is a QwtPicker tailored for selections on 29 a plot canvas. It is set to a x-Axis and y-Axis and 30 translates all pixel coordinates into this coordinate system. 31 */ 26 32 27 class QWT_EXPORT QwtPlotPicker: public QwtPicker 33 class QWT_EXPORT QwtPlotPicker : public QwtPicker 28 34 { 29 35 Q_OBJECT 30 36 31 public: 32 explicit QwtPlotPicker( QWidget *canvas );37 public: 38 explicit QwtPlotPicker( QWidget* canvas ); 33 39 virtual ~QwtPlotPicker(); 34 40 35 explicit QwtPlotPicker( int xAxis, int yAxis, QWidget* );41 explicit QwtPlotPicker( QwtAxisId xAxisId, QwtAxisId yAxisId, QWidget* ); 36 42 37 explicit QwtPlotPicker( int xAxis, int yAxis,38 RubberBand rubberBand, DisplayMode trackerMode, QWidget * );43 explicit QwtPlotPicker( QwtAxisId xAxisId, QwtAxisId yAxisId, 44 RubberBand rubberBand, DisplayMode trackerMode, QWidget* ); 39 45 40 virtual void setAx is( int xAxis, int yAxis);46 virtual void setAxes( QwtAxisId xAxisId, QwtAxisId yAxisId ); 41 47 42 intxAxis() const;43 intyAxis() const;48 QwtAxisId xAxis() const; 49 QwtAxisId yAxis() const; 44 50 45 QwtPlot *plot();46 const QwtPlot *plot() const;51 QwtPlot* plot(); 52 const QwtPlot* plot() const; 47 53 48 QWidget *canvas();49 const QWidget *canvas() const;54 QWidget* canvas(); 55 const QWidget* canvas() const; 50 56 51 Q_SIGNALS: 57 Q_SIGNALS: 52 58 53 59 /*! 54 A signal emitted in case of QwtPickerMachine::PointSelection. 55 \param pos Selected point 56 */ 57 void selected( const QPointF &pos );60 A signal emitted in case of QwtPickerMachine::PointSelection. 61 \param pos Selected point 62 */ 63 void selected( const QPointF& pos ); 58 64 59 65 /*! 60 A signal emitted in case of QwtPickerMachine::RectSelection. 61 \param rect Selected rectangle 62 */ 63 void selected( const QRectF &rect );66 A signal emitted in case of QwtPickerMachine::RectSelection. 67 \param rect Selected rectangle 68 */ 69 void selected( const QRectF& rect ); 64 70 65 71 /*! 66 A signal emitting the selected points, 67 at the end of a selection. 72 A signal emitting the selected points, 73 at the end of a selection. 68 74 69 \param pa Selected points 70 */ 71 void selected( const QVector<QPointF > &pa );75 \param pa Selected points 76 */ 77 void selected( const QVector< QPointF >& pa ); 72 78 73 79 /*! 74 A signal emitted when a point has been appended to the selection 80 A signal emitted when a point has been appended to the selection 75 81 76 \param pos Position of the appended point. 77 \sa append(). moved() 78 */ 79 void appended( const QPointF &pos );82 \param pos Position of the appended point. 83 \sa append(). moved() 84 */ 85 void appended( const QPointF& pos ); 80 86 81 87 /*! 82 A signal emitted whenever the last appended point of the 83 selection has been moved. 88 A signal emitted whenever the last appended point of the 89 selection has been moved. 84 90 85 \param pos Position of the moved last point of the selection. 86 \sa move(), appended() 87 */ 88 void moved( const QPointF &pos );91 \param pos Position of the moved last point of the selection. 92 \sa move(), appended() 93 */ 94 void moved( const QPointF& pos ); 89 95 90 protected: 96 protected: 91 97 QRectF scaleRect() const; 92 98 93 QRectF invTransform( const QRect & ) const;94 QRect transform( const QRectF & ) const;99 QRectF invTransform( const QRect& ) const; 100 QRect transform( const QRectF& ) const; 95 101 96 QPointF invTransform( const QPoint & ) const;97 QPoint transform( const QPointF & ) const;102 QPointF invTransform( const QPoint& ) const; 103 QPoint transform( const QPointF& ) const; 98 104 99 virtual QwtText trackerText( const QPoint & ) const;100 virtual QwtText trackerTextF( const QPointF & ) const;105 virtual QwtText trackerText( const QPoint& ) const QWT_OVERRIDE; 106 virtual QwtText trackerTextF( const QPointF& ) const; 101 107 102 virtual void move( const QPoint & );103 virtual void append( const QPoint & );104 virtual bool end( bool ok = true ); 108 virtual void move( const QPoint& ) QWT_OVERRIDE; 109 virtual void append( const QPoint& ) QWT_OVERRIDE; 110 virtual bool end( bool ok = true ) QWT_OVERRIDE; 105 111 106 private: 107 int d_xAxis;108 int d_yAxis;112 private: 113 class PrivateData; 114 PrivateData* m_data; 109 115 }; 110 116
Note:
See TracChangeset
for help on using the changeset viewer.
