summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2015-12-01 11:36:51 +0000
committerSean Harmer <sean.harmer@kdab.com>2015-12-04 16:22:48 +0000
commit0a3831387348483d4af3aa12a13707aab08cd2d7 (patch)
treebdb06b26fee531d363c971a714c8d62f30e1fc33 /src
parent4ee8165b1b44463dcd0000119f3d827ae37d9c78 (diff)
Store logical device in QActionHandler
Change-Id: I6bd53c04460df463d93e91c6b2ae94a2e68a98d7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/input/frontend/qactionhandler.cpp16
-rw-r--r--src/input/frontend/qactionhandler.h3
-rw-r--r--src/input/frontend/qactionhandler_p.h5
3 files changed, 5 insertions, 19 deletions
diff --git a/src/input/frontend/qactionhandler.cpp b/src/input/frontend/qactionhandler.cpp
index d8a6408f2..a99d1eff3 100644
--- a/src/input/frontend/qactionhandler.cpp
+++ b/src/input/frontend/qactionhandler.cpp
@@ -37,6 +37,8 @@
#include "qactionhandler.h"
#include "qactionhandler_p.h"
+#include <Qt3DInput/qlogicaldevice.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DInput {
@@ -47,16 +49,6 @@ QActionHandlerPrivate::QActionHandlerPrivate()
{
}
-void QActionHandlerPrivate::setupConnections()
-{
- // TODO: Make connections to Actions contained in the logical device
-}
-
-void QActionHandlerPrivate::removeConnections()
-{
- // TODO: Tear down any old connections to the existing logical device
-}
-
QActionHandler::QActionHandler(Qt3DCore::QNode *parent)
: Qt3DCore::QComponent(*new QActionHandlerPrivate, parent)
{
@@ -85,11 +77,7 @@ void QActionHandler::setLogicalDevice(Qt3DInput::QLogicalDevice *logicalDevice)
if (d->m_logicalDevice == logicalDevice)
return;
- if (d->m_logicalDevice)
- d->removeConnections();
d->m_logicalDevice = logicalDevice;
- if (d->m_logicalDevice)
- d->setupConnections();
emit logicalDeviceChanged(logicalDevice);
}
diff --git a/src/input/frontend/qactionhandler.h b/src/input/frontend/qactionhandler.h
index e681e78af..6034b6eae 100644
--- a/src/input/frontend/qactionhandler.h
+++ b/src/input/frontend/qactionhandler.h
@@ -64,6 +64,9 @@ public Q_SLOTS:
Q_SIGNALS:
void logicalDeviceChanged(Qt3DInput::QLogicalDevice *logicalDevice);
+ void actionStarted(const QString &name);
+ void actionFinished(const QString &name);
+
protected:
Q_DECLARE_PRIVATE(QActionHandler)
QActionHandler(QActionHandlerPrivate &dd, Qt3DCore::QNode *parent = 0);
diff --git a/src/input/frontend/qactionhandler_p.h b/src/input/frontend/qactionhandler_p.h
index e23cb966b..27ac1177e 100644
--- a/src/input/frontend/qactionhandler_p.h
+++ b/src/input/frontend/qactionhandler_p.h
@@ -61,11 +61,6 @@ class QActionHandlerPrivate : public Qt3DCore::QComponentPrivate
public:
QActionHandlerPrivate();
- Q_DECLARE_PUBLIC(QActionHandler)
-
- void setupConnections();
- void removeConnections();
-
QLogicalDevice *m_logicalDevice;
};