1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef PROGRESSBAR_H |
6 | #define PROGRESSBAR_H |
7 | |
8 | #include <QWidget> |
9 | |
10 | class ProgressBarPrivate; |
11 | class ProgressBar : public QWidget |
12 | { |
13 | Q_OBJECT |
14 | ProgressBarPrivate *const d; |
15 | |
16 | public: |
17 | explicit ProgressBar(QWidget * parent = nullptr); |
18 | virtual ~ProgressBar(); |
19 | void setPercentage(int percentage); |
20 | void setColor(const QColor &color); |
21 | |
22 | protected: |
23 | virtual void paintEvent(QPaintEvent *event); |
24 | }; |
25 | |
26 | #endif // PROGRESSBAR_H |
27 |