split plugin to classes

rewrite extscripts
fix building
implement several methods
This commit is contained in:
arcan1s
2015-01-20 01:08:21 +03:00
parent f5fbb80d91
commit 213595b3c1
13 changed files with 569 additions and 334 deletions

View File

@ -19,15 +19,25 @@
#include <QtQml>
#include "awadds.h"
#include "awactions.h"
#include "awkeys.h"
static QObject *aw_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
static QObject *awactions_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
return new AWAdds();
return new AWActions();
}
static QObject *awkeys_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
return new AWKeys();
}
@ -35,5 +45,6 @@ void AWPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.awesome-widget"));
qmlRegisterSingletonType<AWAdds>(uri, 1, 0, "AWAdds", aw_singletontype_provider);
qmlRegisterSingletonType<AWActions>(uri, 1, 0, "AWActions", awactions_singletontype_provider);
qmlRegisterSingletonType<AWKeys>(uri, 1, 0, "AWKeys", awkeys_singletontype_provider);
}