qwt_thermo.h
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_THERMO_H
11 #define QWT_THERMO_H
12 
13 #include "qwt_global.h"
14 #include "qwt_abstract_scale.h"
15 #include "qwt_interval.h"
16 
17 class QwtScaleDraw;
18 class QwtColorMap;
19 
47 {
48  Q_OBJECT
49 
50  Q_ENUMS( ScalePosition )
51  Q_ENUMS( OriginMode )
52 
53  Q_PROPERTY( Qt::Orientation orientation
54  READ orientation WRITE setOrientation )
55  Q_PROPERTY( ScalePosition scalePosition
56  READ scalePosition WRITE setScalePosition )
57  Q_PROPERTY( OriginMode originMode READ originMode WRITE setOriginMode )
58 
59  Q_PROPERTY( bool alarmEnabled READ alarmEnabled WRITE setAlarmEnabled )
60  Q_PROPERTY( double alarmLevel READ alarmLevel WRITE setAlarmLevel )
61  Q_PROPERTY( double origin READ origin WRITE setOrigin )
62  Q_PROPERTY( int spacing READ spacing WRITE setSpacing )
63  Q_PROPERTY( int borderWidth READ borderWidth WRITE setBorderWidth )
64  Q_PROPERTY( int pipeWidth READ pipeWidth WRITE setPipeWidth )
65  Q_PROPERTY( double value READ value WRITE setValue USER true )
66 
67 public:
68 
74  {
77 
80 
82  TrailingScale
83  };
84 
92  {
95 
98 
100  OriginCustom
101  };
102 
103  explicit QwtThermo( QWidget *parent = NULL );
104  virtual ~QwtThermo();
105 
106  void setOrientation( Qt::Orientation );
107  Qt::Orientation orientation() const;
108 
109  void setScalePosition( ScalePosition );
110  ScalePosition scalePosition() const;
111 
112  void setSpacing( int );
113  int spacing() const;
114 
115  void setBorderWidth( int w );
116  int borderWidth() const;
117 
118  void setOriginMode( OriginMode );
119  OriginMode originMode() const;
120 
121  void setOrigin( double );
122  double origin() const;
123 
124  void setFillBrush( const QBrush &b );
125  QBrush fillBrush() const;
126 
127  void setAlarmBrush( const QBrush &b );
128  QBrush alarmBrush() const;
129 
130  void setAlarmLevel( double v );
131  double alarmLevel() const;
132 
133  void setAlarmEnabled( bool tf );
134  bool alarmEnabled() const;
135 
136  void setColorMap( QwtColorMap * );
137  QwtColorMap *colorMap();
138  const QwtColorMap *colorMap() const;
139 
140  void setPipeWidth( int w );
141  int pipeWidth() const;
142 
143  void setRangeFlags( QwtInterval::BorderFlags );
144  QwtInterval::BorderFlags rangeFlags() const;
145 
146  double value() const;
147 
148  virtual QSize sizeHint() const;
149  virtual QSize minimumSizeHint() const;
150 
151  void setScaleDraw( QwtScaleDraw * );
152  const QwtScaleDraw *scaleDraw() const;
153 
154 public Q_SLOTS:
155  virtual void setValue( double val );
156 
157 protected:
158  virtual void drawLiquid( QPainter *, const QRect & ) const;
159  virtual void scaleChange();
160 
161  virtual void paintEvent( QPaintEvent * );
162  virtual void resizeEvent( QResizeEvent * );
163  virtual void changeEvent( QEvent * );
164 
165  QwtScaleDraw *scaleDraw();
166 
167  QRect pipeRect() const;
168  QRect fillRect( const QRect & ) const;
169  QRect alarmRect( const QRect & ) const;
170 
171 private:
172  void layoutThermo( bool );
173 
174  class PrivateData;
176 };
177 
178 #endif
The scale is right of a vertical or below of a horizontal slider.
Definition: qwt_thermo.h:79
An abstract base class for widgets having a scale.
QFlags< BorderFlag > BorderFlags
Border flags.
Definition: qwt_interval.h:49
virtual void scaleChange()
Notify changed scale.
#define QWT_EXPORT
Definition: qwt_global.h:38
The origin is the minimum of the scale.
Definition: qwt_thermo.h:94
TFSIMD_FORCE_INLINE void setValue(const tfScalar &x, const tfScalar &y, const tfScalar &z)
The origin is the maximum of the scale.
Definition: qwt_thermo.h:97
PrivateData * d_data
Definition: qwt_thermo.h:174
T value
QwtColorMap is used to map values into colors.
Definition: qwt_color_map.h:33
The Thermometer Widget.
Definition: qwt_thermo.h:46
virtual void changeEvent(QEvent *)
A class for drawing scales.
The slider has no scale.
Definition: qwt_thermo.h:76


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18