Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_abstract_slider.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_abstract_slider.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_abstract_slider.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 An abstract base class for slider widgets with a scale 17 \brief An abstract base class for slider widgets with a scale 18 18 19 A slider widget displays a value according to a scale. 20 The class is designed as a common super class for widgets like 21 QwtKnob, QwtDial and QwtSlider. 19 A slider widget displays a value according to a scale. 20 The class is designed as a common super class for widgets like 21 QwtKnob, QwtDial and QwtSlider. 22 22 23 When the slider is nor readOnly() its value can be modified 24 by keyboard, mouse and wheel inputs. 23 When the slider is nor readOnly() its value can be modified 24 by keyboard, mouse and wheel inputs. 25 25 26 The range of the slider is divided into a number of steps from 27 which the value increments according to user inputs depend. 28 Only for linear scales the number of steps correspond with 29 a fixed step size. 30 */ 26 The range of the slider is divided into a number of steps from 27 which the value increments according to user inputs depend. 28 Only for linear scales the number of steps correspond with 29 a fixed step size. 30 */ 31 31 32 class QWT_EXPORT QwtAbstractSlider: public QwtAbstractScale 32 class QWT_EXPORT QwtAbstractSlider : public QwtAbstractScale 33 33 { 34 34 Q_OBJECT 35 35 36 Q_PROPERTY( double value READ value WRITE setValue ) 36 Q_PROPERTY( double value READ value WRITE setValue NOTIFY valueChanged USER true ) 37 37 38 38 Q_PROPERTY( uint totalSteps READ totalSteps WRITE setTotalSteps ) … … 47 47 Q_PROPERTY( bool invertedControls READ invertedControls WRITE setInvertedControls ) 48 48 49 public: 50 explicit QwtAbstractSlider( QWidget *parent = NULL );49 public: 50 explicit QwtAbstractSlider( QWidget* parent = NULL ); 51 51 virtual ~QwtAbstractSlider(); 52 52 … … 80 80 bool invertedControls() const; 81 81 82 public Q_SLOTS: 82 public Q_SLOTS: 83 83 void setValue( double value ); 84 84 85 Q_SIGNALS: 85 Q_SIGNALS: 86 86 87 87 /*! 88 \brief Notify a change of value. 88 \brief Notify a change of value. 89 89 90 When tracking is enabled (default setting), 91 this signal will be emitted every time the value changes. 90 When tracking is enabled (default setting), 91 this signal will be emitted every time the value changes. 92 92 93 \param value New value 93 \param value New value 94 94 95 \sa setTracking(), sliderMoved() 96 */ 95 \sa setTracking(), sliderMoved() 96 */ 97 97 void valueChanged( double value ); 98 98 99 99 /*! 100 This signal is emitted when the user presses the 101 movable part of the slider. 102 */ 100 This signal is emitted when the user presses the 101 movable part of the slider. 102 */ 103 103 void sliderPressed(); 104 104 105 105 /*! 106 This signal is emitted when the user releases the 107 movable part of the slider. 108 */ 106 This signal is emitted when the user releases the 107 movable part of the slider. 108 */ 109 109 void sliderReleased(); 110 110 111 111 /*! 112 This signal is emitted when the user moves the 113 slider with the mouse. 112 This signal is emitted when the user moves the 113 slider with the mouse. 114 114 115 \param value New value 115 \param value New value 116 116 117 \sa valueChanged() 118 */ 117 \sa valueChanged() 118 */ 119 119 void sliderMoved( double value ); 120 120 121 protected: 122 virtual void mousePressEvent( QMouseEvent * );123 virtual void mouseReleaseEvent( QMouseEvent * );124 virtual void mouseMoveEvent( QMouseEvent * );125 virtual void keyPressEvent( QKeyEvent * );126 virtual void wheelEvent( QWheelEvent * );121 protected: 122 virtual void mousePressEvent( QMouseEvent* ) QWT_OVERRIDE; 123 virtual void mouseReleaseEvent( QMouseEvent* ) QWT_OVERRIDE; 124 virtual void mouseMoveEvent( QMouseEvent* ) QWT_OVERRIDE; 125 virtual void keyPressEvent( QKeyEvent* ) QWT_OVERRIDE; 126 virtual void wheelEvent( QWheelEvent* ) QWT_OVERRIDE; 127 127 128 128 /*! 129 \brief Determine what to do when the user presses a mouse button. 129 \brief Determine what to do when the user presses a mouse button. 130 130 131 \param pos Mouse position 131 \param pos Mouse position 132 132 133 \retval True, when pos is a valid scroll position 134 \sa scrolledTo() 135 */ 136 virtual bool isScrollPosition( const QPoint &pos ) const = 0;133 \retval True, when pos is a valid scroll position 134 \sa scrolledTo() 135 */ 136 virtual bool isScrollPosition( const QPoint& pos ) const = 0; 137 137 138 138 /*! 139 \brief Determine the value for a new position of the 139 \brief Determine the value for a new position of the 140 140 movable part of the slider 141 141 142 \param pos Mouse position 142 \param pos Mouse position 143 143 144 \return Value for the mouse position 145 \sa isScrollPosition() 146 */ 147 virtual double scrolledTo( const QPoint &pos ) const = 0;144 \return Value for the mouse position 145 \sa isScrollPosition() 146 */ 147 virtual double scrolledTo( const QPoint& pos ) const = 0; 148 148 149 149 void incrementValue( int stepCount ); 150 150 151 virtual void scaleChange(); 151 virtual void scaleChange() QWT_OVERRIDE; 152 152 153 protected: 153 protected: 154 154 virtual void sliderChange(); 155 155 … … 157 157 double value, int stepCount ) const; 158 158 159 private: 159 private: 160 160 double alignedValue( double ) const; 161 161 double boundedValue( double ) const; 162 162 163 163 class PrivateData; 164 PrivateData *d_data;164 PrivateData* m_data; 165 165 }; 166 166
Note:
See TracChangeset
for help on using the changeset viewer.
