summaryrefslogtreecommitdiff
path: root/plugingui/progressbar.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-04-16 13:33:53 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-04-16 13:33:53 +0200
commit4eb252df04ab237c8638d45bcbf028859dc6a110 (patch)
tree8bffddf62b4271336a6e0121fef8133327654000 /plugingui/progressbar.h
parentef68248bf70a027595803b08433a7a2c74e20fd0 (diff)
parent35e804b984c28131fe13d229c5a0867762c6e8cf (diff)
Merge branch 'settings'
Diffstat (limited to 'plugingui/progressbar.h')
-rw-r--r--plugingui/progressbar.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugingui/progressbar.h b/plugingui/progressbar.h
index d5f6c61..7485e40 100644
--- a/plugingui/progressbar.h
+++ b/plugingui/progressbar.h
@@ -43,11 +43,11 @@ enum class ProgressBarState
class ProgressBar : public Widget {
public:
- ProgressBar(Widget *parent);
+ ProgressBar(Widget* parent);
~ProgressBar();
- float progress();
- void setProgress(float progress);
+ void setTotal(std::size_t total);
+ void setValue(std::size_t value);
void setState(ProgressBarState state);
@@ -56,7 +56,7 @@ protected:
virtual void repaintEvent(RepaintEvent* repaintEvent) override;
private:
- ProgressBarState state;
+ ProgressBarState state{ProgressBarState::Blue};
Painter::Bar bar_bg;
@@ -64,7 +64,8 @@ private:
Painter::Bar bar_blue;
Painter::Bar bar_red;
- float _progress;
+ std::size_t total{0};
+ std::size_t value{0};
};
} // GUI::