summaryrefslogtreecommitdiff
path: root/src/gui/widgets/guitable.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-17 19:07:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-17 19:07:25 +0300
commite9fb9da5bf17d3402781eb5205be7d2f794887ee (patch)
tree729a7932fab668bcc2de180ebfe287e811f8e136 /src/gui/widgets/guitable.h
parent00ec60c1c0c3db8e3602e85dd152106f59f0c0e2 (diff)
downloadplus-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.gz
plus-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.bz2
plus-e9fb9da5bf17d3402781eb5205be7d2f794887ee.tar.xz
plus-e9fb9da5bf17d3402781eb5205be7d2f794887ee.zip
Add strong typed bool Opaque.
Diffstat (limited to 'src/gui/widgets/guitable.h')
-rw-r--r--src/gui/widgets/guitable.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 35000ccff..b411eff79 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -25,6 +25,8 @@
#include "localconsts.h"
+#include "enums/simpletypes/opaque.h"
+
#include "listeners/keylistener.h"
#include "listeners/mouselistener.h"
#include "listeners/tablemodellistener.h"
@@ -54,7 +56,7 @@ class GuiTable final : public Widget,
public:
GuiTable(const Widget2 *const widget,
TableModel *const initial_model,
- const bool opacity = true);
+ const Opaque opacity = Opaque_true);
A_DELETE_COPY(GuiTable)
@@ -131,7 +133,7 @@ class GuiTable final : public Widget,
*
* @param opaque True if the table should be opaque, false otherwise.
*/
- void setOpaque(bool opaque)
+ void setOpaque(Opaque opaque)
{ mOpaque = opaque; }
/**
@@ -141,7 +143,7 @@ class GuiTable final : public Widget,
* @return True if the table is opaque, false otherwise.
*/
bool isOpaque() const A_WARN_UNUSED
- { return mOpaque; }
+ { return mOpaque == Opaque_true; }
// Inherited from MouseListener
void mousePressed(MouseEvent& event) override final;
@@ -198,7 +200,7 @@ class GuiTable final : public Widget,
bool mLinewiseMode;
bool mWrappingEnabled;
- bool mOpaque;
+ Opaque mOpaque;
bool mSelectable;
};