diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-10-30 13:18:04 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-11-16 09:16:39 +0000 |
commit | 0b7837bc490487809607b8c752162d2ef5bf0245 (patch) | |
tree | 7531ff0684f1dfbc561cb8a95c29244667fb62d2 /src/input | |
parent | eef24ef738dda1a8c703f7b324c22a084140d64c (diff) |
Qt3DInput : add QAbstractInputDevice
Will be used to allow having input devices plugins within the Qt3DInput aspect
Change-Id: I58c446270c0cb52b14e609949a204e557138f947
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input.pri | 3 | ||||
-rw-r--r-- | src/input/qabstractinputdevice.h | 66 |
2 files changed, 68 insertions, 1 deletions
diff --git a/src/input/input.pri b/src/input/input.pri index 0c0a62d8b..b730a4d2b 100644 --- a/src/input/input.pri +++ b/src/input/input.pri @@ -23,7 +23,8 @@ HEADERS += \ $$PWD/mousecontroller_p.h \ $$PWD/mouseinput_p.h \ $$PWD/mouseeventdispatcherjob_p.h \ - $$PWD/mouseeventfilter_p.h + $$PWD/mouseeventfilter_p.h \ + $$PWD/qabstractinputdevice.h SOURCES += \ $$PWD/cameracontroller.cpp \ diff --git a/src/input/qabstractinputdevice.h b/src/input/qabstractinputdevice.h new file mode 100644 index 000000000..ea0231e93 --- /dev/null +++ b/src/input/qabstractinputdevice.h @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2015 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:LGPL3$ +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/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 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later 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 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QT3DINPUT_QABSTRACTINPUTDEVICE +#define QT3DINPUT_QABSTRACTINPUTDEVICE + +#include <Qt3DInput/qt3dinput_global.h> +#include <Qt3DCore/qaspectjob.h> +#include <QObject> + +QT_BEGIN_NAMESPACE + +namespace Qt3DInput { + +class QInputAspect; + +class QT3DINPUTSHARED_EXPORT QAbstractInputDevice +{ +public: + virtual ~QAbstractInputDevice() {} + virtual void initialize(Qt3DInput::QInputAspect *aspect) = 0; + virtual QVector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) = 0; +}; + +} // Qt3DInput + +Q_DECLARE_INTERFACE(Qt3DInput::QAbstractInputDevice, "Qt3DInput.QAbstractInputDevice/1.0") + +QT_END_NAMESPACE + + +#endif // QT3DINPUT_QABSTRACTINPUTDEVICE + |