qt-material-widgets/components/qtmaterialprogress.h

46 lines
1.0 KiB
C
Raw Normal View History

2017-09-29 13:33:26 +00:00
#ifndef QTMATERIALPROGRESS_H
#define QTMATERIALPROGRESS_H
#include <QtWidgets/QProgressBar>
#include "lib/qtmaterialtheme.h"
2022-02-17 02:35:26 +00:00
namespace md
{
class ProgressBarPrivate;
2017-09-29 13:33:26 +00:00
2022-02-17 02:35:26 +00:00
class ProgressBar : public QProgressBar
2017-09-29 13:33:26 +00:00
{
Q_OBJECT
Q_PROPERTY(QColor progressColor WRITE setProgressColor READ progressColor)
Q_PROPERTY(QColor backgroundColor WRITE setProgressColor READ backgroundColor)
public:
2022-02-17 02:35:26 +00:00
explicit ProgressBar(QWidget *parent = 0);
~ProgressBar();
2017-09-29 13:33:26 +00:00
void setProgressType(Material::ProgressType type);
Material::ProgressType progressType() const;
void setUseThemeColors(bool state);
bool useThemeColors() const;
void setProgressColor(const QColor &color);
QColor progressColor() const;
void setBackgroundColor(const QColor &color);
QColor backgroundColor() const;
protected:
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
2022-02-17 02:35:26 +00:00
const QScopedPointer<ProgressBarPrivate> d_ptr;
2017-09-29 13:33:26 +00:00
private:
2022-02-17 02:35:26 +00:00
Q_DISABLE_COPY(ProgressBar)
Q_DECLARE_PRIVATE(ProgressBar)
2017-09-29 13:33:26 +00:00
};
2022-02-17 02:35:26 +00:00
}
2017-09-29 13:33:26 +00:00
#endif // QTMATERIALPROGRESS_H