Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_knob.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_knob.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_knob.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 17 17 18 18 /*! 19 \brief The Knob Widget 19 \brief The Knob Widget 20 20 21 The QwtKnob widget imitates look and behavior of a volume knob on a radio. 22 It looks similar to QDial - not to QwtDial. 21 The QwtKnob widget imitates look and behavior of a volume knob on a radio. 22 It looks similar to QDial - not to QwtDial. 23 23 24 The value range of a knob might be divided into several turns. 24 The value range of a knob might be divided into several turns. 25 25 26 The layout of the knob depends on the knobWidth(). 26 The layout of the knob depends on the knobWidth(). 27 27 28 - width > 0 28 - width > 0 29 29 The diameter of the knob is fixed and the knob is aligned 30 30 according to the alignment() flags inside of the contentsRect(). 31 31 32 - width <= 0 32 - width <= 0 33 33 The knob is extended to the minimum of width/height of the contentsRect() 34 34 and aligned in the other direction according to alignment(). 35 35 36 Setting a fixed knobWidth() is helpful to align several knobs with different 37 scale labels. 36 Setting a fixed knobWidth() is helpful to align several knobs with different 37 scale labels. 38 38 39 \image html knob.png 40 */ 39 \image html knob.png 40 */ 41 41 42 class QWT_EXPORT QwtKnob: public QwtAbstractSlider 42 class QWT_EXPORT QwtKnob : public QwtAbstractSlider 43 43 { 44 44 Q_OBJECT … … 55 55 Q_PROPERTY( int borderWidth READ borderWidth WRITE setBorderWidth ) 56 56 57 public: 57 public: 58 58 /*! 59 59 \brief Style of the knob surface … … 73 73 74 74 /*! 75 Build a gradient from QPalette::Midlight, QPalette::Button 76 and QPalette::Midlight 75 Build a gradient from QPalette::Midlight, QPalette::Button 76 and QPalette::Midlight 77 77 */ 78 78 Sunken, 79 79 80 80 /*! 81 Build a radial gradient from QPalette::Button 82 like it is used for QDial in various Qt styles. 81 Build a radial gradient from QPalette::Button 82 like it is used for QDial in various Qt styles. 83 83 */ 84 84 Styled … … 92 92 93 93 \sa setMarkerStyle(), setMarkerSize() 94 */ 94 */ 95 95 enum MarkerStyle 96 96 { … … 108 108 109 109 /*! 110 Draw a raised ellipse with a gradient build from 111 QPalette::Light and QPalette::Mid 110 Draw a raised ellipse with a gradient build from 111 QPalette::Light and QPalette::Mid 112 112 */ 113 113 Nub, 114 114 115 115 /*! 116 Draw a sunken ellipse with a gradient build from 117 QPalette::Light and QPalette::Mid 116 Draw a sunken ellipse with a gradient build from 117 QPalette::Light and QPalette::Mid 118 118 */ 119 119 Notch … … 147 147 int markerSize() const; 148 148 149 virtual QSize sizeHint() const; 150 virtual QSize minimumSizeHint() const; 149 virtual QSize sizeHint() const QWT_OVERRIDE; 150 virtual QSize minimumSizeHint() const QWT_OVERRIDE; 151 151 152 void setScaleDraw( QwtRoundScaleDraw * );152 void setScaleDraw( QwtRoundScaleDraw* ); 153 153 154 const QwtRoundScaleDraw *scaleDraw() const;155 QwtRoundScaleDraw *scaleDraw();154 const QwtRoundScaleDraw* scaleDraw() const; 155 QwtRoundScaleDraw* scaleDraw(); 156 156 157 157 QRect knobRect() const; 158 158 159 protected: 160 virtual void paintEvent( QPaintEvent * );161 virtual void changeEvent( QEvent * );159 protected: 160 virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE; 161 virtual void changeEvent( QEvent* ) QWT_OVERRIDE; 162 162 163 virtual void drawKnob( QPainter *, const QRectF& ) const;163 virtual void drawKnob( QPainter*, const QRectF& ) const; 164 164 165 virtual void drawFocusIndicator( QPainter * ) const;165 virtual void drawFocusIndicator( QPainter* ) const; 166 166 167 virtual void drawMarker( QPainter *,168 const QRectF &, double angle ) const;167 virtual void drawMarker( QPainter*, 168 const QRectF&, double angle ) const; 169 169 170 virtual double scrolledTo( const QPoint & ) const;171 virtual bool isScrollPosition( const QPoint & ) const;170 virtual double scrolledTo( const QPoint& ) const QWT_OVERRIDE; 171 virtual bool isScrollPosition( const QPoint& ) const QWT_OVERRIDE; 172 172 173 private: 173 private: 174 174 class PrivateData; 175 PrivateData *d_data;175 PrivateData* m_data; 176 176 }; 177 177
Note:
See TracChangeset
for help on using the changeset viewer.
