DtkWidget 5.6.0.2
DTK Widget module
dcoloredprogressbar.h
1// SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#include <dtkwidget_global.h>
6#include <DObject>
7
8#include <QProgressBar>
9
10DWIDGET_BEGIN_NAMESPACE
11
12class DColoredProgressBarPrivate;
13class LIBDTKWIDGETSHARED_EXPORT DColoredProgressBar : public QProgressBar, public DTK_CORE_NAMESPACE::DObject
14{
15 Q_OBJECT
16public:
17 explicit DColoredProgressBar(QWidget *parent = nullptr);
18 void addThreshold(int threshold, QBrush brush);
19 void removeThreshold(int threshold);
20 QList<int> thresholds() const;
21
22protected:
23 void paintEvent(QPaintEvent *) override;
24
25private:
26 D_DECLARE_PRIVATE(DColoredProgressBar)
27};
28
29DWIDGET_END_NAMESPACE
DColoredProgressBar is the same as QProgressBar, except it can change its appearance depending on the...
Definition: dcoloredprogressbar.h:14