-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.cpp
More file actions
32 lines (27 loc) · 779 Bytes
/
Copy pathPlugin.cpp
File metadata and controls
32 lines (27 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "Plugin.h"
#include "BackendAll.h"
#include "ExamplePlugin/ExamplePluginBackend.h"
#include <qqmlregistration.h>
#include <QQmlApplicationEngine>
#include <QDebug>
#include <QCoreApplication>
Plugin::Plugin()
{
}
Plugin::~Plugin()
{
}
void Plugin::registerQmlTypes(QQmlApplicationEngine *engine)
{
Q_UNUSED(engine);
QString URI = QStringLiteral("org.uq.") + PLUGIN_NAME;
QByteArray uriBytes = URI.toUtf8();
const char *URI2 = uriBytes.constData();
qmlRegisterSingletonType<BackendAll>(URI2, 1, 0, "BackendAll", BackendAll::create);
qmlRegisterType<ExamplePluginBackend>(URI2, 1, 0, "ExamplePluginBackend");
qDebug() << "Plugin: registered QML types with URI:" << URI;
}
void Plugin::initialize()
{
qDebug() << "Plugin initialized";
}