diff options
Diffstat (limited to 'examples/datavisualization/customitems')
4 files changed, 76 insertions, 36 deletions
diff --git a/examples/datavisualization/customitems/customitemgraph.cpp b/examples/datavisualization/customitems/customitemgraph.cpp index 1294f2d8..512f059e 100644 --- a/examples/datavisualization/customitems/customitemgraph.cpp +++ b/examples/datavisualization/customitems/customitemgraph.cpp @@ -1,23 +1,31 @@ -/****************************************************************************** +/**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** -** This file is part of the Qt Data Visualization module. -** -** $QT_BEGIN_LICENSE:COMM$ +** This file is part of the Qt Data Visualization module of the Qt Toolkit. ** +** $QT_BEGIN_LICENSE:GPL$ ** 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. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** -******************************************************************************/ +****************************************************************************/ #include "customitemgraph.h" diff --git a/examples/datavisualization/customitems/customitemgraph.h b/examples/datavisualization/customitems/customitemgraph.h index 2874312c..2b977817 100644 --- a/examples/datavisualization/customitems/customitemgraph.h +++ b/examples/datavisualization/customitems/customitemgraph.h @@ -1,23 +1,31 @@ -/****************************************************************************** +/**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** -** This file is part of the Qt Data Visualization module. -** -** $QT_BEGIN_LICENSE:COMM$ +** This file is part of the Qt Data Visualization module of the Qt Toolkit. ** +** $QT_BEGIN_LICENSE:GPL$ ** 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. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** -******************************************************************************/ +****************************************************************************/ #ifndef CUSTOMITEMGRAPH_H #define CUSTOMITEMGRAPH_H diff --git a/examples/datavisualization/customitems/doc/src/customitems.qdoc b/examples/datavisualization/customitems/doc/src/customitems.qdoc index 4d0c377f..80dd73a9 100644 --- a/examples/datavisualization/customitems/doc/src/customitems.qdoc +++ b/examples/datavisualization/customitems/doc/src/customitems.qdoc @@ -1,23 +1,31 @@ -/****************************************************************************** +/**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** -** This file is part of the Qt Data Visualization module. -** -** $QT_BEGIN_LICENSE:COMM$ +** This file is part of the Qt Data Visualization module of the Qt Toolkit. ** +** $QT_BEGIN_LICENSE:GPL$ ** 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. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** -******************************************************************************/ +****************************************************************************/ /*! \example customitems diff --git a/examples/datavisualization/customitems/main.cpp b/examples/datavisualization/customitems/main.cpp index 1e96a64a..2261cf54 100644 --- a/examples/datavisualization/customitems/main.cpp +++ b/examples/datavisualization/customitems/main.cpp @@ -1,23 +1,31 @@ -/****************************************************************************** +/**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** -** This file is part of the Qt Data Visualization module. -** -** $QT_BEGIN_LICENSE:COMM$ +** This file is part of the Qt Data Visualization module of the Qt Toolkit. ** +** $QT_BEGIN_LICENSE:GPL$ ** 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. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** -******************************************************************************/ +****************************************************************************/ #include "customitemgraph.h" @@ -27,6 +35,7 @@ #include <QtWidgets/QVBoxLayout> #include <QtWidgets/QCheckBox> #include <QtWidgets/QLabel> +#include <QtWidgets/QMessageBox> int main(int argc, char **argv) { @@ -34,6 +43,13 @@ int main(int argc, char **argv) Q3DSurface *graph = new Q3DSurface(); QWidget *container = QWidget::createWindowContainer(graph); + if (!graph->hasContext()) { + QMessageBox msgBox; + msgBox.setText("Couldn't initialize the OpenGL context."); + msgBox.exec(); + return -1; + } + container->setMinimumSize(QSize(800, 600)); container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); container->setFocusPolicy(Qt::StrongFocus); |