Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_column_symbol.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_column_symbol.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_column_symbol.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_interval.h" 15 #include <qpen.h> 16 #include <qsize.h> 17 #include <qrect.h> 15 16 #include <qnamespace.h> 18 17 19 18 class QPainter; 20 19 class QPalette; 21 class QRect; 22 class QwtText; 20 class QRectF; 23 21 24 22 /*! 25 23 \brief Directed rectangle representing bounding rectangle and orientation 26 24 of a column. 27 */ 25 */ 28 26 class QWT_EXPORT QwtColumnRect 29 27 { 30 public: 28 public: 31 29 //! Direction of the column 32 30 enum Direction … … 46 44 47 45 //! Build an rectangle with invalid intervals directed BottomToTop. 48 QwtColumnRect() :49 direction( BottomToTop ) 46 QwtColumnRect() 47 : direction( BottomToTop ) 50 48 { 51 49 } 52 50 53 51 //! \return A normalized QRect built from the intervals 54 QRectF toRect() const 55 { 56 QRectF r( hInterval.minValue(), vInterval.minValue(), 57 hInterval.maxValue() - hInterval.minValue(), 58 vInterval.maxValue() - vInterval.minValue() ); 59 r = r.normalized(); 60 61 if ( hInterval.borderFlags() & QwtInterval::ExcludeMinimum ) 62 r.adjust( 1, 0, 0, 0 ); 63 if ( hInterval.borderFlags() & QwtInterval::ExcludeMaximum ) 64 r.adjust( 0, 0, -1, 0 ); 65 if ( vInterval.borderFlags() & QwtInterval::ExcludeMinimum ) 66 r.adjust( 0, 1, 0, 0 ); 67 if ( vInterval.borderFlags() & QwtInterval::ExcludeMaximum ) 68 r.adjust( 0, 0, 0, -1 ); 69 70 return r; 71 } 52 QRectF toRect() const; 72 53 73 54 //! \return Orientation … … 93 74 class QWT_EXPORT QwtColumnSymbol 94 75 { 95 public: 76 public: 96 77 /*! 97 Style 98 \sa setStyle(), style() 99 */ 78 Style 79 \sa setStyle(), style() 80 */ 100 81 enum Style 101 82 { … … 104 85 105 86 /*! 106 The column is painted with a frame depending on the frameStyle() 107 and lineWidth() using the palette(). 87 The column is painted with a frame depending on the frameStyle() 88 and lineWidth() using the palette(). 108 89 */ 109 90 Box, 110 91 111 92 /*! 112 Styles >= QwtColumnSymbol::UserStyle are reserved for derived 113 classes of QwtColumnSymbol that overload draw() with 114 additional application specific symbol types. 93 Styles >= QwtColumnSymbol::UserStyle are reserved for derived 94 classes of QwtColumnSymbol that overload draw() with 95 additional application specific symbol types. 115 96 */ 116 97 UserStyle = 1000 … … 118 99 119 100 /*! 120 Frame Style used in Box style(). 121 \sa Style, setFrameStyle(), frameStyle(), setStyle(), setPalette() 101 Frame Style used in Box style(). 102 \sa Style, setFrameStyle(), frameStyle(), setStyle(), setPalette() 122 103 */ 123 104 enum FrameStyle … … 133 114 }; 134 115 135 public: 136 QwtColumnSymbol( Style = NoStyle ); 116 public: 117 explicit QwtColumnSymbol( Style = NoStyle ); 137 118 virtual ~QwtColumnSymbol(); 138 119 … … 143 124 int lineWidth() const; 144 125 145 void setPalette( const QPalette & );146 const QPalette &palette() const;126 void setPalette( const QPalette& ); 127 const QPalette& palette() const; 147 128 148 129 void setStyle( Style ); 149 130 Style style() const; 150 131 151 virtual void draw( QPainter *, const QwtColumnRect& ) const;132 virtual void draw( QPainter*, const QwtColumnRect& ) const; 152 133 153 protected: 154 void drawBox( QPainter *, const QwtColumnRect& ) const;134 protected: 135 void drawBox( QPainter*, const QwtColumnRect& ) const; 155 136 156 private: 137 private: 138 Q_DISABLE_COPY(QwtColumnSymbol) 139 157 140 class PrivateData; 158 PrivateData* d_data;141 PrivateData* m_data; 159 142 }; 160 143
Note:
See TracChangeset
for help on using the changeset viewer.
