/ proxyroles / proxyrolesqmltypes.cpp
proxyrolesqmltypes.cpp
 1  #include "proxyrole.h"
 2  #include "joinrole.h"
 3  #include "switchrole.h"
 4  #include "expressionrole.h"
 5  #include "regexprole.h"
 6  #include "filterrole.h"
 7  #include <QQmlEngine>
 8  #include <QCoreApplication>
 9  
10  namespace qqsfpm {
11  
12  void registerProxyRoleTypes() {
13      qmlRegisterUncreatableType<ProxyRole>("SortFilterProxyModel", 0, 2, "ProxyRole", QStringLiteral("ProxyRole is an abstract class"));
14      qmlRegisterType<JoinRole>("SortFilterProxyModel", 0, 2, "JoinRole");
15      qmlRegisterType<SwitchRole>("SortFilterProxyModel", 0, 2, "SwitchRole");
16      qmlRegisterType<ExpressionRole>("SortFilterProxyModel", 0, 2, "ExpressionRole");
17      qmlRegisterType<RegExpRole>("SortFilterProxyModel", 0, 2, "RegExpRole");
18      qmlRegisterType<FilterRole>("SortFilterProxyModel", 0, 2, "FilterRole");
19  }
20  
21  Q_COREAPP_STARTUP_FUNCTION(registerProxyRoleTypes)
22  
23  }