Add a getter in addition to the () operator for caf::AppEnum

* The operator can be awkward to use currently with class enums
This commit is contained in:
Gaute Lindkvist 2020-01-14 10:14:08 +01:00
parent cca94f0326
commit 6082d0dd2f

View File

@ -106,6 +106,8 @@ public:
bool operator!= (T value) const { return m_value != value;}
operator T () const { return m_value;}
T value() const { return m_value; }
size_t index() const { return EnumMapper::instance()->index(m_value);}
QString text() const { return EnumMapper::instance()->text(m_value);}
QString uiText() const { return EnumMapper::instance()->uiText(m_value);}