Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_abstract_scale_draw.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_abstract_scale_draw.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_abstract_scale_draw.h
r9383 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_scale_div.h" 15 #include "qwt_text.h"16 15 16 class QwtText; 17 17 class QPalette; 18 18 class QPainter; … … 22 22 23 23 /*! 24 \brief A abstract base class for drawing scales 24 \brief A abstract base class for drawing scales 25 25 26 QwtAbstractScaleDraw can be used to draw linear or logarithmic scales. 26 QwtAbstractScaleDraw can be used to draw linear or logarithmic scales. 27 27 28 After a scale division has been specified as a QwtScaleDiv object 29 using setScaleDiv(), the scale can be drawn with the draw() member. 30 */ 28 After a scale division has been specified as a QwtScaleDiv object 29 using setScaleDiv(), the scale can be drawn with the draw() member. 30 */ 31 31 class QWT_EXPORT QwtAbstractScaleDraw 32 32 { 33 public: 33 public: 34 34 35 35 /*! 36 36 Components of a scale 37 37 \sa enableComponent(), hasComponent 38 */ 38 */ 39 39 enum ScaleComponent 40 40 { … … 49 49 }; 50 50 51 //! Scale components 52 typedef QFlags<ScaleComponent> ScaleComponents; 51 Q_DECLARE_FLAGS( ScaleComponents, ScaleComponent ) 53 52 54 53 QwtAbstractScaleDraw(); 55 54 virtual ~QwtAbstractScaleDraw(); 56 55 57 void setScaleDiv( const QwtScaleDiv & );56 void setScaleDiv( const QwtScaleDiv& ); 58 57 const QwtScaleDiv& scaleDiv() const; 59 58 60 void setTransformation( QwtTransform * );61 const QwtScaleMap &scaleMap() const;62 QwtScaleMap &scaleMap();59 void setTransformation( QwtTransform* ); 60 const QwtScaleMap& scaleMap() const; 61 QwtScaleMap& scaleMap(); 63 62 64 63 void enableComponent( ScaleComponent, bool enable = true ); … … 72 71 double spacing() const; 73 72 74 void setPenWidth ( intwidth );75 intpenWidth() const;73 void setPenWidthF( qreal width ); 74 qreal penWidthF() const; 76 75 77 virtual void draw( QPainter *, const QPalette& ) const;76 virtual void draw( QPainter*, const QPalette& ) const; 78 77 79 78 virtual QwtText label( double ) const; 80 79 81 80 /*! 82 Calculate the extent 81 Calculate the extent 83 82 84 The extent is the distance from the baseline to the outermost 85 pixel of the scale draw in opposite to its orientation. 86 It is at least minimumExtent() pixels. 83 The extent is the distance from the baseline to the outermost 84 pixel of the scale draw in opposite to its orientation. 85 It is at least minimumExtent() pixels. 87 86 88 \param font Font used for drawing the tick labels 89 \return Number of pixels 87 \param font Font used for drawing the tick labels 88 \return Number of pixels 90 89 91 \sa setMinimumExtent(), minimumExtent() 92 */ 93 virtual double extent( const QFont &font ) const = 0;90 \sa setMinimumExtent(), minimumExtent() 91 */ 92 virtual double extent( const QFont& font ) const = 0; 94 93 95 94 void setMinimumExtent( double ); 96 95 double minimumExtent() const; 97 96 98 protected: 97 void invalidateCache(); 98 99 protected: 99 100 /*! 100 101 Draw a tick … … 105 106 106 107 \sa drawBackbone(), drawLabel() 107 */ 108 virtual void drawTick( QPainter *painter, double value, double len ) const = 0;108 */ 109 virtual void drawTick( QPainter* painter, double value, double len ) const = 0; 109 110 110 111 /*! 111 Draws the baseline of the scale 112 \param painter Painter 112 Draws the baseline of the scale 113 \param painter Painter 113 114 114 \sa drawTick(), drawLabel() 115 */ 116 virtual void drawBackbone( QPainter *painter ) const = 0;115 \sa drawTick(), drawLabel() 116 */ 117 virtual void drawBackbone( QPainter* painter ) const = 0; 117 118 118 119 /*! … … 123 124 124 125 \sa drawTick(), drawBackbone() 125 */ 126 virtual void drawLabel( QPainter *painter, double value ) const = 0;126 */ 127 virtual void drawLabel( QPainter* painter, double value ) const = 0; 127 128 128 void invalidateCache(); 129 const QwtText &tickLabel( const QFont &, double value ) const; 129 const QwtText& tickLabel( const QFont&, double value ) const; 130 130 131 private: 132 QwtAbstractScaleDraw( const QwtAbstractScaleDraw & ); 133 QwtAbstractScaleDraw &operator=( const QwtAbstractScaleDraw & ); 131 private: 132 Q_DISABLE_COPY(QwtAbstractScaleDraw) 134 133 135 134 class PrivateData; 136 PrivateData *d_data;135 PrivateData* m_data; 137 136 }; 138 137
Note:
See TracChangeset
for help on using the changeset viewer.
