QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtDialSimpleNeedle类 参考

A needle for dial widgets 更多...

#include <qwt_dial_needle.h>

类 QwtDialSimpleNeedle 继承关系图:
QwtDialNeedle

Public 类型

enum  Style { Arrow , Ray }
 Style of the needle
 

Public 成员函数

 QwtDialSimpleNeedle (Style, bool hasKnob=true, const QColor &mid=Qt::gray, const QColor &base=Qt::darkGray)
 Constructor
 
void setWidth (double width)
 Set the width of the needle
 
double width () const
 Return the width of the needle
 
- Public 成员函数 继承自 QwtDialNeedle
 QwtDialNeedle ()
 Constructor
 
virtual ~QwtDialNeedle ()
 Destructor
 
virtual void setPalette (const QPalette &)
 Set the palette for the needle
 
const QPalette & palette () const
 Return the palette of the needle
 
void setFlatStyle (bool)
 Set flat style
 
bool flatStyle () const
 Return flat style
 
virtual void draw (QPainter *, const QPointF &center, double length, double direction, QPalette::ColorGroup=QPalette::Active) const
 Draw the needle
 

Protected 成员函数

virtual void drawNeedle (QPainter *, double length, QPalette::ColorGroup) const override
 Draw the needle
 
- Protected 成员函数 继承自 QwtDialNeedle
virtual void drawKnob (QPainter *, double width, const QBrush &, bool sunken) const
 Draw the knob
 

额外继承的成员函数

- Protected 属性 继承自 QwtDialNeedle
QPalette m_palette
 
bool m_flatStyle
 

详细描述

A needle for dial widgets

The following colors are used:

构造及析构函数说明

◆ QwtDialSimpleNeedle()

QwtDialSimpleNeedle::QwtDialSimpleNeedle ( Style  style,
bool  hasKnob = true,
const QColor &  mid = Qt::gray,
const QColor &  base = Qt::darkGray 
)

Constructor

参数
[in]styleStyle
[in]hasKnobWith/Without knob
[in]midMiddle color
[in]baseBase color

成员函数说明

◆ drawNeedle()

void QwtDialSimpleNeedle::drawNeedle ( QPainter *  painter,
double  length,
QPalette::ColorGroup  colorGroup 
) const
overrideprotectedvirtual

Draw the needle

参数
painterPainter
lengthLength of the needle
colorGroupColor group, used for painting

实现了 QwtDialNeedle.

◆ setWidth()

void QwtDialSimpleNeedle::setWidth ( double  width)

Set the width of the needle

参数
[in]widthWidth
参见
width()

◆ width()

double QwtDialSimpleNeedle::width ( ) const

Return the width of the needle

返回
Width of the needle
参见
setWidth()

该类的文档由以下文件生成: