From 057ef1d83ba263fb2adf1aa86f8e281ab0065c43 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 8 Apr 2016 00:15:32 +0200 Subject: Refactoring to finally get rid of MessageHandler/Receiver in favor of the new Settings mechanism. --- plugingui/progressbar.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugingui/progressbar.h') diff --git a/plugingui/progressbar.h b/plugingui/progressbar.h index d5f6c61..d48a8b5 100644 --- a/plugingui/progressbar.h +++ b/plugingui/progressbar.h @@ -46,8 +46,8 @@ public: ProgressBar(Widget *parent); ~ProgressBar(); - float progress(); - void setProgress(float progress); + void setTotal(int total); + void setValue(int 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; + int total{0}; + int value{0}; }; } // GUI:: -- cgit v1.2.3 From 35e804b984c28131fe13d229c5a0867762c6e8cf Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 16 Apr 2016 13:23:11 +0200 Subject: Some DrumKitLoader refactoring. --- plugingui/progressbar.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugingui/progressbar.h') diff --git a/plugingui/progressbar.h b/plugingui/progressbar.h index d48a8b5..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(); - void setTotal(int total); - void setValue(int value); + void setTotal(std::size_t total); + void setValue(std::size_t value); void setState(ProgressBarState state); @@ -64,8 +64,8 @@ private: Painter::Bar bar_blue; Painter::Bar bar_red; - int total{0}; - int value{0}; + std::size_t total{0}; + std::size_t value{0}; }; } // GUI:: -- cgit v1.2.3