2017-09-29 09:14:01 +00:00
|
|
|
#ifndef QTMATERIALCIRCULARPROGRESS_H
|
|
|
|
#define QTMATERIALCIRCULARPROGRESS_H
|
|
|
|
|
|
|
|
#include <QtWidgets/QProgressBar>
|
|
|
|
#include "lib/qtmaterialtheme.h"
|
2021-07-01 10:04:11 +00:00
|
|
|
#include <QtUiPlugin/QDesignerExportWidget>
|
2017-09-29 09:14:01 +00:00
|
|
|
|
|
|
|
class QtMaterialCircularProgressPrivate;
|
|
|
|
|
2021-07-01 10:04:11 +00:00
|
|
|
class QDESIGNER_WIDGET_EXPORT QtMaterialCircularProgress : public QProgressBar
|
2017-09-29 09:14:01 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2021-06-30 09:30:12 +00:00
|
|
|
Q_PROPERTY(MaterialConst::ProgressType progressType WRITE setProgressType READ progressType)
|
|
|
|
Q_PROPERTY(bool useThemeColors WRITE setUseThemeColors READ useThemeColors)
|
2017-09-29 09:14:01 +00:00
|
|
|
Q_PROPERTY(qreal lineWidth WRITE setLineWidth READ lineWidth)
|
|
|
|
Q_PROPERTY(qreal size WRITE setSize READ size)
|
|
|
|
Q_PROPERTY(QColor color WRITE setColor READ color)
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit QtMaterialCircularProgress(QWidget *parent = 0);
|
|
|
|
~QtMaterialCircularProgress();
|
|
|
|
|
2021-06-30 09:30:12 +00:00
|
|
|
void setProgressType(MaterialConst::ProgressType type);
|
|
|
|
MaterialConst::ProgressType progressType() const;
|
2017-09-29 09:14:01 +00:00
|
|
|
|
|
|
|
void setUseThemeColors(bool value);
|
|
|
|
bool useThemeColors() const;
|
|
|
|
|
|
|
|
void setLineWidth(qreal width);
|
|
|
|
qreal lineWidth() const;
|
|
|
|
|
|
|
|
void setSize(int size);
|
|
|
|
int size() const;
|
|
|
|
|
|
|
|
void setColor(const QColor &color);
|
|
|
|
QColor color() const;
|
|
|
|
|
|
|
|
QSize sizeHint() const Q_DECL_OVERRIDE;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
|
|
|
|
|
|
|
|
const QScopedPointer<QtMaterialCircularProgressPrivate> d_ptr;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(QtMaterialCircularProgress)
|
|
|
|
Q_DECLARE_PRIVATE(QtMaterialCircularProgress)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QTMATERIALCIRCULARPROGRESS_H
|