qt-material-widgets/components/progress.h

43 lines
960 B
C
Raw Normal View History

2016-06-12 08:21:58 +00:00
#ifndef PROGRESS_H
#define PROGRESS_H
2016-06-19 09:18:05 +00:00
#include <QProgressBar>
#include "lib/theme.h"
2016-06-12 08:21:58 +00:00
2016-06-18 09:12:20 +00:00
class ProgressPrivate;
2016-06-19 09:18:05 +00:00
class Progress : public QProgressBar
2016-06-12 08:21:58 +00:00
{
Q_OBJECT
Q_PROPERTY(QColor progressColor WRITE setProgressColor READ progressColor)
Q_PROPERTY(QColor backgroundColor WRITE setProgressColor READ backgroundColor)
2016-06-12 08:21:58 +00:00
public:
explicit Progress(QWidget *parent = 0);
~Progress();
2016-06-19 09:18:05 +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;
2016-06-18 09:12:20 +00:00
protected:
2016-06-18 09:36:40 +00:00
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
2016-06-18 09:12:20 +00:00
const QScopedPointer<ProgressPrivate> d_ptr;
2016-06-12 08:21:58 +00:00
private:
Q_DISABLE_COPY(Progress)
2016-06-18 09:12:20 +00:00
Q_DECLARE_PRIVATE(Progress)
2016-06-12 08:21:58 +00:00
};
#endif // PROGRESS_H