diff --git a/src/blackmisc/propertyindex.h b/src/blackmisc/propertyindex.h index f019600bc..220cbd30e 100644 --- a/src/blackmisc/propertyindex.h +++ b/src/blackmisc/propertyindex.h @@ -93,6 +93,13 @@ namespace BlackMisc return static_cast(f); } + //! Compare with index given by enum + template bool equalsPropertyIndexEnum(EnumType ev) + { + if (this->m_indexes.size() != 1) { return false; } + return static_cast(ev) == m_indexes.first(); + } + protected: //! \copydoc CValueObject::convertToQString virtual QString convertToQString(bool i18n = false) const override;