2014-07-07 17:08:30 +00:00
|
|
|
#include <QApplication>
|
|
|
|
#include <QQmlApplicationEngine>
|
2014-07-16 12:40:09 +00:00
|
|
|
#include <QtQml>
|
|
|
|
#include "clipboardAdapter.h"
|
2014-07-07 17:08:30 +00:00
|
|
|
#include "filter.h"
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
filter *eventFilter = new filter;
|
|
|
|
app.installEventFilter(eventFilter);
|
|
|
|
|
2014-07-16 12:40:09 +00:00
|
|
|
qmlRegisterType<clipboardAdapter>("moneroComponents", 1, 0, "Clipboard");
|
|
|
|
|
2014-07-07 17:08:30 +00:00
|
|
|
QQmlApplicationEngine engine;
|
2014-08-19 12:58:02 +00:00
|
|
|
engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath());
|
2014-07-07 17:08:30 +00:00
|
|
|
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
|
|
|
|
QObject *rootObject = engine.rootObjects().first();
|
|
|
|
|
2014-07-13 12:27:50 +00:00
|
|
|
QObject::connect(eventFilter, SIGNAL(sequencePressed(QVariant,QVariant)), rootObject, SLOT(sequencePressed(QVariant,QVariant)));
|
|
|
|
QObject::connect(eventFilter, SIGNAL(sequenceReleased(QVariant,QVariant)), rootObject, SLOT(sequenceReleased(QVariant,QVariant)));
|
2014-07-09 14:18:48 +00:00
|
|
|
QObject::connect(eventFilter, SIGNAL(mousePressed(QVariant,QVariant,QVariant)), rootObject, SLOT(mousePressed(QVariant,QVariant,QVariant)));
|
|
|
|
QObject::connect(eventFilter, SIGNAL(mouseReleased(QVariant,QVariant,QVariant)), rootObject, SLOT(mouseReleased(QVariant,QVariant,QVariant)));
|
2014-07-07 17:08:30 +00:00
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|