basic two-line navigation proof of concept
This commit is contained in:
@@ -112,7 +112,7 @@ bool InputManager::eventFilter(QObject *watched, QEvent *event)
|
||||
emit actionReleased(action);
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
QString InputManager::actionName(Action action) const
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QtQml>
|
||||
|
||||
class QEvent;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QQmlContext>
|
||||
#include <QtQml>
|
||||
#include "input/InputManager.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -10,6 +11,14 @@ int main(int argc, char *argv[])
|
||||
InputManager inputManager;
|
||||
app.installEventFilter(&inputManager);
|
||||
|
||||
qmlRegisterUncreatableMetaObject(
|
||||
InputManager::staticMetaObject,
|
||||
"NomadInput",
|
||||
1, 0,
|
||||
"InputManager",
|
||||
"InputManager is created by nomad"
|
||||
);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.rootContext()->setContextProperty("inputManager", &inputManager);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user