summaryrefslogtreecommitdiffstats
path: root/tests/manual/barstest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/barstest')
-rw-r--r--tests/manual/barstest/CMakeLists.txt10
-rw-r--r--tests/manual/barstest/buttonwrapper.cpp14
-rw-r--r--tests/manual/barstest/buttonwrapper.h22
-rw-r--r--tests/manual/barstest/chart.cpp56
-rw-r--r--tests/manual/barstest/chart.h56
-rw-r--r--tests/manual/barstest/custominputhandler.cpp30
-rw-r--r--tests/manual/barstest/custominputhandler.h30
-rw-r--r--tests/manual/barstest/main.cpp129
-rw-r--r--tests/manual/barstest/sliderwrapper.cpp13
-rw-r--r--tests/manual/barstest/sliderwrapper.h23
10 files changed, 177 insertions, 206 deletions
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