Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_scale_draw.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_scale_draw.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_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_abstract_scale_draw.h" 15 15 16 #include <qpoint.h> 16 #include <qrect.h> 17 #include <qtransform.h> 17 18 class QTransform; 19 class QSizeF; 20 class QRectF; 21 class QRect; 18 22 19 23 /*! 20 \brief A class for drawing scales 24 \brief A class for drawing scales 21 25 22 QwtScaleDraw can be used to draw linear or logarithmic scales. 23 A scale has a position, an alignment and a length, which can be specified . 24 The labels can be rotated and aligned 25 to the ticks using setLabelRotation() and setLabelAlignment(). 26 QwtScaleDraw can be used to draw linear or logarithmic scales. 27 A scale has a position, an alignment and a length, which can be specified . 28 The labels can be rotated and aligned 29 to the ticks using setLabelRotation() and setLabelAlignment(). 26 30 27 After a scale division has been specified as a QwtScaleDiv object 28 using QwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s), 29 the scale can be drawn with the QwtAbstractScaleDraw::draw() member. 30 */ 31 class QWT_EXPORT QwtScaleDraw: public QwtAbstractScaleDraw 31 After a scale division has been specified as a QwtScaleDiv object 32 using QwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s), 33 the scale can be drawn with the QwtAbstractScaleDraw::draw() member. 34 */ 35 class QWT_EXPORT QwtScaleDraw : public QwtAbstractScaleDraw 32 36 { 33 public: 37 public: 34 38 /*! 35 39 Alignment of the scale draw … … 54 58 virtual ~QwtScaleDraw(); 55 59 56 void getBorderDistHint( const QFont &, int &start, int&end ) const;57 int minLabelDist( const QFont & ) const;60 void getBorderDistHint( const QFont&, int& start, int& end ) const; 61 int minLabelDist( const QFont& ) const; 58 62 59 int minLength( const QFont & ) const;60 virtual double extent( const QFont & ) const;63 int minLength( const QFont& ) const; 64 virtual double extent( const QFont& ) const QWT_OVERRIDE; 61 65 62 66 void move( double x, double y ); 63 void move( const QPointF & );67 void move( const QPointF& ); 64 68 void setLength( double length ); 65 69 … … 78 82 double labelRotation() const; 79 83 80 int maxLabelHeight( const QFont & ) const;81 int maxLabelWidth( const QFont & ) const;84 int maxLabelHeight( const QFont& ) const; 85 int maxLabelWidth( const QFont& ) const; 82 86 83 87 QPointF labelPosition( double value ) const; 84 88 85 QRectF labelRect( const QFont &, double value ) const;86 QSizeF labelSize( const QFont &, double value ) const;89 QRectF labelRect( const QFont&, double value ) const; 90 QSizeF labelSize( const QFont&, double value ) const; 87 91 88 QRect boundingLabelRect( const QFont &, double value ) const;92 QRect boundingLabelRect( const QFont&, double value ) const; 89 93 90 protected: 91 QTransform labelTransformation( const QPointF &, const QSizeF& ) const;94 protected: 95 QTransform labelTransformation( const QPointF&, const QSizeF& ) const; 92 96 93 virtual void drawTick( QPainter *, double value, double len ) const; 94 virtual void drawBackbone( QPainter * ) const; 95 virtual void drawLabel( QPainter *, double value ) const; 97 virtual void drawTick( QPainter*, 98 double value, double len ) const QWT_OVERRIDE; 96 99 97 private: 98 QwtScaleDraw( const QwtScaleDraw & ); 99 QwtScaleDraw &operator=( const QwtScaleDraw &other ); 100 virtual void drawBackbone( QPainter* ) const QWT_OVERRIDE; 101 virtual void drawLabel( QPainter*, double value ) const QWT_OVERRIDE; 100 102 103 private: 101 104 void updateMap(); 102 105 103 106 class PrivateData; 104 PrivateData *d_data;107 PrivateData* m_data; 105 108 }; 106 109 … … 112 115 113 116 \sa move(const QPointF &) 114 */ 117 */ 115 118 inline void QwtScaleDraw::move( double x, double y ) 116 119 {
Note:
See TracChangeset
for help on using the changeset viewer.
