Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_wheel.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_wheel.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_wheel.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 15 15 16 16 /*! 17 \brief The Wheel Widget 17 \brief The Wheel Widget 18 18 19 The wheel widget can be used to change values over a very large range 20 in very small steps. Using the setMass() member, it can be configured 21 as a flying wheel. 19 The wheel widget can be used to change values over a very large range 20 in very small steps. Using the setMass() member, it can be configured 21 as a flying wheel. 22 22 23 The default range of the wheel is [0.0, 100.0] 23 The default range of the wheel is [0.0, 100.0] 24 24 25 \sa The radio example. 26 */ 27 class QWT_EXPORT QwtWheel: public QWidget 25 \sa The radio example. 26 */ 27 class QWT_EXPORT QwtWheel : public QWidget 28 28 { 29 29 Q_OBJECT 30 30 31 31 Q_PROPERTY( Qt::Orientation orientation 32 READ orientation WRITE setOrientation )32 READ orientation WRITE setOrientation ) 33 33 34 Q_PROPERTY( double value READ value WRITE setValue ) 34 Q_PROPERTY( double value READ value WRITE setValue NOTIFY valueChanged USER true ) 35 35 36 Q_PROPERTY( double minimum READ minimum WRITE setMinimum ) 36 37 Q_PROPERTY( double maximum READ maximum WRITE setMaximum ) … … 54 55 Q_PROPERTY( int wheelBorderWidth READ wheelBorderWidth WRITE setWheelBorderWidth ) 55 56 56 public: 57 explicit QwtWheel( QWidget *parent = NULL );57 public: 58 explicit QwtWheel( QWidget* parent = NULL ); 58 59 virtual ~QwtWheel(); 59 60 … … 109 110 double mass() const; 110 111 111 public Q_SLOTS: 112 public Q_SLOTS: 112 113 void setValue( double ); 113 114 void setTotalAngle ( double ); … … 115 116 void setMass( double ); 116 117 117 Q_SIGNALS: 118 Q_SIGNALS: 118 119 119 120 /*! 120 \brief Notify a change of value. 121 \brief Notify a change of value. 121 122 122 When tracking is enabled this signal will be emitted every 123 time the value changes. 123 When tracking is enabled this signal will be emitted every 124 time the value changes. 124 125 125 \param value new value 126 \sa setTracking() 127 */ 126 \param value new value 127 \sa setTracking() 128 */ 128 129 void valueChanged( double value ); 129 130 130 131 /*! 131 This signal is emitted when the user presses the 132 the wheel with the mouse 133 */ 132 This signal is emitted when the user presses the 133 the wheel with the mouse 134 */ 134 135 void wheelPressed(); 135 136 136 137 /*! 137 This signal is emitted when the user releases the mouse 138 */ 138 This signal is emitted when the user releases the mouse 139 */ 139 140 void wheelReleased(); 140 141 141 142 /*! 142 This signal is emitted when the user moves the 143 wheel with the mouse. 143 This signal is emitted when the user moves the 144 wheel with the mouse. 144 145 145 \param value new value 146 */ 146 \param value new value 147 */ 147 148 void wheelMoved( double value ); 148 149 149 protected: 150 virtual void paintEvent( QPaintEvent * );151 virtual void mousePressEvent( QMouseEvent * );152 virtual void mouseReleaseEvent( QMouseEvent * );153 virtual void mouseMoveEvent( QMouseEvent * );154 virtual void keyPressEvent( QKeyEvent * );155 virtual void wheelEvent( QWheelEvent * );156 virtual void timerEvent( QTimerEvent * );150 protected: 151 virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE; 152 virtual void mousePressEvent( QMouseEvent* ) QWT_OVERRIDE; 153 virtual void mouseReleaseEvent( QMouseEvent* ) QWT_OVERRIDE; 154 virtual void mouseMoveEvent( QMouseEvent* ) QWT_OVERRIDE; 155 virtual void keyPressEvent( QKeyEvent* ) QWT_OVERRIDE; 156 virtual void wheelEvent( QWheelEvent* ) QWT_OVERRIDE; 157 virtual void timerEvent( QTimerEvent* ) QWT_OVERRIDE; 157 158 158 159 void stopFlying(); … … 160 161 QRect wheelRect() const; 161 162 162 virtual QSize sizeHint() const; 163 virtual QSize minimumSizeHint() const; 163 virtual QSize sizeHint() const QWT_OVERRIDE; 164 virtual QSize minimumSizeHint() const QWT_OVERRIDE; 164 165 165 virtual void drawTicks( QPainter *, const QRectF& );166 virtual void drawWheelBackground( QPainter *, const QRectF& );166 virtual void drawTicks( QPainter*, const QRectF& ); 167 virtual void drawWheelBackground( QPainter*, const QRectF& ); 167 168 168 virtual double valueAt( const QPoint & ) const;169 virtual double valueAt( const QPoint& ) const; 169 170 170 private: 171 private: 171 172 double alignedValue( double ) const; 172 173 double boundedValue( double ) const; 173 174 174 175 class PrivateData; 175 PrivateData *d_data;176 PrivateData* m_data; 176 177 }; 177 178
Note:
See TracChangeset
for help on using the changeset viewer.
