summaryrefslogtreecommitdiff
path: root/src/gui/windows/statuswindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 21:42:33 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 22:43:38 +0300
commit3411edb5d3ae07d247421e4b8f7936a22b7b4027 (patch)
tree63685d0979938a42a62b3f0a880663bb06f4e8ca /src/gui/windows/statuswindow.h
parent390e5da0f9ecc4407aa7d4bcba1af5730db56271 (diff)
downloadmv-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.gz
mv-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.bz2
mv-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.xz
mv-3411edb5d3ae07d247421e4b8f7936a22b7b4027.zip
Convert Attributes enum into strong typed enum.
Diffstat (limited to 'src/gui/windows/statuswindow.h')
-rw-r--r--src/gui/windows/statuswindow.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h
index 44328e1df..2ec0a778b 100644
--- a/src/gui/windows/statuswindow.h
+++ b/src/gui/windows/statuswindow.h
@@ -56,9 +56,11 @@ class StatusWindow final : public Window,
A_DELETE_COPY(StatusWindow)
- void setPointsNeeded(const int id, const int needed);
+ void setPointsNeeded(const AttributesT id,
+ const int needed);
- void addAttribute(const int id, const std::string &restrict name,
+ void addAttribute(const AttributesT id,
+ const std::string &restrict name,
const std::string &restrict shortName = "",
const Modifiable modifiable = Modifiable_false);
@@ -75,21 +77,23 @@ class StatusWindow final : public Window,
static void updateArrowsBar(ProgressBar *const bar);
void updateStatusBar(ProgressBar *const bar,
const bool percent = true) const;
- static void updateProgressBar(ProgressBar *const bar, const int value,
- const int max, const bool percent);
static void updateProgressBar(ProgressBar *const bar,
- const int id,
+ const int value,
+ const int max,
+ const bool percent);
+ static void updateProgressBar(ProgressBar *const bar,
+ const AttributesT id,
const bool percent = true);
void action(const ActionEvent &event) override;
void clearAttributes();
- void attributeChanged(const int id,
+ void attributeChanged(const AttributesT id,
const int oldVal,
const int newVal) override final;
- void statChanged(const int id,
+ void statChanged(const AttributesT id,
const int oldVal1,
const int oldVal2) override final;
@@ -124,7 +128,7 @@ class StatusWindow final : public Window,
Label *mCorrectionPointsLabel;
Button *mCopyButton;
- typedef std::map<int, AttrDisplay*> Attrs;
+ typedef std::map<Attributes, AttrDisplay*> Attrs;
Attrs mAttrs;
};