diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-06-11 13:23:22 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2015-06-11 14:44:06 +0000 |
commit | 57f11fe309969665ddebafa3b770263d2d82fa93 (patch) | |
tree | 484fc5696c51acac5577d8d3b089826bdf7a940a /src | |
parent | b21dfb2db3b48192e05dfdca9fdb85ed4bca02f2 (diff) |
Move temporary window class to examples
So as to avoid public header without a QPrefix. Real integration
points will be added later.
Also removed it from the Qt3D namespace and fixed linkage.
Task-number: QTBUG-46617
Change-Id: I1bea09f45f5fdba3d658b57b86b907ab57164479
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/core.pri | 2 | ||||
-rw-r--r-- | src/core/window.cpp | 92 | ||||
-rw-r--r-- | src/core/window.h | 62 |
3 files changed, 0 insertions, 156 deletions
diff --git a/src/core/core.pri b/src/core/core.pri index 32bd30bc9..fc533627a 100644 --- a/src/core/core.pri +++ b/src/core/core.pri @@ -21,7 +21,6 @@ include (./services/services.pri) HEADERS += \ $$PWD/qt3dcore_global.h \ - $$PWD/window.h \ $$PWD/qtickclock_p.h \ $$PWD/qscheduler_p.h \ $$PWD/corelogging_p.h \ @@ -44,7 +43,6 @@ HEADERS += \ $$PWD/qt3dcore_global_p.h SOURCES += \ - $$PWD/window.cpp \ $$PWD/qtickclock.cpp \ $$PWD/qscheduler.cpp \ $$PWD/qchangearbiter.cpp \ diff --git a/src/core/window.cpp b/src/core/window.cpp deleted file mode 100644 index 9a71b6f7b..000000000 --- a/src/core/window.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** 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: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$ -** -****************************************************************************/ - -#include "window.h" - -#include <QKeyEvent> -#include <QMouseEvent> -#include <QGuiApplication> -#include <QOpenGLContext> - -#include "qnode.h" -#include "qcamera.h" -#include "qentity.h" -#include "qaspectengine.h" -#include <Qt3DCore/private/corelogging_p.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3D { - -Window::Window(QScreen *screen) - : QWindow(screen) - -{ - setSurfaceType(QSurface::OpenGLSurface); - - resize(1024, 768); - - QSurfaceFormat format; - if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) { - format.setVersion(4, 3); - format.setProfile(QSurfaceFormat::CoreProfile); - } - format.setDepthBufferSize( 24 ); - format.setSamples( 4 ); - setFormat(format); - create(); -} - -Window::~Window() -{ -} - -void Window::keyPressEvent( QKeyEvent* e ) -{ - switch ( e->key() ) - { - case Qt::Key_Escape: - QGuiApplication::quit(); - break; - - default: - QWindow::keyPressEvent( e ); - } -} - -} // namespace Qt3D - -QT_END_NAMESPACE diff --git a/src/core/window.h b/src/core/window.h deleted file mode 100644 index 3b7a7c990..000000000 --- a/src/core/window.h +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** 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: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 QT3D_WINDOW_H -#define QT3D_WINDOW_H - -#include <QWindow> -#include <Qt3DCore/qt3dcore_global.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3D { - -class QT3DCORESHARED_EXPORT Window : public QWindow -{ - Q_OBJECT -public: - explicit Window(QScreen *screen = 0); - ~Window(); - -protected: - virtual void keyPressEvent(QKeyEvent *e); -}; - -} // namespace Qt3D - -QT_END_NAMESPACE - -#endif // QT3D_WINDOW_H |