Showing the changes to interface/src/scripting/ControllerScriptingInterface.h (1 of 8 files). Show all
Unified · Split
| @@ -14,10 +14,11 @@ · 13 unmodified lines | |||
| 14 | 14 | ||
| 15 | #include <QtCore/QObject> | 15 | #include <QtCore/QObject> |
| 16 | 16 | ||
| 17 | #include "ui/UserInputMapper.h" | ||
| 18 | |||
| 17 | #include <AbstractControllerScriptingInterface.h> | 19 | #include <AbstractControllerScriptingInterface.h> |
| 18 | class PalmData; | 20 | class PalmData; |
| 19 | 21 | ||
| 20 | |||
| 21 | class InputController : public AbstractInputController { | 22 | class InputController : public AbstractInputController { |
| 22 | Q_OBJECT | 23 | Q_OBJECT |
| 23 | 24 | ||
| @@ -54,6 +55,9 @@ class ControllerScriptingInterface : public AbstractControllerScriptingInterface · 30 unmodified lines | |||
| 54 | 55 | ||
| 55 | public: | 56 | public: |
| 56 | ControllerScriptingInterface(); | 57 | ControllerScriptingInterface(); |
| 58 | |||
| 59 | virtual void registerControllerTypes(QScriptEngine* engine); | ||
| 60 | |||
| 57 | void emitKeyPressEvent(QKeyEvent* event) { emit keyPressEvent(KeyEvent(*event)); } | 61 | void emitKeyPressEvent(QKeyEvent* event) { emit keyPressEvent(KeyEvent(*event)); } |
| 58 | void emitKeyReleaseEvent(QKeyEvent* event) { emit keyReleaseEvent(KeyEvent(*event)); } | 62 | void emitKeyReleaseEvent(QKeyEvent* event) { emit keyReleaseEvent(KeyEvent(*event)); } |
| 59 | 63 | ||
| @@ -79,6 +83,14 @@ public: · 19 unmodified lines | |||
| 79 | void updateInputControllers(); | 83 | void updateInputControllers(); |
| 80 | 84 | ||
| 81 | public slots: | 85 | public slots: |
| 86 | Q_INVOKABLE virtual QVector<UserInputMapper::Action> getAllActions(); | ||
| 87 | Q_INVOKABLE virtual QVector<UserInputMapper::InputChannel> getInputChannelsForAction(UserInputMapper::Action action); | ||
| 88 | Q_INVOKABLE virtual QString getDeviceName(unsigned int device); | ||
| 89 | Q_INVOKABLE virtual QVector<UserInputMapper::InputChannel> getAllInputsForDevice(unsigned int device); | ||
| 90 | Q_INVOKABLE virtual bool addInputChannel(UserInputMapper::InputChannel inputChannel); | ||
| 91 | Q_INVOKABLE virtual bool removeInputChannel(UserInputMapper::InputChannel inputChannel); | ||
| 92 | Q_INVOKABLE virtual QVector<UserInputMapper::InputPair> getAvailableInputs(unsigned int device); | ||
| 93 | Q_INVOKABLE virtual void resetAllDeviceBindings(); | ||
| 82 | virtual bool isPrimaryButtonPressed() const; | 94 | virtual bool isPrimaryButtonPressed() const; |
| 83 | virtual glm::vec2 getPrimaryJoystickPosition() const; | 95 | virtual glm::vec2 getPrimaryJoystickPosition() const; |
| 84 | 96 | ||