diff options
author | bubnikv <bubnikv@gmail.com> | 2018-09-20 17:48:40 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-09-20 17:48:40 +0300 |
commit | 20d0f046d2d75468dcb193f84d73ea8522e10c33 (patch) | |
tree | 9e1d49a349a8078079492e886be465a4ed6ee0d8 /src/slic3r/GUI/ProgressIndicator.hpp | |
parent | add45a8f6e656fdf4af2cfe5d5ce82457e08e2be (diff) | |
parent | 07274589a35948e135ccb2eed59626a41c61444b (diff) |
Merge remote-tracking branch 'origin/dev2' into dev_nativeversion_1.42.0-alpha
Diffstat (limited to 'src/slic3r/GUI/ProgressIndicator.hpp')
-rw-r--r-- | src/slic3r/GUI/ProgressIndicator.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/slic3r/GUI/ProgressIndicator.hpp b/src/slic3r/GUI/ProgressIndicator.hpp index 0cf8b4a17..280ba63ac 100644 --- a/src/slic3r/GUI/ProgressIndicator.hpp +++ b/src/slic3r/GUI/ProgressIndicator.hpp @@ -14,31 +14,31 @@ public: using CancelFn = std::function<void(void)>; // Cancel function signature. private: - float state_ = .0f, max_ = 1.f, step_; - CancelFn cancelfunc_ = [](){}; + float m_state = .0f, m_max = 1.f, m_step; + CancelFn m_cancelfunc = [](){}; public: inline virtual ~ProgressIndicator() {} /// Get the maximum of the progress range. - float max() const { return max_; } + float max() const { return m_max; } /// Get the current progress state - float state() const { return state_; } + float state() const { return m_state; } /// Set the maximum of the progress range - virtual void max(float maxval) { max_ = maxval; } + virtual void max(float maxval) { m_max = maxval; } /// Set the current state of the progress. - virtual void state(float val) { state_ = val; } + virtual void state(float val) { m_state = val; } /** * @brief Number of states int the progress. Can be used instead of giving a * maximum value. */ virtual void states(unsigned statenum) { - step_ = max_ / statenum; + m_step = m_max / statenum; } /// Message shown on the next status update. @@ -51,13 +51,13 @@ public: virtual void message_fmt(const std::string& fmt, ...); /// Set up a cancel callback for the operation if feasible. - virtual void on_cancel(CancelFn func = CancelFn()) { cancelfunc_ = func; } + virtual void on_cancel(CancelFn func = CancelFn()) { m_cancelfunc = func; } /** * Explicitly shut down the progress indicator and call the associated * callback. */ - virtual void cancel() { cancelfunc_(); } + virtual void cancel() { m_cancelfunc(); } /// Convenience function to call message and status update in one function. void update(float st, const std::string& msg) { |