⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qwt_thermo.h

📁 软件无线电的平台
💻 H
字号:
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** * Qwt Widget Library * Copyright (C) 1997   Josef Wilgen * Copyright (C) 2002   Uwe Rathmann * * This library is free software; you can redistribute it and/or * modify it under the terms of the Qwt License, Version 1.0 *****************************************************************************/#ifndef QWT_THERMO_H#define QWT_THERMO_H#include <qwidget.h>#include <qcolor.h>#include <qfont.h>#include <qrect.h>#include "qwt_global.h"#include "qwt_dimap.h"#include "qwt_scldraw.h"#include "qwt_sclif.h"//! The Thermometer Widgetclass QWT_EXPORT QwtThermo: public QWidget, public QwtScaleIf{    Q_OBJECTpublic:    /*!         Position of the scale        \sa QwtThermo;;QwtThermo     */    enum ScalePos {None, Left, Right, Top, Bottom};    QwtThermo(QWidget *parent = 0, const char *name = 0);    virtual ~QwtThermo();    void setOrientation(Qt::Orientation o, ScalePos s);    void setBorderWidth(int w);    void setFillColor(const QColor &c);    void setAlarmColor(const QColor &c);    void setAlarmLevel(double v);    void setAlarmEnabled (int tf);    void setPipeWidth(int w);    void setRange(double vmin, double vmax);    void setMargin(int m);    //! Return max value    double maxValue() { return d_maxValue; }    //! Return min value    double minValue() { return d_minValue; }    //! Return value    double value() { return d_value; }    virtual QSize sizeHint() const;    virtual QSize minimumSizeHint() const;    virtual QSizePolicy sizePolicy() const;public slots:    void setValue(double val);    protected:    void draw(QPainter *p, const QRect& update_rect);    void drawThermo(QPainter *p);    void layoutThermo( bool update = TRUE );    virtual void scaleChange();    virtual void fontChange(const QFont &oldFont);    virtual void paintEvent(QPaintEvent *e);    virtual void resizeEvent(QResizeEvent *e);private:    void init();        QwtDiMap d_map;    QRect d_thermoRect;    QColor d_fillColor;    QColor d_alarmColor;        Qt::Orientation d_orient;    ScalePos d_scalePos;    int d_borderWidth;    int d_scaleDist;    int d_thermoWidth;    double d_minValue;    double d_maxValue;    double d_value;    double d_alarmLevel;    int d_alarmEnabled;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -