qt-material-widgets/components/qtmaterialprogress.h

44 lines
1.1 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"
2021-07-02 10:42:28 +00:00
#include "qtmaterial_global.h"
2017-09-29 13:33:26 +00:00
class QtMaterialProgressPrivate;
2021-07-02 10:42:28 +00:00
class QT_MATERIAL_EXPORT QtMaterialProgress : 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:
explicit QtMaterialProgress(QWidget *parent = 0);
~QtMaterialProgress();
void setProgressType(MaterialConst::ProgressType type);
MaterialConst::ProgressType progressType() const;
2017-09-29 13:33:26 +00:00
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;
const QScopedPointer<QtMaterialProgressPrivate> d_ptr;
private:
Q_DISABLE_COPY(QtMaterialProgress)
Q_DECLARE_PRIVATE(QtMaterialProgress)
};
#endif // QTMATERIALPROGRESS_H