DtkWidget 5.6.0.2
DTK Widget module
|
DColoredProgressBar is the same as QProgressBar, except it can change its appearance depending on the value displayed. 更多...
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功能差不多一样,只是它可以根据显示的值更改其外观
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.
void DColoredProgressBar::removeThreshold | ( | int | threshold | ) |
DColoredProgressBar::removeThreshold removes a threshold.
DColoredProgressBar::removeThreshold 移除一个threshold
threshold The threshold value to remove. threshold 被移除的threshold值
QList< int > DColoredProgressBar::thresholds | ( | ) | const |
DColoredProgressBar::threadsholds gets all threshold values.
DColoredProgressBar::thresholds 获取所有的thresholds值