summaryrefslogtreecommitdiffstats
path: root/tests/manual/scattertest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/scattertest')
-rw-r--r--tests/manual/scattertest/CMakeLists.txt8
-rw-r--r--tests/manual/scattertest/main.cpp30
-rw-r--r--tests/manual/scattertest/scatterchart.cpp44
-rw-r--r--tests/manual/scattertest/scatterchart.h42
4 files changed, 25 insertions, 99 deletions
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);