diff options
Diffstat (limited to 'tests/manual')
76 files changed, 549 insertions, 1581 deletions
diff --git a/tests/manual/CMakeLists.txt b/tests/manual/CMakeLists.txt index 922fe921..32112c6b 100644 --- a/tests/manual/CMakeLists.txt +++ b/tests/manual/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + if(TARGET Qt::Quick) add_subdirectory(qmldynamicdata) add_subdirectory(qmlmultitest) diff --git a/tests/manual/barstest/CMakeLists.txt b/tests/manual/barstest/CMakeLists.txt index 8c4c9295..391b98aa 100644 --- a/tests/manual/barstest/CMakeLists.txt +++ b/tests/manual/barstest/CMakeLists.txt @@ -1,14 +1,18 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(barstest GUI SOURCES chart.cpp chart.h + sliderwrapper.cpp sliderwrapper.h + buttonwrapper.cpp buttonwrapper.h custominputhandler.cpp custominputhandler.h main.cpp + NO_PCH_SOURCES + chart.cpp # undef QT_NO_FOREACH ) target_link_libraries(barstest PUBLIC Qt::Gui diff --git a/tests/manual/barstest/buttonwrapper.cpp b/tests/manual/barstest/buttonwrapper.cpp new file mode 100644 index 00000000..c8eef0c7 --- /dev/null +++ b/tests/manual/barstest/buttonwrapper.cpp @@ -0,0 +1,14 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#include "buttonwrapper.h" +#include <QPushButton> + +ButtonWrapper::ButtonWrapper(QPushButton *button) +{ + m_button = button; +} + +void ButtonWrapper::setEnabled(int state) +{ + m_button->setEnabled(state); +} diff --git a/tests/manual/barstest/buttonwrapper.h b/tests/manual/barstest/buttonwrapper.h new file mode 100644 index 00000000..d0112117 --- /dev/null +++ b/tests/manual/barstest/buttonwrapper.h @@ -0,0 +1,22 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#ifndef BUTTONWRAPPER_H +#define BUTTONWRAPPER_H + +#include <QObject> +class QPushButton; + +class ButtonWrapper : public QObject +{ + Q_OBJECT +public: + ButtonWrapper(QPushButton *button); + +public Q_SLOTS: + void setEnabled(int state); + +private: + QPushButton *m_button; +}; + +#endif // BUTTONWRAPPER_H diff --git a/tests/manual/barstest/chart.cpp b/tests/manual/barstest/chart.cpp index 4f006024..d427921a 100644 --- a/tests/manual/barstest/chart.cpp +++ b/tests/manual/barstest/chart.cpp @@ -1,31 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses #include "chart.h" #include "custominputhandler.h" @@ -268,7 +244,7 @@ void GraphModifier::start() restart(false); } -void GraphModifier::restart(bool dynamicData) +void GraphModifier::restart(int dynamicData) { m_static = !dynamicData; @@ -343,7 +319,7 @@ void GraphModifier::releaseSeries() m_graph->removeSeries(series); } -void GraphModifier::flipViews() +void GraphModifier::flipViews(bool checked) { m_graph->scene()->setSecondarySubviewOnTop(!m_graph->scene()->isSecondarySubviewOnTop()); qDebug() << "secondary subview on top:" << m_graph->scene()->isSecondarySubviewOnTop(); @@ -735,7 +711,7 @@ void GraphModifier::handleSelectionChange(const QPoint &position) qDebug() << "Selected bar position:" << position << "series:" << index; } -void GraphModifier::setUseNullInputHandler(bool useNull) +void GraphModifier::setUseNullInputHandler(int useNull) { qDebug() << "setUseNullInputHandler" << useNull; if (m_useNullInputHandler == useNull) @@ -828,7 +804,7 @@ QBarDataArray *GraphModifier::makeDummyData() } // Executes one step of the primary series test -void GraphModifier::primarySeriesTest() +void GraphModifier::primarySeriesTest(bool checked) { static int nextStep = 0; @@ -1050,7 +1026,7 @@ void GraphModifier::insertRemoveTestToggle() } } -void GraphModifier::toggleRotation() +void GraphModifier::toggleRotation(bool checked) { if (m_rotationTimer.isActive()) m_rotationTimer.stop(); @@ -1058,7 +1034,7 @@ void GraphModifier::toggleRotation() m_rotationTimer.start(20); } -void GraphModifier::useLogAxis() +void GraphModifier::useLogAxis(bool checked) { static int counter = -1; static QLogValue3DAxisFormatter *logFormatter = 0; @@ -1214,7 +1190,7 @@ void GraphModifier::addRemoveSeries() counter++; } -void GraphModifier::testItemAndRowChanges() +void GraphModifier::testItemAndRowChanges(bool checked) { static int counter = 0; const int rowCount = 12; @@ -1604,7 +1580,7 @@ void GraphModifier::rotateY(int rotation) m_graph->scene()->activeCamera()->setCameraPosition(m_xRotation, m_yRotation); } -void GraphModifier::setFpsMeasurement(bool enable) +void GraphModifier::setFpsMeasurement(int enable) { m_graph->setMeasureFps(enable); } @@ -1673,7 +1649,7 @@ void GraphModifier::setMaxY(int max) m_maxval = max; } -void GraphModifier::changeColorStyle() +void GraphModifier::changeColorStyle(bool checked) { int style = m_graph->activeTheme()->colorStyle(); @@ -1683,7 +1659,7 @@ void GraphModifier::changeColorStyle() m_graph->activeTheme()->setColorStyle(Q3DTheme::ColorStyle(style)); } -void GraphModifier::useOwnTheme() +void GraphModifier::useOwnTheme(bool checked) { // Own theme is persistent, any changes to it via UI will be remembered if (!m_ownTheme) { @@ -1722,7 +1698,7 @@ void GraphModifier::changeBaseColor(const QColor &color) m_graph->activeTheme()->setBaseColors(colors); } -void GraphModifier::setGradient() +void GraphModifier::setGradient(bool checked) { QLinearGradient barGradient(0, 0, 1, 100); barGradient.setColorAt(1.0, Qt::lightGray); @@ -1762,7 +1738,7 @@ void GraphModifier::toggleMultiseriesScaling() m_graph->setMultiSeriesUniform(!m_graph->isMultiSeriesUniform()); } -void GraphModifier::setReflection(bool enabled) +void GraphModifier::setReflection(int enabled) { m_graph->setReflection(enabled); } diff --git a/tests/manual/barstest/chart.h b/tests/manual/barstest/chart.h index dabaa5e2..ae72318e 100644 --- a/tests/manual/barstest/chart.h +++ b/tests/manual/barstest/chart.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef CHARTMODIFIER_H #define CHARTMODIFIER_H @@ -68,7 +42,7 @@ public: void changeFontSize(int fontsize); void rotateX(int rotation); void rotateY(int rotation); - void setFpsMeasurement(bool enable); + void setFpsMeasurement(int state); void setBackgroundEnabled(int enabled); void setGridEnabled(int enabled); void setSpecsRatio(int barwidth); @@ -84,43 +58,43 @@ public: void setMinY(int min); void setMaxY(int max); void start(); - void restart(bool dynamicData); + void restart(int dynamicData); void selectBar(); void swapAxis(); void releaseAxes(); void releaseSeries(); void createMassiveArray(); - void useOwnTheme(); + void useOwnTheme(bool checked); void changeBaseColor(const QColor &color); - void changeColorStyle(); + void changeColorStyle(bool checked); void showFiveSeries(); QBarDataArray *makeDummyData(); - void primarySeriesTest(); + void primarySeriesTest(bool checked); void insertRemoveTestToggle(); - void toggleRotation(); - void useLogAxis(); + void toggleRotation(bool checked); + void useLogAxis(bool checked); void changeValueAxisFormat(const QString & text); void changeLogBase(const QString & text); void setFpsLabel(QLabel *fpsLabel) { m_fpsLabel = fpsLabel; } void addRemoveSeries(); - void testItemAndRowChanges(); + void testItemAndRowChanges(bool checked); void reverseValueAxis(int enabled); void setInputHandlerRotationEnabled(int enabled); void setInputHandlerZoomEnabled(int enabled); void setInputHandlerSelectionEnabled(int enabled); void setInputHandlerZoomAtTargetEnabled(int enabled); - void setReflection(bool enabled); + void setReflection(int enabled); void setReflectivity(int value); void toggleCustomItem(); public Q_SLOTS: - void flipViews(); - void setGradient(); + void flipViews(bool checked); + void setGradient(bool checked); void toggleMultiseriesScaling(); void changeShadowQuality(int quality); void shadowQualityUpdatedByVisual(QAbstract3DGraph::ShadowQuality shadowQuality); void handleSelectionChange(const QPoint &position); - void setUseNullInputHandler(bool useNull); + void setUseNullInputHandler(int useNull); void changeValueAxisSegments(int value); void handleRowAxisChanged(QCategory3DAxis *axis); @@ -152,7 +126,7 @@ private: int m_rowCount; float m_xRotation; float m_yRotation; - bool m_static; + int m_static; float m_barSpacingX; float m_barSpacingZ; float m_barSeriesMarginX; diff --git a/tests/manual/barstest/custominputhandler.cpp b/tests/manual/barstest/custominputhandler.cpp index e6fe9aa5..2740fddb 100644 --- a/tests/manual/barstest/custominputhandler.cpp +++ b/tests/manual/barstest/custominputhandler.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "custominputhandler.h" diff --git a/tests/manual/barstest/custominputhandler.h b/tests/manual/barstest/custominputhandler.h index 62b87d31..ee762cee 100644 --- a/tests/manual/barstest/custominputhandler.h +++ b/tests/manual/barstest/custominputhandler.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef CUSTOMINPUTHANDLER_H #define CUSTOMINPUTHANDLER_H diff --git a/tests/manual/barstest/main.cpp b/tests/manual/barstest/main.cpp index 1b14d08d..178b91f3 100644 --- a/tests/manual/barstest/main.cpp +++ b/tests/manual/barstest/main.cpp @@ -1,33 +1,9 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "chart.h" +#include "sliderwrapper.h" +#include "buttonwrapper.h" #include <QApplication> #include <QWidget> @@ -613,12 +589,14 @@ int main(int argc, char **argv) QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, modifier, &GraphModifier::setUseNullInputHandler); - QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderX, - &QSlider::setEnabled); + SliderWrapper *rotationSliderWrapperX = new SliderWrapper(rotationSliderX); + SliderWrapper *rotationSliderWrapperY = new SliderWrapper(rotationSliderY); + QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderWrapperX, + &SliderWrapper::setEnabled); QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderX, &QSlider::setValue); - QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderY, - &QSlider::setEnabled); + QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderWrapperY, + &SliderWrapper::setEnabled); QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderY, &QSlider::setValue); @@ -633,40 +611,59 @@ int main(int argc, char **argv) QObject::connect(toggleCustomItemButton, &QPushButton::clicked, modifier, &GraphModifier::toggleCustomItem); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, addDataButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, addMultiDataButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, insertDataButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, insertMultiDataButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeSingleDataButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeRowButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeRowsButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, removeRowButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, removeRowsButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, massiveArrayButton, - &QPushButton::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, sampleSliderX, - &QSlider::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, sampleSliderZ, - &QSlider::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderX, - &QSlider::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderZ, - &QSlider::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderY, - &QSlider::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, maxSliderY, - &QSlider::setEnabled); - QObject::connect(staticCheckBox, &QCheckBox::stateChanged, swapAxisButton, - &QSlider::setEnabled); + ButtonWrapper *addDataButtonWrapper = new ButtonWrapper(addDataButton); + ButtonWrapper *addMultiDataButtonWrapper = new ButtonWrapper(addMultiDataButton); + ButtonWrapper *insertDataButtonWrapper = new ButtonWrapper(insertDataButton); + ButtonWrapper *insertMultiDataButtonWrapper = new ButtonWrapper(insertMultiDataButton); + ButtonWrapper *changeSingleDataButtonWrapper = new ButtonWrapper(changeSingleDataButton); + ButtonWrapper *changeRowButtonWrapper = new ButtonWrapper(changeRowButton); + ButtonWrapper *changeRowsButtonWrapper = new ButtonWrapper(changeRowsButton); + ButtonWrapper *massiveArrayButtonWrapper = new ButtonWrapper(massiveArrayButton); + ButtonWrapper *removeRowButtonWrapper = new ButtonWrapper(removeRowButton); + ButtonWrapper *removeRowsButtonWrapper = new ButtonWrapper(removeRowsButton); + + SliderWrapper *sampleSliderWrapperX = new SliderWrapper(sampleSliderX); + SliderWrapper *sampleSliderWrapperZ = new SliderWrapper(sampleSliderZ); + SliderWrapper *minSliderWrapperX = new SliderWrapper(minSliderX); + SliderWrapper *minSliderWrapperZ = new SliderWrapper(minSliderZ); + SliderWrapper *minSliderWrapperY = new SliderWrapper(minSliderY); + SliderWrapper *maxSliderWrapperY = new SliderWrapper(maxSliderY); + ButtonWrapper *swapAxisButtonWrapper = new ButtonWrapper(swapAxisButton); + + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, addDataButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, addMultiDataButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, insertDataButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, insertMultiDataButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeSingleDataButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeRowButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeRowsButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, removeRowButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, removeRowsButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, massiveArrayButtonWrapper, + &ButtonWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, sampleSliderWrapperX, + &SliderWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, sampleSliderWrapperZ, + &SliderWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderWrapperX, + &SliderWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderWrapperZ, + &SliderWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderWrapperY, + &SliderWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, maxSliderWrapperY, + &SliderWrapper::setEnabled); + QObject::connect(staticCheckBox, &QCheckBox::stateChanged, swapAxisButtonWrapper, + &ButtonWrapper::setEnabled); QObject::connect(staticCheckBox, &QCheckBox::stateChanged, modifier, &GraphModifier::restart); modifier->setFpsLabel(fpsLabel); diff --git a/tests/manual/barstest/sliderwrapper.cpp b/tests/manual/barstest/sliderwrapper.cpp new file mode 100644 index 00000000..bdfeb4f7 --- /dev/null +++ b/tests/manual/barstest/sliderwrapper.cpp @@ -0,0 +1,13 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#include "sliderwrapper.h" + +SliderWrapper::SliderWrapper(QSlider *slider) +{ + m_slider = slider; +} + +void SliderWrapper::setEnabled(int enabled) +{ + m_slider->setEnabled(enabled); +} diff --git a/tests/manual/barstest/sliderwrapper.h b/tests/manual/barstest/sliderwrapper.h new file mode 100644 index 00000000..f6d9404a --- /dev/null +++ b/tests/manual/barstest/sliderwrapper.h @@ -0,0 +1,23 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#ifndef SLIDERWRAPPER_H +#define SLIDERWRAPPER_H +#include <QObject> +#include <QSlider> + +class SliderWrapper : public QObject +{ + Q_OBJECT + +public: + explicit SliderWrapper(QSlider *slider); + +public Q_SLOTS: + void setEnabled(int enabled); + +private: + QSlider *m_slider = nullptr; + +}; + +#endif // SLIDERWRAPPER_H diff --git a/tests/manual/directional/CMakeLists.txt b/tests/manual/directional/CMakeLists.txt index c1bd2798..43b961e0 100644 --- a/tests/manual/directional/CMakeLists.txt +++ b/tests/manual/directional/CMakeLists.txt @@ -1,7 +1,7 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(directional GUI diff --git a/tests/manual/directional/main.cpp b/tests/manual/directional/main.cpp index 06bf137f..66b80d40 100644 --- a/tests/manual/directional/main.cpp +++ b/tests/manual/directional/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "scatterdatamodifier.h" diff --git a/tests/manual/directional/scatterdatamodifier.cpp b/tests/manual/directional/scatterdatamodifier.cpp index 6968920c..b537a8a2 100644 --- a/tests/manual/directional/scatterdatamodifier.cpp +++ b/tests/manual/directional/scatterdatamodifier.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "scatterdatamodifier.h" #include <QtDataVisualization/qscatterdataproxy.h> diff --git a/tests/manual/directional/scatterdatamodifier.h b/tests/manual/directional/scatterdatamodifier.h index 3120b6f6..c794d17c 100644 --- a/tests/manual/directional/scatterdatamodifier.h +++ b/tests/manual/directional/scatterdatamodifier.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SCATTERDATAMODIFIER_H #define SCATTERDATAMODIFIER_H diff --git a/tests/manual/galaxy/CMakeLists.txt b/tests/manual/galaxy/CMakeLists.txt index 1a530dae..f089ed7d 100644 --- a/tests/manual/galaxy/CMakeLists.txt +++ b/tests/manual/galaxy/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) qt_add_executable(galaxy cumulativedistributor.cpp cumulativedistributor.h diff --git a/tests/manual/galaxy/cumulativedistributor.cpp b/tests/manual/galaxy/cumulativedistributor.cpp index 4506480c..961583ff 100644 --- a/tests/manual/galaxy/cumulativedistributor.cpp +++ b/tests/manual/galaxy/cumulativedistributor.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only /* * Galaxy creation code obtained from http://beltoforion.de/galaxy/galaxy_en.html diff --git a/tests/manual/galaxy/cumulativedistributor.h b/tests/manual/galaxy/cumulativedistributor.h index 56276e98..60c48ccc 100644 --- a/tests/manual/galaxy/cumulativedistributor.h +++ b/tests/manual/galaxy/cumulativedistributor.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only /* * Galaxy creation code obtained from http://beltoforion.de/galaxy/galaxy_en.html diff --git a/tests/manual/galaxy/galaxydata.cpp b/tests/manual/galaxy/galaxydata.cpp index c49e07fd..73ccf9c5 100644 --- a/tests/manual/galaxy/galaxydata.cpp +++ b/tests/manual/galaxy/galaxydata.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only /* * Galaxy creation code obtained from http://beltoforion.de/galaxy/galaxy_en.html diff --git a/tests/manual/galaxy/galaxydata.h b/tests/manual/galaxy/galaxydata.h index e01db67b..6127482e 100644 --- a/tests/manual/galaxy/galaxydata.h +++ b/tests/manual/galaxy/galaxydata.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SCATTERDATAMODIFIER_H #define SCATTERDATAMODIFIER_H diff --git a/tests/manual/galaxy/main.cpp b/tests/manual/galaxy/main.cpp index 5fb7b0ca..a0cbda52 100644 --- a/tests/manual/galaxy/main.cpp +++ b/tests/manual/galaxy/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "galaxydata.h" diff --git a/tests/manual/galaxy/star.cpp b/tests/manual/galaxy/star.cpp index ca6b66f0..5b639125 100644 --- a/tests/manual/galaxy/star.cpp +++ b/tests/manual/galaxy/star.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "star.h" diff --git a/tests/manual/galaxy/star.h b/tests/manual/galaxy/star.h index 9c5dc1ac..045a9702 100644 --- a/tests/manual/galaxy/star.h +++ b/tests/manual/galaxy/star.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef STAR_H #define STAR_H diff --git a/tests/manual/itemmodeltest/CMakeLists.txt b/tests/manual/itemmodeltest/CMakeLists.txt index 7b5faf60..8fee8d00 100644 --- a/tests/manual/itemmodeltest/CMakeLists.txt +++ b/tests/manual/itemmodeltest/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + qt_internal_add_manual_test(itemmodeltest GUI SOURCES diff --git a/tests/manual/itemmodeltest/main.cpp b/tests/manual/itemmodeltest/main.cpp index a9a7f357..feebd1b1 100644 --- a/tests/manual/itemmodeltest/main.cpp +++ b/tests/manual/itemmodeltest/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtDataVisualization/q3dbars.h> #include <QtDataVisualization/q3dsurface.h> @@ -234,8 +208,8 @@ void GraphDataGenerator::changeSelectedButtonClicked() { // Change all selected cells to a random value 1-10 QVariant value = QVariant::fromValue(QRandomGenerator::global()->bounded(10.0) + 1); - QList<QTableWidgetItem *> selectedItems = m_tableWidget->selectedItems(); - foreach (QTableWidgetItem *item, selectedItems) { + const QList<QTableWidgetItem *> selectedItems = m_tableWidget->selectedItems(); + for (QTableWidgetItem *item : selectedItems) { QString oldData = item->data(Qt::DisplayRole).toString(); item->setData(Qt::DisplayRole, oldData.left(5) @@ -292,7 +266,7 @@ int main(int argc, char **argv) barProxy->setValueRoleReplace(QStringLiteral("\\4")); barProxy->setRotationRoleReplace(QStringLiteral("\\5")); surfaceProxy->setXPosRole(tableWidget->model()->roleNames().value(Qt::DisplayRole)); - surfaceProxy->setZPosRole(tableWidget->model()->roleNames().value(Qt::DisplayRole)); + surfaceProxy->setYPosRole(tableWidget->model()->roleNames().value(Qt::DisplayRole)); surfaceProxy->setXPosRolePattern(QRegularExpression(QStringLiteral("^(\\d*)\\/(\\d*)\\/\\d*[\\.\\,]?\\d*\\/\\d*[\\.\\,]?\\d*$"))); surfaceProxy->setXPosRoleReplace(QStringLiteral("\\2")); surfaceProxy->setYPosRolePattern(QRegularExpression(QStringLiteral("^\\d*(\\/)(\\d*)\\/(\\d*[\\.\\,]?\\d*)\\/\\d*[\\.\\,]?\\d*$"))); diff --git a/tests/manual/minimalbars/CMakeLists.txt b/tests/manual/minimalbars/CMakeLists.txt index 9f72f667..50ae8a61 100644 --- a/tests/manual/minimalbars/CMakeLists.txt +++ b/tests/manual/minimalbars/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + qt_internal_add_manual_test(MinimalBars GUI SOURCES diff --git a/tests/manual/minimalscatter/CMakeLists.txt b/tests/manual/minimalscatter/CMakeLists.txt index a1cdcc39..5f9c07ae 100644 --- a/tests/manual/minimalscatter/CMakeLists.txt +++ b/tests/manual/minimalscatter/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + qt_internal_add_manual_test(MinimalScatter GUI SOURCES diff --git a/tests/manual/minimalsurface/CMakeLists.txt b/tests/manual/minimalsurface/CMakeLists.txt index a8ca7275..39c3b04d 100644 --- a/tests/manual/minimalsurface/CMakeLists.txt +++ b/tests/manual/minimalsurface/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + qt_internal_add_manual_test(MinimalSurface GUI SOURCES diff --git a/tests/manual/multigraphs/CMakeLists.txt b/tests/manual/multigraphs/CMakeLists.txt index fdb9e08b..8e6da82a 100644 --- a/tests/manual/multigraphs/CMakeLists.txt +++ b/tests/manual/multigraphs/CMakeLists.txt @@ -1,7 +1,7 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(multigraphs GUI diff --git a/tests/manual/multigraphs/data.cpp b/tests/manual/multigraphs/data.cpp index f5f855cd..b46c6a0d 100644 --- a/tests/manual/multigraphs/data.cpp +++ b/tests/manual/multigraphs/data.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #define NOMINMAX diff --git a/tests/manual/multigraphs/data.h b/tests/manual/multigraphs/data.h index fcd0f54f..a2c43452 100644 --- a/tests/manual/multigraphs/data.h +++ b/tests/manual/multigraphs/data.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef DATA_H #define DATA_H diff --git a/tests/manual/multigraphs/main.cpp b/tests/manual/multigraphs/main.cpp index 1597a2b9..b13dd2ce 100644 --- a/tests/manual/multigraphs/main.cpp +++ b/tests/manual/multigraphs/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "data.h" diff --git a/tests/manual/qmlbarsrowcolors/CMakeLists.txt b/tests/manual/qmlbarsrowcolors/CMakeLists.txt index bd8da958..62a2ed98 100644 --- a/tests/manual/qmlbarsrowcolors/CMakeLists.txt +++ b/tests/manual/qmlbarsrowcolors/CMakeLists.txt @@ -1,8 +1,7 @@ -set(CMAKE_INCLUDE_CURRENT_DIR ON) +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) qt_internal_add_manual_test(qmlbarsrowcolors GUI @@ -10,20 +9,6 @@ qt_internal_add_manual_test(qmlbarsrowcolors main.cpp ) -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Qml) -find_package(Qt6 COMPONENTS Quick) -find_package(Qt6 COMPONENTS DataVisualization) - -set_target_properties(qmlbarsrowcolors PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) -target_compile_definitions(qmlbarsrowcolors PUBLIC - QT_DISABLE_DEPRECATED_BEFORE=0x050F00 -) - target_link_libraries(qmlbarsrowcolors PUBLIC Qt::Core Qt::Gui @@ -44,9 +29,3 @@ qt6_add_resources(qmlbarsrowcolors "qmlbarsrowcolors" FILES ${qmlbarsrowcolors_resource_files} ) - -install(TARGETS qmlbarsrowcolors - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/tests/manual/qmlbarsrowcolors/main.cpp b/tests/manual/qmlbarsrowcolors/main.cpp index 25ed1447..83a1a78a 100644 --- a/tests/manual/qmlbarsrowcolors/main.cpp +++ b/tests/manual/qmlbarsrowcolors/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtGui/QGuiApplication> #include <QtCore/QDir> diff --git a/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/Axes.qml b/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/Axes.qml index e17ca521..0e021c34 100644 --- a/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/Axes.qml +++ b/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/Axes.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtDataVisualization diff --git a/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/Data.qml b/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/Data.qml index cabb6522..6eb27741 100644 --- a/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/Data.qml +++ b/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/Data.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtQml.Models diff --git a/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/main.qml b/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/main.qml index 0d72369b..2f15b453 100644 --- a/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/main.qml +++ b/tests/manual/qmlbarsrowcolors/qml/qmlbarsrowcolors/main.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtQuick.Controls diff --git a/tests/manual/qmldynamicdata/CMakeLists.txt b/tests/manual/qmldynamicdata/CMakeLists.txt index 4d051b5e..739ecd15 100644 --- a/tests/manual/qmldynamicdata/CMakeLists.txt +++ b/tests/manual/qmldynamicdata/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + qt_internal_add_manual_test(qmldynamicdata GUI SOURCES @@ -5,6 +8,8 @@ qt_internal_add_manual_test(qmldynamicdata ) target_link_libraries(qmldynamicdata PUBLIC Qt::Gui + Qt::Qml + Qt::Quick Qt::DataVisualization ) diff --git a/tests/manual/qmldynamicdata/main.cpp b/tests/manual/qmldynamicdata/main.cpp index 03bc1a37..6a416829 100644 --- a/tests/manual/qmldynamicdata/main.cpp +++ b/tests/manual/qmldynamicdata/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtGui/QGuiApplication> #include <QtCore/QDir> diff --git a/tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml b/tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml index 74ec5cb9..1d0e65bf 100644 --- a/tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml +++ b/tests/manual/qmldynamicdata/qml/qmldynamicdata/main.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtDataVisualization 1.2 @@ -155,12 +129,12 @@ Item { anchors.fill: parent hoverEnabled: true acceptedButtons: Qt.LeftButton | Qt.RightButton - property int mouseX: -1 - property int mouseY: -1 + property int mouseXPos: -1 + property int mouseYPos: -1 onPositionChanged: (mouse)=> { - mouseX = mouse.x; - mouseY = mouse.y; + mouseXPos = mouse.x; + mouseYPos = mouse.y; } onWheel: (wheel)=> { @@ -187,7 +161,8 @@ Item { running: true repeat: true onTriggered: { - scatterGraph.scene.selectionQueryPosition = Qt.point(inputArea.mouseX, inputArea.mouseY); + scatterGraph.scene.selectionQueryPosition = Qt.point(inputArea.mouseXPos, + inputArea.mouseYPos); } } } diff --git a/tests/manual/qmlgradient/CMakeLists.txt b/tests/manual/qmlgradient/CMakeLists.txt index d559e261..8288e1b2 100644 --- a/tests/manual/qmlgradient/CMakeLists.txt +++ b/tests/manual/qmlgradient/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + qt_internal_add_manual_test(qmlgradient GUI SOURCES @@ -5,6 +8,8 @@ qt_internal_add_manual_test(qmlgradient ) target_link_libraries(qmlgradient PUBLIC Qt::Gui + Qt::Qml + Qt::Quick Qt::DataVisualization ) diff --git a/tests/manual/qmlgradient/main.cpp b/tests/manual/qmlgradient/main.cpp index 48210ef2..b3a65f0f 100644 --- a/tests/manual/qmlgradient/main.cpp +++ b/tests/manual/qmlgradient/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtGui/QGuiApplication> #include <QtCore/QDir> diff --git a/tests/manual/qmlgradient/qml/qmlgradient/main.qml b/tests/manual/qmlgradient/qml/qmlgradient/main.qml index c692a72a..650dd087 100644 --- a/tests/manual/qmlgradient/qml/qmlgradient/main.qml +++ b/tests/manual/qmlgradient/qml/qmlgradient/main.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtQuick.Window diff --git a/tests/manual/qmlheightmap/CMakeLists.txt b/tests/manual/qmlheightmap/CMakeLists.txt index 174b7bcf..17e7f3f2 100644 --- a/tests/manual/qmlheightmap/CMakeLists.txt +++ b/tests/manual/qmlheightmap/CMakeLists.txt @@ -1,7 +1,7 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(qmlheightmap GUI @@ -10,6 +10,8 @@ qt_internal_add_manual_test(qmlheightmap ) target_link_libraries(qmlheightmap PUBLIC Qt::Gui + Qt::Qml + Qt::Quick Qt::DataVisualization ) diff --git a/tests/manual/qmlheightmap/main.cpp b/tests/manual/qmlheightmap/main.cpp index b54e9fea..371b78a8 100644 --- a/tests/manual/qmlheightmap/main.cpp +++ b/tests/manual/qmlheightmap/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtGui/QGuiApplication> #include <QtCore/QDir> diff --git a/tests/manual/qmlheightmap/qml/qmlheightmap/main.qml b/tests/manual/qmlheightmap/qml/qmlheightmap/main.qml index d7e29514..53003b59 100644 --- a/tests/manual/qmlheightmap/qml/qmlheightmap/main.qml +++ b/tests/manual/qmlheightmap/qml/qmlheightmap/main.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtQuick.Window diff --git a/tests/manual/qmlmultitest/CMakeLists.txt b/tests/manual/qmlmultitest/CMakeLists.txt index 77b3a4a6..a92ff8db 100644 --- a/tests/manual/qmlmultitest/CMakeLists.txt +++ b/tests/manual/qmlmultitest/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + qt_internal_add_manual_test(qmlmultitest GUI SOURCES @@ -5,6 +8,8 @@ qt_internal_add_manual_test(qmlmultitest ) target_link_libraries(qmlmultitest PUBLIC Qt::Gui + Qt::Qml + Qt::Quick Qt::DataVisualization ) diff --git a/tests/manual/qmlmultitest/main.cpp b/tests/manual/qmlmultitest/main.cpp index 41763539..555dff63 100644 --- a/tests/manual/qmlmultitest/main.cpp +++ b/tests/manual/qmlmultitest/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtGui/QGuiApplication> #include <QtCore/QDir> diff --git a/tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml b/tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml index b6d16eae..78e65575 100644 --- a/tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml +++ b/tests/manual/qmlmultitest/qml/qmlmultitest/Data.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick diff --git a/tests/manual/qmlmultitest/qml/qmlmultitest/main.qml b/tests/manual/qmlmultitest/qml/qmlmultitest/main.qml index 54c85e95..493feb79 100644 --- a/tests/manual/qmlmultitest/qml/qmlmultitest/main.qml +++ b/tests/manual/qmlmultitest/qml/qmlmultitest/main.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtQuick.Layouts diff --git a/tests/manual/qmlperf/CMakeLists.txt b/tests/manual/qmlperf/CMakeLists.txt index 141ba0c8..31235e32 100644 --- a/tests/manual/qmlperf/CMakeLists.txt +++ b/tests/manual/qmlperf/CMakeLists.txt @@ -1,7 +1,7 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(qmlperf GUI @@ -11,6 +11,8 @@ qt_internal_add_manual_test(qmlperf ) target_link_libraries(qmlperf PUBLIC Qt::Gui + Qt::Qml + Qt::Quick Qt::DataVisualization ) diff --git a/tests/manual/qmlperf/datagenerator.cpp b/tests/manual/qmlperf/datagenerator.cpp index 18db9004..df00d483 100644 --- a/tests/manual/qmlperf/datagenerator.cpp +++ b/tests/manual/qmlperf/datagenerator.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "datagenerator.h" #include <QDebug> diff --git a/tests/manual/qmlperf/datagenerator.h b/tests/manual/qmlperf/datagenerator.h index ac816b92..99a9dbf7 100644 --- a/tests/manual/qmlperf/datagenerator.h +++ b/tests/manual/qmlperf/datagenerator.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef DATAGENERATOR_H #define DATAGENERATOR_H diff --git a/tests/manual/qmlperf/main.cpp b/tests/manual/qmlperf/main.cpp index 91ac214b..2566fc7d 100644 --- a/tests/manual/qmlperf/main.cpp +++ b/tests/manual/qmlperf/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "datagenerator.h" diff --git a/tests/manual/qmlperf/qml/qmlperf/main.qml b/tests/manual/qmlperf/qml/qmlperf/main.qml index 60930606..4562e538 100644 --- a/tests/manual/qmlperf/qml/qmlperf/main.qml +++ b/tests/manual/qmlperf/qml/qmlperf/main.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtQuick.Layouts diff --git a/tests/manual/qmlvolume/CMakeLists.txt b/tests/manual/qmlvolume/CMakeLists.txt index eeaa572a..5a0e446a 100644 --- a/tests/manual/qmlvolume/CMakeLists.txt +++ b/tests/manual/qmlvolume/CMakeLists.txt @@ -1,7 +1,7 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(qmlvolume GUI @@ -11,6 +11,8 @@ qt_internal_add_manual_test(qmlvolume ) target_link_libraries(qmlvolume PUBLIC Qt::Gui + Qt::Qml + Qt::Quick Qt::DataVisualization ) diff --git a/tests/manual/qmlvolume/datasource.cpp b/tests/manual/qmlvolume/datasource.cpp index 9aa11963..6a16278e 100644 --- a/tests/manual/qmlvolume/datasource.cpp +++ b/tests/manual/qmlvolume/datasource.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "datasource.h" #include <QtCore/qmath.h> @@ -50,7 +24,7 @@ void DataSource::fillVolume(QCustom3DVolume *volumeItem) // This can take a while if the dimensions are large, so we support incremental data generation. int index = 0; - int textureSize = 256; + int textureSize = 1024; QVector3D midPoint(float(textureSize) / 2.0f, float(textureSize) / 2.0f, float(textureSize) / 2.0f); diff --git a/tests/manual/qmlvolume/datasource.h b/tests/manual/qmlvolume/datasource.h index 37602a2c..de502337 100644 --- a/tests/manual/qmlvolume/datasource.h +++ b/tests/manual/qmlvolume/datasource.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef DATASOURCE_H #define DATASOURCE_H diff --git a/tests/manual/qmlvolume/main.cpp b/tests/manual/qmlvolume/main.cpp index fc14a3a1..1c4e4492 100644 --- a/tests/manual/qmlvolume/main.cpp +++ b/tests/manual/qmlvolume/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "datasource.h" diff --git a/tests/manual/qmlvolume/qml/qmlvolume/main.qml b/tests/manual/qmlvolume/qml/qmlvolume/main.qml index 0ce82a12..da061483 100644 --- a/tests/manual/qmlvolume/qml/qmlvolume/main.qml +++ b/tests/manual/qmlvolume/qml/qmlvolume/main.qml @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick import QtQuick.Layouts @@ -60,7 +34,7 @@ Item { itemLabelVisible: false onItemLabelChanged: { - if (surfaceSeries.selectedPoint === surfaceSeries.invalidSelectionPosition) + if (surfaceSeries.selectedPoint == surfaceSeries.invalidSelectionPosition) selectionText.text = "No selection" else selectionText.text = surfaceSeries.itemLabel @@ -127,7 +101,7 @@ Item { text: "Slice" onClicked: { - if (volumeItem.sliceIndexZ == -1) { + if (volumeItem.sliceIndexZ === -1) { volumeItem.sliceIndexZ = 128 volumeItem.drawSlices = true volumeItem.drawSliceFrames = true @@ -149,7 +123,27 @@ Item { } } } + } + + SequentialAnimation { + running: volumeItem.drawSlices + loops: Animation.Infinite + PropertyAnimation { + target: volumeItem + property: "sliceIndexZ" + from: 0 + to: 1024 + duration: 5000 + } + + PropertyAnimation { + target: volumeItem + property: "sliceIndexZ" + from: 1024 + to: 0 + duration: 5000 + } } Custom3DVolume { diff --git a/tests/manual/scattertest/CMakeLists.txt b/tests/manual/scattertest/CMakeLists.txt index 00177653..89013c12 100644 --- a/tests/manual/scattertest/CMakeLists.txt +++ b/tests/manual/scattertest/CMakeLists.txt @@ -1,13 +1,15 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(scattertest GUI SOURCES main.cpp scatterchart.cpp scatterchart.h + NO_PCH_SOURCES + scatterchart.cpp # undef QT_NO_FOREACH ) target_link_libraries(scattertest PUBLIC Qt::Gui diff --git a/tests/manual/scattertest/main.cpp b/tests/manual/scattertest/main.cpp index 1f872c4d..af4d477f 100644 --- a/tests/manual/scattertest/main.cpp +++ b/tests/manual/scattertest/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "scatterchart.h" diff --git a/tests/manual/scattertest/scatterchart.cpp b/tests/manual/scattertest/scatterchart.cpp index ca8414ac..fce115d4 100644 --- a/tests/manual/scattertest/scatterchart.cpp +++ b/tests/manual/scattertest/scatterchart.cpp @@ -1,31 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses #include "scatterchart.h" #include <QtDataVisualization/qscatterdataproxy.h> @@ -244,7 +220,7 @@ void ScatterDataModifier::massiveTestAppendAndScroll() m_chart->axisZ()->setRange(min, max); } -void ScatterDataModifier::setFpsMeasurement(bool enable) +void ScatterDataModifier::setFpsMeasurement(int enable) { m_chart->setMeasureFps(enable); } @@ -973,14 +949,14 @@ void ScatterDataModifier::changeRadialLabelOffset(int offset) m_chart->setRadialLabelOffset(float(offset) / 100.0f); } -void ScatterDataModifier::toggleAxisTitleVisibility(bool enabled) +void ScatterDataModifier::toggleAxisTitleVisibility(int enabled) { m_chart->axisX()->setTitleVisible(enabled); m_chart->axisY()->setTitleVisible(enabled); m_chart->axisZ()->setTitleVisible(enabled); } -void ScatterDataModifier::toggleAxisTitleFixed(bool enabled) +void ScatterDataModifier::toggleAxisTitleFixed(int enabled) { m_chart->axisX()->setTitleFixed(enabled); m_chart->axisY()->setTitleFixed(enabled); @@ -1009,12 +985,12 @@ void ScatterDataModifier::renderToImage() } } -void ScatterDataModifier::togglePolar(bool enable) +void ScatterDataModifier::togglePolar(int enable) { m_chart->setPolar(enable); } -void ScatterDataModifier::toggleStatic(bool enable) +void ScatterDataModifier::toggleStatic(int enable) { if (enable) m_chart->setOptimizationHints(QAbstract3DGraph::OptimizationStatic); @@ -1022,7 +998,7 @@ void ScatterDataModifier::toggleStatic(bool enable) m_chart->setOptimizationHints(QAbstract3DGraph::OptimizationDefault); } -void ScatterDataModifier::toggleOrtho(bool enable) +void ScatterDataModifier::toggleOrtho(int enable) { m_chart->setOrthoProjection(enable); } diff --git a/tests/manual/scattertest/scatterchart.h b/tests/manual/scattertest/scatterchart.h index 43fabeac..2771a9a4 100644 --- a/tests/manual/scattertest/scatterchart.h +++ b/tests/manual/scattertest/scatterchart.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SCATTERDATAMODIFIER_H #define SCATTERDATAMODIFIER_H @@ -67,7 +41,7 @@ public: void massiveDataTest(); void massiveTestScroll(); void massiveTestAppendAndScroll(); - void setFpsMeasurement(bool enable); + void setFpsMeasurement(int enable); void setFpsLabel(QLabel *fpsLabel) { m_fpsLabel = fpsLabel; } void testItemChanges(); void testAxisReverse(); @@ -101,12 +75,12 @@ public Q_SLOTS: void handleFpsChange(qreal fps); void changeLabelRotation(int rotation); void changeRadialLabelOffset(int offset); - void toggleAxisTitleVisibility(bool enabled); - void toggleAxisTitleFixed(bool enabled); + void toggleAxisTitleVisibility(int enabled); + void toggleAxisTitleFixed(int enabled); void renderToImage(); - void togglePolar(bool enable); - void toggleStatic(bool enable); - void toggleOrtho(bool enable); + void togglePolar(int enable); + void toggleStatic(int enable); + void toggleOrtho(int enable); void setCameraTargetX(int value); void setCameraTargetY(int value); void setCameraTargetZ(int value); diff --git a/tests/manual/surfacetest/CMakeLists.txt b/tests/manual/surfacetest/CMakeLists.txt index c59f9488..bb3f0500 100644 --- a/tests/manual/surfacetest/CMakeLists.txt +++ b/tests/manual/surfacetest/CMakeLists.txt @@ -1,13 +1,17 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(surfacetest GUI SOURCES + buttonwrapper.cpp buttonwrapper.h + checkboxwrapper.cpp checkboxwrapper.h graphmodifier.cpp graphmodifier.h main.cpp + NO_PCH_SOURCES + graphmodifier.cpp # undef QT_NO_FOREACH ) target_link_libraries(surfacetest PUBLIC Qt::Gui diff --git a/tests/manual/surfacetest/buttonwrapper.cpp b/tests/manual/surfacetest/buttonwrapper.cpp new file mode 100644 index 00000000..c8eef0c7 --- /dev/null +++ b/tests/manual/surfacetest/buttonwrapper.cpp @@ -0,0 +1,14 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#include "buttonwrapper.h" +#include <QPushButton> + +ButtonWrapper::ButtonWrapper(QPushButton *button) +{ + m_button = button; +} + +void ButtonWrapper::setEnabled(int state) +{ + m_button->setEnabled(state); +} diff --git a/tests/manual/surfacetest/buttonwrapper.h b/tests/manual/surfacetest/buttonwrapper.h new file mode 100644 index 00000000..d0112117 --- /dev/null +++ b/tests/manual/surfacetest/buttonwrapper.h @@ -0,0 +1,22 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#ifndef BUTTONWRAPPER_H +#define BUTTONWRAPPER_H + +#include <QObject> +class QPushButton; + +class ButtonWrapper : public QObject +{ + Q_OBJECT +public: + ButtonWrapper(QPushButton *button); + +public Q_SLOTS: + void setEnabled(int state); + +private: + QPushButton *m_button; +}; + +#endif // BUTTONWRAPPER_H diff --git a/tests/manual/surfacetest/checkboxwrapper.cpp b/tests/manual/surfacetest/checkboxwrapper.cpp new file mode 100644 index 00000000..37bd3ded --- /dev/null +++ b/tests/manual/surfacetest/checkboxwrapper.cpp @@ -0,0 +1,14 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#include "checkboxwrapper.h" +#include <QCheckBox> + +CheckBoxWrapper::CheckBoxWrapper(QCheckBox *cb) +{ + m_checkbox = cb; +} + +void CheckBoxWrapper::setEnabled(int enabled) +{ + m_checkbox->setEnabled(enabled); +} diff --git a/tests/manual/surfacetest/checkboxwrapper.h b/tests/manual/surfacetest/checkboxwrapper.h new file mode 100644 index 00000000..37e72346 --- /dev/null +++ b/tests/manual/surfacetest/checkboxwrapper.h @@ -0,0 +1,23 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#ifndef CHECKBOXWRAPPER_H +#define CHECKBOXWRAPPER_H + +#include <QObject> + +class QCheckBox; + +class CheckBoxWrapper : public QObject +{ + Q_OBJECT +public: + explicit CheckBoxWrapper(QCheckBox *cb); + +public Q_SLOTS: + void setEnabled(int enabled); + +private: + QCheckBox *m_checkbox; +}; + +#endif // CHECKBOXWRAPPER_H diff --git a/tests/manual/surfacetest/graphmodifier.cpp b/tests/manual/surfacetest/graphmodifier.cpp index 76c5afb9..f406513d 100644 --- a/tests/manual/surfacetest/graphmodifier.cpp +++ b/tests/manual/surfacetest/graphmodifier.cpp @@ -1,31 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses #include "graphmodifier.h" #include <QtDataVisualization/QValue3DAxis> @@ -193,7 +169,7 @@ void GraphModifier::fillSeries() m_multiseries[3]->dataProxy()->resetArray(dataArray4); } -void GraphModifier::toggleSeries1(bool enabled) +void GraphModifier::toggleSeries1(int enabled) { qDebug() << __FUNCTION__ << " enabled = " << enabled; @@ -204,7 +180,7 @@ void GraphModifier::toggleSeries1(bool enabled) } } -void GraphModifier::toggleSeries2(bool enabled) +void GraphModifier::toggleSeries2(int enabled) { qDebug() << __FUNCTION__ << " enabled = " << enabled; @@ -215,7 +191,7 @@ void GraphModifier::toggleSeries2(bool enabled) } } -void GraphModifier::toggleSeries3(bool enabled) +void GraphModifier::toggleSeries3(int enabled) { qDebug() << __FUNCTION__ << " enabled = " << enabled; @@ -226,7 +202,7 @@ void GraphModifier::toggleSeries3(bool enabled) } } -void GraphModifier::toggleSeries4(bool enabled) +void GraphModifier::toggleSeries4(int enabled) { qDebug() << __FUNCTION__ << " enabled = " << enabled; @@ -237,7 +213,7 @@ void GraphModifier::toggleSeries4(bool enabled) } } -void GraphModifier::toggleSmooth(bool enabled) +void GraphModifier::toggleSmooth(int enabled) { qDebug() << "GraphModifier::toggleSmooth " << enabled; m_theSeries->setFlatShadingEnabled(enabled); @@ -246,7 +222,7 @@ void GraphModifier::toggleSmooth(bool enabled) #endif } -void GraphModifier::toggleSurfaceGrid(bool enable) +void GraphModifier::toggleSurfaceGrid(int enable) { qDebug() << "GraphModifier::toggleSurfaceGrid" << enable; if (enable) @@ -260,7 +236,7 @@ void GraphModifier::toggleSurfaceGrid(bool enable) #endif } -void GraphModifier::toggleSurface(bool enable) +void GraphModifier::toggleSurface(int enable) { qDebug() << "GraphModifier::toggleSurface" << enable; if (enable) @@ -274,7 +250,7 @@ void GraphModifier::toggleSurface(bool enable) #endif } -void GraphModifier::toggleSeriesVisible(bool enable) +void GraphModifier::toggleSeriesVisible(int enable) { m_theSeries->setVisible(enable); #ifdef MULTI_SERIES @@ -282,13 +258,13 @@ void GraphModifier::toggleSeriesVisible(bool enable) #endif } -void GraphModifier::toggleSmoothS2(bool enabled) +void GraphModifier::toggleSmoothS2(int enabled) { qDebug() << __FUNCTION__ << enabled; m_multiseries[1]->setFlatShadingEnabled(enabled); } -void GraphModifier::toggleSurfaceGridS2(bool enable) +void GraphModifier::toggleSurfaceGridS2(int enable) { qDebug() << __FUNCTION__ << enable; if (enable) @@ -299,7 +275,7 @@ void GraphModifier::toggleSurfaceGridS2(bool enable) m_multiseries[1]->setDrawMode(m_drawMode2); } -void GraphModifier::toggleSurfaceS2(bool enable) +void GraphModifier::toggleSurfaceS2(int enable) { qDebug() << __FUNCTION__ << enable; if (enable) @@ -310,19 +286,19 @@ void GraphModifier::toggleSurfaceS2(bool enable) m_multiseries[1]->setDrawMode(m_drawMode2); } -void GraphModifier::toggleSeries2Visible(bool enable) +void GraphModifier::toggleSeries2Visible(int enable) { qDebug() << __FUNCTION__ << enable; m_multiseries[1]->setVisible(enable); } -void GraphModifier::toggleSmoothS3(bool enabled) +void GraphModifier::toggleSmoothS3(int enabled) { qDebug() << __FUNCTION__ << enabled; m_multiseries[2]->setFlatShadingEnabled(enabled); } -void GraphModifier::toggleSurfaceGridS3(bool enable) +void GraphModifier::toggleSurfaceGridS3(int enable) { qDebug() << __FUNCTION__ << enable; if (enable) @@ -333,7 +309,7 @@ void GraphModifier::toggleSurfaceGridS3(bool enable) m_multiseries[2]->setDrawMode(m_drawMode3); } -void GraphModifier::toggleSurfaceS3(bool enable) +void GraphModifier::toggleSurfaceS3(int enable) { qDebug() << __FUNCTION__ << enable; if (enable) @@ -344,19 +320,19 @@ void GraphModifier::toggleSurfaceS3(bool enable) m_multiseries[2]->setDrawMode(m_drawMode3); } -void GraphModifier::toggleSeries3Visible(bool enable) +void GraphModifier::toggleSeries3Visible(int enable) { qDebug() << __FUNCTION__ << enable; m_multiseries[2]->setVisible(enable); } -void GraphModifier::toggleSmoothS4(bool enabled) +void GraphModifier::toggleSmoothS4(int enabled) { qDebug() << __FUNCTION__ << enabled; m_multiseries[3]->setFlatShadingEnabled(enabled); } -void GraphModifier::toggleSurfaceGridS4(bool enable) +void GraphModifier::toggleSurfaceGridS4(int enable) { qDebug() << __FUNCTION__ << enable; if (enable) @@ -367,7 +343,7 @@ void GraphModifier::toggleSurfaceGridS4(bool enable) m_multiseries[3]->setDrawMode(m_drawMode4); } -void GraphModifier::toggleSurfaceS4(bool enable) +void GraphModifier::toggleSurfaceS4(int enable) { qDebug() << __FUNCTION__ << enable; if (enable) @@ -378,13 +354,13 @@ void GraphModifier::toggleSurfaceS4(bool enable) m_multiseries[3]->setDrawMode(m_drawMode4); } -void GraphModifier::toggleSeries4Visible(bool enable) +void GraphModifier::toggleSeries4Visible(int enable) { qDebug() << __FUNCTION__ << enable; m_multiseries[3]->setVisible(enable); } -void GraphModifier::toggleSqrtSin(bool enable) +void GraphModifier::toggleSqrtSin(int enable) { if (enable) { qDebug() << "Create Sqrt&Sin surface, (" << m_xCount << ", " << m_zCount << ")"; @@ -426,7 +402,7 @@ void GraphModifier::toggleSqrtSin(bool enable) } } -void GraphModifier::togglePlane(bool enable) +void GraphModifier::togglePlane(int enable) { qDebug() << "GraphModifier::togglePlane " << enable; @@ -749,21 +725,21 @@ void GraphModifier::changeLabelRotation(int rotation) m_graph->axisZ()->setLabelAutoRotation(float(rotation)); } -void GraphModifier::toggleAxisTitleVisibility(bool enabled) +void GraphModifier::toggleAxisTitleVisibility(int enabled) { m_graph->axisX()->setTitleVisible(enabled); m_graph->axisY()->setTitleVisible(enabled); m_graph->axisZ()->setTitleVisible(enabled); } -void GraphModifier::toggleAxisTitleFixed(bool enabled) +void GraphModifier::toggleAxisTitleFixed(int enabled) { m_graph->axisX()->setTitleFixed(enabled); m_graph->axisY()->setTitleFixed(enabled); m_graph->axisZ()->setTitleFixed(enabled); } -void GraphModifier::toggleXAscending(bool enabled) +void GraphModifier::toggleXAscending(int enabled) { m_ascendingX = enabled; @@ -793,7 +769,7 @@ void GraphModifier::toggleXAscending(bool enabled) } } -void GraphModifier::toggleZAscending(bool enabled) +void GraphModifier::toggleZAscending(int enabled) { m_ascendingZ = enabled; @@ -823,7 +799,7 @@ void GraphModifier::toggleZAscending(bool enabled) } } -void GraphModifier::togglePolar(bool enabled) +void GraphModifier::togglePolar(int enabled) { m_graph->setPolar(enabled); } @@ -1681,7 +1657,7 @@ void GraphModifier::setHorizontalAspectRatio(int ratio) m_graph->setHorizontalAspectRatio(aspectRatio); } -void GraphModifier::setSurfaceTexture(bool enabled) +void GraphModifier::setSurfaceTexture(int enabled) { if (enabled) m_multiseries[3]->setTexture(QImage(":/maps/mapimage")); diff --git a/tests/manual/surfacetest/graphmodifier.h b/tests/manual/surfacetest/graphmodifier.h index e535021a..fe839976 100644 --- a/tests/manual/surfacetest/graphmodifier.h +++ b/tests/manual/surfacetest/graphmodifier.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef GRAPHMODIFIER_H #define GRAPHMODIFIER_H @@ -53,29 +27,29 @@ public: explicit GraphModifier(Q3DSurface *graph, QWidget *parentWidget); ~GraphModifier(); - void toggleSeries1(bool enabled); - void toggleSeries2(bool enabled); - void toggleSeries3(bool enabled); - void toggleSeries4(bool enabled); - void toggleSmooth(bool enabled); - void toggleSurfaceGrid(bool enable); - void toggleSurface(bool enable); - void toggleSeriesVisible(bool enable); - void toggleSmoothS2(bool enabled); - void toggleSurfaceGridS2(bool enable); - void toggleSurfaceS2(bool enable); - void toggleSeries2Visible(bool enable); - void toggleSmoothS3(bool enabled); - void toggleSurfaceGridS3(bool enable); - void toggleSurfaceS3(bool enable); - void toggleSeries3Visible(bool enable); - void toggleSmoothS4(bool enabled); - void toggleSurfaceGridS4(bool enable); - void toggleSurfaceS4(bool enable); - void toggleSeries4Visible(bool enable); + void toggleSeries1(int enabled); + void toggleSeries2(int enabled); + void toggleSeries3(int enabled); + void toggleSeries4(int enabled); + void toggleSmooth(int enabled); + void toggleSurfaceGrid(int enable); + void toggleSurface(int enable); + void toggleSeriesVisible(int enable); + void toggleSmoothS2(int enabled); + void toggleSurfaceGridS2(int enable); + void toggleSurfaceS2(int enable); + void toggleSeries2Visible(int enable); + void toggleSmoothS3(int enabled); + void toggleSurfaceGridS3(int enable); + void toggleSurfaceS3(int enable); + void toggleSeries3Visible(int enable); + void toggleSmoothS4(int enabled); + void toggleSurfaceGridS4(int enable); + void toggleSurfaceS4(int enable); + void toggleSeries4Visible(int enable); - void toggleSqrtSin(bool enable); - void togglePlane(bool enable); + void toggleSqrtSin(int enable); + void togglePlane(int enable); void setHeightMapData(bool enable); void toggleGridSliderLock(bool enable); void setGridSliderX(QSlider *slider) { m_gridSliderX = slider; } @@ -123,7 +97,7 @@ public: void testDataOrdering(); void setAspectRatio(int ratio); void setHorizontalAspectRatio(int ratio); - void setSurfaceTexture(bool enabled); + void setSurfaceTexture(int enabled); public Q_SLOTS: void changeShadowQuality(int quality); @@ -138,11 +112,11 @@ public Q_SLOTS: void handleAxisZChanged(QValue3DAxis *axis); void handleFpsChange(qreal fps); void changeLabelRotation(int rotation); - void toggleAxisTitleVisibility(bool enabled); - void toggleAxisTitleFixed(bool enabled); - void toggleXAscending(bool enabled); - void toggleZAscending(bool enabled); - void togglePolar(bool enabled); + void toggleAxisTitleVisibility(int enabled); + void toggleAxisTitleFixed(int enabled); + void toggleXAscending(int enabled); + void toggleZAscending(int enabled); + void togglePolar(int enabled); void setCameraTargetX(int value); void setCameraTargetY(int value); void setCameraTargetZ(int value); diff --git a/tests/manual/surfacetest/main.cpp b/tests/manual/surfacetest/main.cpp index 239a6eba..7b90a0c2 100644 --- a/tests/manual/surfacetest/main.cpp +++ b/tests/manual/surfacetest/main.cpp @@ -1,33 +1,9 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "graphmodifier.h" +#include "buttonwrapper.h" +#include "checkboxwrapper.h" #include <QtDataVisualization/q3dtheme.h> #include <QApplication> @@ -580,49 +556,66 @@ int main(int argc, char *argv[]) QObject::connect(series4VisibleCB, &QCheckBox::stateChanged, modifier, &GraphModifier::toggleSeries4Visible); + CheckBoxWrapper *series1SmoothCBWrapper = new CheckBoxWrapper(smoothCB); + CheckBoxWrapper *series1SurfaceGridCBWrapper = new CheckBoxWrapper(surfaceGridCB); + CheckBoxWrapper *series1surfaceCBWrapper = new CheckBoxWrapper(surfaceCB); + CheckBoxWrapper *series1VisibleCBWrapper = new CheckBoxWrapper(seriesVisibleCB); QObject::connect(series1CB, &QCheckBox::stateChanged, modifier, &GraphModifier::toggleSeries1); QObject::connect(series1CB, &QCheckBox::stateChanged, - smoothCB, &QPushButton::setEnabled); + series1SmoothCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series1CB, &QCheckBox::stateChanged, - surfaceGridCB, &QPushButton::setEnabled); + series1SurfaceGridCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series1CB, &QCheckBox::stateChanged, - surfaceCB, &QPushButton::setEnabled); + series1surfaceCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series1CB, &QCheckBox::stateChanged, - seriesVisibleCB, &QPushButton::setEnabled); + series1VisibleCBWrapper, &CheckBoxWrapper::setEnabled); + + CheckBoxWrapper *series2SmoothCBWrapper = new CheckBoxWrapper(smoothS2CB); + CheckBoxWrapper *series2SurfaceGridCBWrapper = new CheckBoxWrapper(surfaceGridS2CB); + CheckBoxWrapper *series2surfaceCBWrapper = new CheckBoxWrapper(surfaceS2CB); + CheckBoxWrapper *series2VisibleCBWrapper = new CheckBoxWrapper(series2VisibleCB); QObject::connect(series2CB, &QCheckBox::stateChanged, modifier, &GraphModifier::toggleSeries2); QObject::connect(series2CB, &QCheckBox::stateChanged, - smoothS2CB, &QPushButton::setEnabled); + series2SmoothCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series2CB, &QCheckBox::stateChanged, - surfaceGridS2CB, &QPushButton::setEnabled); + series2SurfaceGridCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series2CB, &QCheckBox::stateChanged, - surfaceS2CB, &QPushButton::setEnabled); + series2surfaceCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series2CB, &QCheckBox::stateChanged, - series2VisibleCB, &QPushButton::setEnabled); + series2VisibleCBWrapper, &CheckBoxWrapper::setEnabled); + CheckBoxWrapper *series3SmoothCBWrapper = new CheckBoxWrapper(smoothS3CB); + CheckBoxWrapper *series3SurfaceGridCBWrapper = new CheckBoxWrapper(surfaceGridS3CB); + CheckBoxWrapper *series3surfaceCBWrapper = new CheckBoxWrapper(surfaceS3CB); + CheckBoxWrapper *series3VisibleCBWrapper = new CheckBoxWrapper(series3VisibleCB); QObject::connect(series3CB, &QCheckBox::stateChanged, modifier, &GraphModifier::toggleSeries3); QObject::connect(series3CB, &QCheckBox::stateChanged, - smoothS3CB, &QPushButton::setEnabled); + series3SmoothCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series3CB, &QCheckBox::stateChanged, - surfaceGridS3CB, &QPushButton::setEnabled); + series3SurfaceGridCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series3CB, &QCheckBox::stateChanged, - surfaceS3CB, &QPushButton::setEnabled); + series3surfaceCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series3CB, &QCheckBox::stateChanged, - series3VisibleCB, &QPushButton::setEnabled); + series3VisibleCBWrapper, &CheckBoxWrapper::setEnabled); + CheckBoxWrapper *series4SmoothCBWrapper = new CheckBoxWrapper(smoothS4CB); + CheckBoxWrapper *series4SurfaceGridCBWrapper = new CheckBoxWrapper(surfaceGridS4CB); + CheckBoxWrapper *series4surfaceCBWrapper = new CheckBoxWrapper(surfaceS4CB); + CheckBoxWrapper *series4VisibleCBWrapper = new CheckBoxWrapper(series4VisibleCB); QObject::connect(series4CB, &QCheckBox::stateChanged, modifier, &GraphModifier::toggleSeries4); QObject::connect(series4CB, &QCheckBox::stateChanged, - smoothS4CB, &QPushButton::setEnabled); + series4SmoothCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series4CB, &QCheckBox::stateChanged, - surfaceGridS4CB, &QPushButton::setEnabled); + series4SurfaceGridCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series4CB, &QCheckBox::stateChanged, - surfaceS4CB, &QPushButton::setEnabled); + series4surfaceCBWrapper, &CheckBoxWrapper::setEnabled); QObject::connect(series4CB, &QCheckBox::stateChanged, - series4VisibleCB, &QPushButton::setEnabled); + series4VisibleCBWrapper, &CheckBoxWrapper::setEnabled); #else QObject::connect(sqrtSinCB, &QRadioButton::toggled, modifier, &GraphModifier::toggleSqrtSin); diff --git a/tests/manual/volumetrictest/CMakeLists.txt b/tests/manual/volumetrictest/CMakeLists.txt index c0f698f1..7e39bdf5 100644 --- a/tests/manual/volumetrictest/CMakeLists.txt +++ b/tests/manual/volumetrictest/CMakeLists.txt @@ -1,7 +1,7 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) qt_internal_add_manual_test(volumetrictest GUI diff --git a/tests/manual/volumetrictest/main.cpp b/tests/manual/volumetrictest/main.cpp index a3fb999e..d9d322be 100644 --- a/tests/manual/volumetrictest/main.cpp +++ b/tests/manual/volumetrictest/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "volumetrictest.h" #include <QtWidgets/QApplication> diff --git a/tests/manual/volumetrictest/volumetrictest.cpp b/tests/manual/volumetrictest/volumetrictest.cpp index 7b6e3821..49293873 100644 --- a/tests/manual/volumetrictest/volumetrictest.cpp +++ b/tests/manual/volumetrictest/volumetrictest.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "volumetrictest.h" #include <QtDataVisualization/qbar3dseries.h> diff --git a/tests/manual/volumetrictest/volumetrictest.h b/tests/manual/volumetrictest/volumetrictest.h index b100b827..20b197d0 100644 --- a/tests/manual/volumetrictest/volumetrictest.h +++ b/tests/manual/volumetrictest/volumetrictest.h @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef VOLUMETRICMODIFIER_H #define VOLUMETRICMODIFIER_H |