Commit beda14fe authored by Karel Slaný's avatar Karel Slaný Committed by Martin Straka

Made Gov model role enums visible to QML.

parent d2cc3664
......@@ -29,6 +29,7 @@ void GovFormListModel::declareQML(void)
{
qmlRegisterType<GovFormListModel>("cz.nic.mobileDatovka.models", 1, 0, "GovFormListModel");
qRegisterMetaType<GovFormListModel>();
qRegisterMetaType<GovFormListModel::Roles>();
}
GovFormListModel::GovFormListModel(QObject *parent)
......
......@@ -46,6 +46,7 @@ public:
ROLE_GOV_SRVC_PLACEHOLD,
ROLE_GOV_SRVC_MANDATORY
};
Q_ENUM(Roles)
/* Don't forget to declare various properties to the QML system. */
static
......@@ -174,3 +175,4 @@ private:
/* QML passes its arguments via QVariant. */
Q_DECLARE_METATYPE(GovFormListModel)
Q_DECLARE_METATYPE(GovFormListModel::Roles)
......@@ -83,6 +83,7 @@ void GovServiceListModel::declareQML(void)
{
qmlRegisterType<GovServiceListModel>("cz.nic.mobileDatovka.models", 1, 0, "GovServiceListModel");
qRegisterMetaType<GovServiceListModel>();
qRegisterMetaType<GovServiceListModel::Roles>();
}
GovServiceListModel::GovServiceListModel(QObject *parent)
......
......@@ -66,6 +66,7 @@ public:
ROLE_GOV_SRVC_INST_NAME,
ROLE_GOV_SRVC_BOXID
};
Q_ENUM(Roles)
/* Don't forget to declare various properties to the QML system. */
static
......@@ -166,3 +167,4 @@ private:
/* QML passes its arguments via QVariant. */
Q_DECLARE_METATYPE(GovServiceListModel)
Q_DECLARE_METATYPE(GovServiceListModel::Roles)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment