diff options
-rw-r--r-- | src/input/input.pri | 7 | ||||
-rw-r--r-- | src/input/input.pro | 14 | ||||
-rw-r--r-- | src/input/qinputaspect.cpp | 87 | ||||
-rw-r--r-- | src/input/qinputaspect.h | 73 | ||||
-rw-r--r-- | src/input/qt3dinput_global.h | 57 | ||||
-rw-r--r-- | src/src.pro | 4 | ||||
-rw-r--r-- | sync.profile | 1 |
7 files changed, 243 insertions, 0 deletions
diff --git a/src/input/input.pri b/src/input/input.pri new file mode 100644 index 000000000..8a2c8671b --- /dev/null +++ b/src/input/input.pri @@ -0,0 +1,7 @@ +HEADERS += \ + $$PWD/qinputaspect.h + +SOURCES += \ + $$PWD/qinputaspect.cpp + +INCLUDEPATH += $$PWD diff --git a/src/input/input.pro b/src/input/input.pro new file mode 100644 index 000000000..42b5e389f --- /dev/null +++ b/src/input/input.pro @@ -0,0 +1,14 @@ +TARGET = Qt3DInput + +QT += core 3dcore 3dcore-private 3drenderer + +DEFINES += QT3DINPUT_LIBRARY + +MODULE = 3dinput + +load(qt_module) + +include(input.pri) + +HEADERS += \ + qt3dinput_global.h diff --git a/src/input/qinputaspect.cpp b/src/input/qinputaspect.cpp new file mode 100644 index 000000000..220cf6681 --- /dev/null +++ b/src/input/qinputaspect.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** 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 "qinputaspect.h" + +QT_BEGIN_NAMESPACE + +namespace Qt3D { + +QInputAspect::QInputAspect(QObject *parent) + : QAbstractAspect(QAbstractAspect::AspectOther, parent) +{ +} + +QVector<QAspectJobPtr> QInputAspect::jobsToExecute() +{ + QVector<QAspectJobPtr> jobs; + + return jobs; +} + +void QInputAspect::sceneNodeAdded(QSceneChangePtr &e) +{ + +} + +void QInputAspect::sceneNodeRemoved(QSceneChangePtr &e) +{ + +} + +void QInputAspect::setRootEntity(QEntity *rootObject) +{ + +} + +void QInputAspect::onInitialize(QSurface *surface) +{ + +} + +void QInputAspect::onCleanup() +{ + +} + +} // Qt3D + +QT_END_NAMESPACE diff --git a/src/input/qinputaspect.h b/src/input/qinputaspect.h new file mode 100644 index 000000000..c3b6d615c --- /dev/null +++ b/src/input/qinputaspect.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** 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_QINPUTASPECT_H +#define QT3D_QINPUTASPECT_H + +#include <Qt3DInput/qt3dinput_global.h> +#include <Qt3DCore/qabstractaspect.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3D { + +class QT3DINPUTSHARED_EXPORT QInputAspect : public QAbstractAspect +{ + Q_OBJECT +public: + explicit QInputAspect(QObject *parent = 0); + + QVector<QAspectJobPtr> jobsToExecute() Q_DECL_OVERRIDE; + + void sceneNodeAdded(QSceneChangePtr &e) Q_DECL_OVERRIDE; + void sceneNodeRemoved(QSceneChangePtr &e) Q_DECL_OVERRIDE; + +private: + void setRootEntity(QEntity *rootObject) Q_DECL_OVERRIDE; + void onInitialize(QSurface *surface) Q_DECL_OVERRIDE; + void onCleanup() Q_DECL_OVERRIDE; +}; + +} // Qt3D + +QT_END_NAMESPACE + +#endif // QT3D_QINPUTASPECT_H diff --git a/src/input/qt3dinput_global.h b/src/input/qt3dinput_global.h new file mode 100644 index 000000000..b9ae5fd70 --- /dev/null +++ b/src/input/qt3dinput_global.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** 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 QT3DINPUT_GLOBAL_H +#define QT3DINPUT_GLOBAL_H + +#include <QtCore/qglobal.h> + +QT_BEGIN_NAMESPACE + +#if defined(QT3DINPUT_LIBRARY) +# define QT3DINPUTSHARED_EXPORT Q_DECL_EXPORT +#else +# define QT3DINPUTSHARED_EXPORT Q_DECL_IMPORT +#endif + +QT_END_NAMESPACE + +#endif // QT3DINPUT_GLOBAL_H diff --git a/src/src.pro b/src/src.pro index 366aff144..99da4feb9 100644 --- a/src/src.pro +++ b/src/src.pro @@ -15,6 +15,9 @@ src_openal.subdir = $$PWD/openal src_openal.target = sub-openal src_openal.depends = src_core +src_input.subdir = $$PWD/input +src_input.target = sub-input +src_input.depends = src_render # Quick3D libs src_quick3d_core.subdir = $$PWD/quick3d/quick3d @@ -47,6 +50,7 @@ src_plugins_sceneparsers.depends = src_render SUBDIRS += \ src_core \ src_render \ + src_input \ src_openal \ src_quick3d_core \ src_quick3d_core_imports \ diff --git a/sync.profile b/sync.profile index aeee97f95..a2d2041e5 100644 --- a/sync.profile +++ b/sync.profile @@ -6,6 +6,7 @@ "Qt3DOpenAL" => "$basedir/src/openal", "Qt3DBulletPhysics" => "$basedir/src/bulletphysics", "Qt3DQuickBulletPhysics" => "$basedir/src/quick3d/quick3dbulletphysics", + "Qt3DInput" => "$basedir/src/input", ); %moduleheaders = ( # restrict the module headers to those found in relative path ); |