DtkWidget 5.6.0.2
DTK Widget module
Public 成员函数 | Protected 成员函数 | 所有成员列表
Dtk::Widget::DColoredProgressBar类 参考

DColoredProgressBar is the same as QProgressBar, except it can change its appearance depending on the value displayed. 更多...

类 Dtk::Widget::DColoredProgressBar 继承关系图:
Inheritance graph
[图例]
Dtk::Widget::DColoredProgressBar 的协作图:
Collaboration graph
[图例]

Public 成员函数

 DColoredProgressBar (QWidget *parent=nullptr)
 
void addThreshold (int threshold, QBrush brush)
 DColoredProgressBar::addThreshold 添加一个新的阈值,并指定达到该值后要使用的画笔。如果一个相同值的阈值已经存在,它将被覆盖。 更多...
 
void removeThreshold (int threshold)
 DColoredProgressBar::removeThreshold removes a threshold. 更多...
 
QList< int > thresholds () const
 DColoredProgressBar::threadsholds gets all threshold values. 更多...
 

Protected 成员函数

void paintEvent (QPaintEvent *) override
 

详细描述

DColoredProgressBar is the same as QProgressBar, except it can change its appearance depending on the value displayed.

\inmodule dtkwidget

DColoredProgressBar和QProgressBar功能差不多一样,只是它可以根据显示的值更改其外观

成员函数说明

◆ addThreshold()

void DColoredProgressBar::addThreshold ( int  threshold,
QBrush  brush 
)

DColoredProgressBar::addThreshold 添加一个新的阈值,并指定达到该值后要使用的画笔。如果一个相同值的阈值已经存在,它将被覆盖。

DColoredProgressBar::addThreshold adds a new threshold value and specifies the brush to use once that value is reached.

If a threshold of the same value already exists, it will be overwritten. brush 当前显示的值不小于 threshold且小于下一个阈值时使用的画笔。 brush The brush to use when the currently displayed value is no less than and less than the next threshold value. threshold 使用此画笔的最小值。 threshold Minimum value for this brush to be used.

◆ removeThreshold()

void DColoredProgressBar::removeThreshold ( int  threshold)

DColoredProgressBar::removeThreshold removes a threshold.

DColoredProgressBar::removeThreshold 移除一个threshold

threshold The threshold value to remove. threshold 被移除的threshold值

◆ thresholds()

QList< int > DColoredProgressBar::thresholds ( ) const

DColoredProgressBar::threadsholds gets all threshold values.

DColoredProgressBar::thresholds 获取所有的thresholds值

返回
A list of threshold values.
返回一个 threshold值的列表

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