Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_thermo.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_thermo.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_thermo.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 19 19 20 20 /*! 21 \brief The Thermometer Widget 21 \brief The Thermometer Widget 22 22 23 QwtThermo is a widget which displays a value in an interval. It supports: 24 - a horizontal or vertical layout; 25 - a range; 26 - a scale; 27 - an alarm level. 23 QwtThermo is a widget which displays a value in an interval. It supports: 24 - a horizontal or vertical layout; 25 - a range; 26 - a scale; 27 - an alarm level. 28 28 29 \image html sysinfo.png 29 \image html sysinfo.png 30 30 31 The fill colors might be calculated from an optional color map 32 If no color map has been assigned QwtThermo uses the 33 following colors/brushes from the widget palette: 31 The fill colors might be calculated from an optional color map 32 If no color map has been assigned QwtThermo uses the 33 following colors/brushes from the widget palette: 34 34 35 - QPalette::Base 35 - QPalette::Base 36 36 Background of the pipe 37 - QPalette::ButtonText 37 - QPalette::ButtonText 38 38 Fill brush below the alarm level 39 - QPalette::Highlight 39 - QPalette::Highlight 40 40 Fill brush for the values above the alarm level 41 - QPalette::WindowText 41 - QPalette::WindowText 42 42 For the axis of the scale 43 - QPalette::Text 43 - QPalette::Text 44 44 For the labels of the scale 45 */ 46 class QWT_EXPORT QwtThermo: public QwtAbstractScale 45 */ 46 class QWT_EXPORT QwtThermo : public QwtAbstractScale 47 47 { 48 48 Q_OBJECT … … 63 63 Q_PROPERTY( int borderWidth READ borderWidth WRITE setBorderWidth ) 64 64 Q_PROPERTY( int pipeWidth READ pipeWidth WRITE setPipeWidth ) 65 Q_PROPERTY( double value READ value WRITE setValue ) 65 Q_PROPERTY( double value READ value WRITE setValue USER true ) 66 66 67 public: 67 public: 68 68 69 69 /*! 70 Position of the scale 71 \sa setScalePosition(), setOrientation() 70 Position of the scale 71 \sa setScalePosition(), setOrientation() 72 72 */ 73 73 enum ScalePosition … … 84 84 85 85 /*! 86 Origin mode. This property specifies where the beginning of the liquid 87 is placed. 86 Origin mode. This property specifies where the beginning of the liquid 87 is placed. 88 88 89 \sa setOriginMode(), setOrigin() 90 */ 89 \sa setOriginMode(), setOrigin() 90 */ 91 91 enum OriginMode 92 92 { … … 101 101 }; 102 102 103 explicit QwtThermo( QWidget *parent = NULL );103 explicit QwtThermo( QWidget* parent = NULL ); 104 104 virtual ~QwtThermo(); 105 105 … … 122 122 double origin() const; 123 123 124 void setFillBrush( const QBrush & );124 void setFillBrush( const QBrush& ); 125 125 QBrush fillBrush() const; 126 126 127 void setAlarmBrush( const QBrush & );127 void setAlarmBrush( const QBrush& ); 128 128 QBrush alarmBrush() const; 129 129 … … 134 134 bool alarmEnabled() const; 135 135 136 void setColorMap( QwtColorMap * );137 QwtColorMap *colorMap();138 const QwtColorMap *colorMap() const;136 void setColorMap( QwtColorMap* ); 137 QwtColorMap* colorMap(); 138 const QwtColorMap* colorMap() const; 139 139 140 140 void setPipeWidth( int ); … … 146 146 double value() const; 147 147 148 virtual QSize sizeHint() const; 149 virtual QSize minimumSizeHint() const; 148 virtual QSize sizeHint() const QWT_OVERRIDE; 149 virtual QSize minimumSizeHint() const QWT_OVERRIDE; 150 150 151 void setScaleDraw( QwtScaleDraw * );152 const QwtScaleDraw *scaleDraw() const;151 void setScaleDraw( QwtScaleDraw* ); 152 const QwtScaleDraw* scaleDraw() const; 153 153 154 public Q_SLOTS: 154 public Q_SLOTS: 155 155 virtual void setValue( double ); 156 156 157 protected: 158 virtual void drawLiquid( QPainter *, const QRect& ) const;159 virtual void scaleChange(); 157 protected: 158 virtual void drawLiquid( QPainter*, const QRect& ) const; 159 virtual void scaleChange() QWT_OVERRIDE; 160 160 161 virtual void paintEvent( QPaintEvent * );162 virtual void resizeEvent( QResizeEvent * );163 virtual void changeEvent( QEvent * );161 virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE; 162 virtual void resizeEvent( QResizeEvent* ) QWT_OVERRIDE; 163 virtual void changeEvent( QEvent* ) QWT_OVERRIDE; 164 164 165 QwtScaleDraw *scaleDraw();165 QwtScaleDraw* scaleDraw(); 166 166 167 167 QRect pipeRect() const; 168 QRect fillRect( const QRect & ) const;169 QRect alarmRect( const QRect & ) const;168 QRect fillRect( const QRect& ) const; 169 QRect alarmRect( const QRect& ) const; 170 170 171 private: 171 private: 172 172 void layoutThermo( bool ); 173 173 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.
