summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire.ecortex.kdab.com>2014-10-29 07:27:28 +0100
committerSean Harmer <sean.harmer@kdab.com>2014-11-02 12:43:03 +0100
commit9272fb8e6696dc27bed02b59b00fbd611e64297d (patch)
tree517efaef1c0e425030177761c4256a02834a9832 /src
parent4b3231b169277f5033f8519b7418d3b31c93dc88 (diff)
QKeyboardController class
Change-Id: I3781ae23bb280c7ad53df7be843fa75e2bbda560 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/input/input.pri7
-rw-r--r--src/input/input.pro2
-rw-r--r--src/input/qkeyboardcontroller.cpp66
-rw-r--r--src/input/qkeyboardcontroller.h75
-rw-r--r--src/input/qkeyboardcontroller_p.h65
5 files changed, 212 insertions, 3 deletions
diff --git a/src/input/input.pri b/src/input/input.pri
index 8a2c8671b..7d5b31e4a 100644
--- a/src/input/input.pri
+++ b/src/input/input.pri
@@ -1,7 +1,10 @@
HEADERS += \
- $$PWD/qinputaspect.h
+ $$PWD/qinputaspect.h \
+ $$PWD/qkeyboardcontroller.h \
+ $$PWD/qkeyboardcontroller_p.h
SOURCES += \
- $$PWD/qinputaspect.cpp
+ $$PWD/qinputaspect.cpp \
+ $$PWD/qkeyboardcontroller.cpp
INCLUDEPATH += $$PWD
diff --git a/src/input/input.pro b/src/input/input.pro
index 42b5e389f..619477a4c 100644
--- a/src/input/input.pro
+++ b/src/input/input.pro
@@ -1,6 +1,6 @@
TARGET = Qt3DInput
-QT += core 3dcore 3dcore-private 3drenderer
+QT += core core-private 3dcore 3dcore-private 3drenderer
DEFINES += QT3DINPUT_LIBRARY
diff --git a/src/input/qkeyboardcontroller.cpp b/src/input/qkeyboardcontroller.cpp
new file mode 100644
index 000000000..db2f7dc7a
--- /dev/null
+++ b/src/input/qkeyboardcontroller.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qkeyboardcontroller.h"
+#include "qkeyboardcontroller_p.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3D {
+
+QKeyboardControllerPrivate::QKeyboardControllerPrivate(QKeyboardController *qq)
+ : QNodePrivate(qq)
+{
+}
+
+QKeyboardController::QKeyboardController(QNode *parent)
+ : QNode(*new QKeyboardControllerPrivate(this), parent)
+{
+}
+
+QKeyboardController::QKeyboardController(QKeyboardControllerPrivate &dd, QNode *parent)
+ : QNode(dd, parent)
+{
+}
+
+} // Qt3D
+
+QT_END_NAMESPACE
diff --git a/src/input/qkeyboardcontroller.h b/src/input/qkeyboardcontroller.h
new file mode 100644
index 000000000..215012bcd
--- /dev/null
+++ b/src/input/qkeyboardcontroller.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3D_INPUT_QKEYBOARDCONTROLLER_H
+#define QT3D_INPUT_QKEYBOARDCONTROLLER_H
+
+#include <Qt3DInput/qt3dinput_global.h>
+#include <Qt3DCore/qnode.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3D {
+
+class QKeyboardControllerPrivate;
+
+class QT3DINPUTSHARED_EXPORT QKeyboardController : public QNode
+{
+ Q_OBJECT
+
+public:
+ explicit QKeyboardController(QNode *parent = 0);
+
+protected:
+ QKeyboardController(QKeyboardControllerPrivate &dd, QNode *parent = 0);
+
+private:
+ Q_DECLARE_PRIVATE(QKeyboardController)
+ QT3D_CLONEABLE(QKeyboardController)
+};
+
+} // Qt3D
+
+QT_END_NAMESPACE
+
+Q_DECLARE_METATYPE(Qt3D::QKeyboardController *)
+
+#endif // QT3D_INPUT_QKEYBOARDCONTROLLER_H
diff --git a/src/input/qkeyboardcontroller_p.h b/src/input/qkeyboardcontroller_p.h
new file mode 100644
index 000000000..84df980e9
--- /dev/null
+++ b/src/input/qkeyboardcontroller_p.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3D_INPUT_QKEYBOARDCONTROLLER_P_H
+#define QT3D_INPUT_QKEYBOARDCONTROLLER_P_H
+
+#include <private/qnode_p.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3D {
+
+class QKeyboardController;
+
+class QKeyboardControllerPrivate : public QNodePrivate
+{
+public:
+ QKeyboardControllerPrivate(QKeyboardController *qq);
+
+ Q_DECLARE_PUBLIC(QKeyboardController)
+};
+
+} // Qt3D
+
+QT_END_NAMESPACE
+
+#endif // QT3D_INPUT_QKEYBOARDCONTROLLER_P_H