summaryrefslogtreecommitdiffstats
path: root/src/input/frontend
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire350@gmail.com>2015-11-28 11:02:57 +0100
committerSean Harmer <sean.harmer@kdab.com>2015-11-28 15:01:51 +0000
commitf08480891b1f0ec88268fb69c4dadf34f6cc833e (patch)
treedc9ccd46392b7b921dc46a27522c04c744fdce35 /src/input/frontend
parent1963656636c9bcf576922db65cd8451be07e3077 (diff)
QActionInput: keys specified as a bit mask directly
Change-Id: Idbc36d2a391fa2dcf21735f85a5b2d3859c97450 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/input/frontend')
-rw-r--r--src/input/frontend/qactioninput.cpp9
-rw-r--r--src/input/frontend/qactioninput.h6
2 files changed, 7 insertions, 8 deletions
diff --git a/src/input/frontend/qactioninput.cpp b/src/input/frontend/qactioninput.cpp
index 47a85cc3c..54531df06 100644
--- a/src/input/frontend/qactioninput.cpp
+++ b/src/input/frontend/qactioninput.cpp
@@ -46,10 +46,11 @@ class QActionInputPrivate : public Qt3DCore::QNodePrivate
public:
QActionInputPrivate()
: Qt3DCore::QNodePrivate()
+ , m_keys(0)
, m_sourceDevice(Q_NULLPTR)
{}
- QVariantList m_keys;
+ int m_keys;
QAbstractPhysicalDevice *m_sourceDevice;
};
@@ -63,14 +64,12 @@ QActionInput::~QActionInput()
QNode::cleanup();
}
-QVariantList QActionInput::keys() const
+int QActionInput::keys() const
{
Q_D(const QActionInput);
return d->m_keys;
}
-
-
void QActionInput::setSourceDevice(QAbstractPhysicalDevice *sourceDevice)
{
Q_D(QActionInput);
@@ -92,7 +91,7 @@ QAbstractPhysicalDevice *QActionInput::sourceDevice() const
return d->m_sourceDevice;
}
-void QActionInput::setKeys(const QVariantList &keys)
+void QActionInput::setKeys(int keys)
{
Q_D(QActionInput);
if (d->m_keys != keys) {
diff --git a/src/input/frontend/qactioninput.h b/src/input/frontend/qactioninput.h
index 37e9c7957..537e7e1e0 100644
--- a/src/input/frontend/qactioninput.h
+++ b/src/input/frontend/qactioninput.h
@@ -51,7 +51,7 @@ class QT3DINPUTSHARED_EXPORT QActionInput : public Qt3DCore::QNode
{
Q_OBJECT
Q_PROPERTY(Qt3DInput::QAbstractPhysicalDevice *sourceDevice READ sourceDevice WRITE setSourceDevice NOTIFY sourceDeviceChanged)
- Q_PROPERTY(QVariantList keys READ keys WRITE setKeys NOTIFY keysChanged)
+ Q_PROPERTY(int keys READ keys WRITE setKeys NOTIFY keysChanged)
public:
explicit QActionInput(Qt3DCore::QNode *parent = Q_NULLPTR);
@@ -60,8 +60,8 @@ public:
void setSourceDevice(QAbstractPhysicalDevice *sourceDevice);
QAbstractPhysicalDevice *sourceDevice() const;
- void setKeys(const QVariantList &keys);
- QVariantList keys() const;
+ void setKeys(int keys);
+ int keys() const;
Q_SIGNALS:
void sourceDeviceChanged();