You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
613 B
23 lines
613 B
|
8 years ago
|
#include "qtmvvmquick_plugin.h"
|
||
|
|
|
||
|
|
#include <QtQml>
|
||
|
|
|
||
|
|
#include "qqmlquickpresenter.h"
|
||
|
|
|
||
|
|
static QObject *createQuickPresenterQmlSingleton(QQmlEngine *qmlEngine, QJSEngine *jsEngine)
|
||
|
|
{
|
||
|
|
Q_UNUSED(jsEngine)
|
||
|
|
return new QtMvvm::QQmlQuickPresenter(qmlEngine);
|
||
|
|
}
|
||
|
|
|
||
|
|
QtMvvmQuickDeclarativeModule::QtMvvmQuickDeclarativeModule(QObject *parent) :
|
||
|
|
QQmlExtensionPlugin(parent)
|
||
|
|
{}
|
||
|
|
|
||
|
|
void QtMvvmQuickDeclarativeModule::registerTypes(const char *uri)
|
||
|
|
{
|
||
|
|
Q_ASSERT(qstrcmp(uri, "de.skycoder42.qtmvvm.quick") == 0);
|
||
|
|
|
||
|
|
qmlRegisterSingletonType<QtMvvm::QQmlQuickPresenter>(uri, 1, 0, "QuickPresenter", createQuickPresenterQmlSingleton);
|
||
|
|
}
|