ssu
Loading...
Searching...
No Matches
plugin.cpp
Go to the documentation of this file.
1
7
8#include <QQmlExtensionPlugin>
9#include <QQmlEngine>
10
11#include <qqml.h>
13#include "declarativessudeviceinfo.h"
14#include "../libssu/ssu.h"
15
16static QObject *device_info_factory(QQmlEngine *, QJSEngine *)
17{
18 return new DeclarativeSsuDeviceInfo;
19}
20
21class NemoSsuPlugin : public QQmlExtensionPlugin
22{
23 Q_OBJECT
24 Q_PLUGIN_METADATA(IID "org.nemomobile.ssu")
25
26public:
27 virtual void registerTypes(const char *)
28 {
29 qmlRegisterType<DeclarativeSsuFeatureModel>("Nemo.Ssu", 1, 0, "FeatureModel");
30 qmlRegisterSingletonType<DeclarativeSsuDeviceInfo>("Nemo.Ssu", 1, 1, "DeviceInfo", device_info_factory);
31 qmlRegisterType<Ssu>("Nemo.Ssu", 1, 1, "Ssu");
32 }
33};
34
35#include "plugin.moc"