diff options
author | Tuomo Pelkonen <tuomo.pelkonen@gmail.com> | 2021-01-14 10:49:40 +0200 |
---|---|---|
committer | Tuomo Pelkonen <tuomo.pelkonen@gmail.com> | 2021-01-27 10:01:58 +0200 |
commit | 6c2aec18ed7f043c17b09c939b9bc521def37aa5 (patch) | |
tree | 3dd4face677a6eb9ef2e45b51548d4b5a17263c4 /examples | |
parent | 1fc39261132f0b3edf89934fd055234f8b19ced1 (diff) |
Fix most of the QML example applications
Most of the QML examples work now as supposed to. Qmlbars still needs
fixing and is not included in this patch.
Task-number: QTBUG-89298
Change-Id: Ic8bc6511cdb00dd3db0a181b7a31b3bbc39f0556
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'examples')
39 files changed, 104 insertions, 771 deletions
diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/NewButton.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/NewButton.qml deleted file mode 100644 index 3529f56f..00000000 --- a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/NewButton.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - height: 80 - - Button { - opacity: 0.5 - width: parent.width - height: parent.height - Text { - id: buttonText - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml index 764987b0..c12c40e4 100644 --- a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml +++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml @@ -27,8 +27,9 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtDataVisualization 1.1 +import QtQuick +import QtDataVisualization +import QtQuick.Controls import "." Item { @@ -270,7 +271,7 @@ Item { } //! [7] - NewButton { + Button { id: rangeToggle width: parent.width / 3 // We're adding 3 buttons and want to divide them equally text: "Use Preset Range" @@ -299,7 +300,7 @@ Item { } //! [8] - NewButton { + Button { id: orthoToggle width: parent.width / 3 text: "Display Orthographic" @@ -318,7 +319,7 @@ Item { } //! [8] - NewButton { + Button { id: exitButton width: parent.width / 3 text: "Quit" diff --git a/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.qrc b/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.qrc index c6c45e26..9e6b90c8 100644 --- a/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.qrc +++ b/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.qrc @@ -1,7 +1,6 @@ <RCC> <qresource prefix="/"> <file>qml/qmlaxisdrag/main.qml</file> - <file>qml/qmlaxisdrag/NewButton.qml</file> </qresource> <qresource prefix="/mesh"> <file alias="cube">qml/qmlaxisdrag/cube.obj</file> diff --git a/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/Data.qml b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/Data.qml index 7d907a57..ce2a8176 100644 --- a/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/Data.qml +++ b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/Data.qml @@ -27,7 +27,7 @@ ** ****************************************************************************/ -import QtQuick 2.1 +import QtQuick Item { property alias model: dataModel diff --git a/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/NewButton.qml b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/NewButton.qml deleted file mode 100644 index 19309cca..00000000 --- a/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/NewButton.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight + 10 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/main.qml b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/main.qml index 203c6103..044cd2dc 100644 --- a/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/main.qml +++ b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/main.qml @@ -27,10 +27,11 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtDataVisualization 1.1 -import CustomFormatter 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtDataVisualization +import CustomFormatter import "." Rectangle { @@ -134,7 +135,7 @@ Rectangle { anchors.left: parent.left spacing: 0 - NewButton { + Button { id: yAxisBaseChange Layout.fillHeight: true Layout.fillWidth: true @@ -167,7 +168,7 @@ Rectangle { ] } - NewButton { + Button { id: yAxisToggle Layout.fillHeight: true Layout.fillWidth: true @@ -183,7 +184,7 @@ Rectangle { } } - NewButton { + Button { id: exitButton Layout.fillHeight: true Layout.fillWidth: true diff --git a/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.qrc b/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.qrc index 0cd9e927..27c30362 100644 --- a/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.qrc +++ b/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.qrc @@ -1,7 +1,6 @@ <RCC> <qresource prefix="/"> <file>qml/qmlaxisformatter/main.qml</file> - <file>qml/qmlaxisformatter/NewButton.qml</file> <file>qml/qmlaxisformatter/Data.qml</file> </qresource> </RCC> diff --git a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/Data.qml b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/Data.qml index b86f96c5..5c6c7c13 100644 --- a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/Data.qml +++ b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/Data.qml @@ -27,7 +27,7 @@ ** ****************************************************************************/ -import QtQuick 2.1 +import QtQuick Item { property alias modelOne: dataModelOne diff --git a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/NewButton.qml b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/NewButton.qml deleted file mode 100644 index 19309cca..00000000 --- a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/NewButton.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight + 10 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml index bafdaac4..53997127 100644 --- a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml +++ b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml @@ -27,9 +27,10 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtDataVisualization 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtDataVisualization import "." Rectangle { @@ -197,7 +198,7 @@ Rectangle { anchors.left: parent.left spacing: 0 - NewButton { + Button { id: shadowToggle Layout.fillHeight: true Layout.minimumWidth: parent.width / 3 // 3 buttons divided equally in the layout @@ -215,7 +216,7 @@ Rectangle { } } - NewButton { + Button { id: cameraToggle Layout.fillHeight: true Layout.minimumWidth: parent.width / 3 @@ -232,7 +233,7 @@ Rectangle { } } - NewButton { + Button { id: exitButton Layout.fillHeight: true Layout.minimumWidth: parent.width / 3 diff --git a/examples/datavisualization/qmlcustominput/qmlcustominput.qrc b/examples/datavisualization/qmlcustominput/qmlcustominput.qrc index 5800150a..d620a3d0 100644 --- a/examples/datavisualization/qmlcustominput/qmlcustominput.qrc +++ b/examples/datavisualization/qmlcustominput/qmlcustominput.qrc @@ -2,6 +2,5 @@ <qresource prefix="/"> <file>qml/qmlcustominput/Data.qml</file> <file>qml/qmlcustominput/main.qml</file> - <file>qml/qmlcustominput/NewButton.qml</file> </qresource> </RCC> diff --git a/examples/datavisualization/qmllegend/qml/qmllegend/Data.qml b/examples/datavisualization/qmllegend/qml/qmllegend/Data.qml index b70fb196..1bb3d056 100644 --- a/examples/datavisualization/qmllegend/qml/qmllegend/Data.qml +++ b/examples/datavisualization/qmllegend/qml/qmllegend/Data.qml @@ -27,7 +27,7 @@ ** ****************************************************************************/ -import QtQuick 2.1 +import QtQuick Item { property alias model: dataModel diff --git a/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml b/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml index 7f1dcda4..5611a065 100644 --- a/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml +++ b/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml @@ -27,10 +27,10 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtQuick.Window 2.1 -import QtDataVisualization 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtDataVisualization Rectangle { //! [0] diff --git a/examples/datavisualization/qmllegend/qml/qmllegend/NewButton.qml b/examples/datavisualization/qmllegend/qml/qmllegend/NewButton.qml deleted file mode 100644 index 19309cca..00000000 --- a/examples/datavisualization/qmllegend/qml/qmllegend/NewButton.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight + 10 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmllegend/qml/qmllegend/main.qml b/examples/datavisualization/qmllegend/qml/qmllegend/main.qml index a380303e..3d795dfd 100644 --- a/examples/datavisualization/qmllegend/qml/qmllegend/main.qml +++ b/examples/datavisualization/qmllegend/qml/qmllegend/main.qml @@ -27,10 +27,10 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Layouts 1.0 -import QtDataVisualization 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtDataVisualization import "." Rectangle { @@ -203,7 +203,7 @@ Rectangle { anchors.left: parent.left spacing: 0 - NewButton { + Button { id: themeToggle Layout.fillHeight: true Layout.fillWidth: true @@ -216,7 +216,7 @@ Rectangle { } } } - NewButton { + Button { id: repositionLegend Layout.fillHeight: true Layout.fillWidth: true @@ -229,7 +229,7 @@ Rectangle { } } } - NewButton { + Button { id: exitButton Layout.fillHeight: true Layout.fillWidth: true diff --git a/examples/datavisualization/qmllegend/qmllegend.qrc b/examples/datavisualization/qmllegend/qmllegend.qrc index b9777b37..e9b0f4b9 100644 --- a/examples/datavisualization/qmllegend/qmllegend.qrc +++ b/examples/datavisualization/qmllegend/qmllegend.qrc @@ -3,6 +3,5 @@ <file>qml/qmllegend/Data.qml</file> <file>qml/qmllegend/LegendItem.qml</file> <file>qml/qmllegend/main.qml</file> - <file>qml/qmllegend/NewButton.qml</file> </qresource> </RCC> diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml index 183c69ee..61ca12fd 100644 --- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml +++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml @@ -27,7 +27,7 @@ ** ****************************************************************************/ -import QtQuick 2.1 +import QtQuick Item { property alias sharedData: dataModel diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/NewButton.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/NewButton.qml deleted file mode 100644 index 19309cca..00000000 --- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/NewButton.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight + 10 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml index 269859c7..6908f1c7 100644 --- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml +++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml @@ -27,9 +27,10 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtDataVisualization 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtDataVisualization import "." Rectangle { @@ -96,7 +97,7 @@ Rectangle { anchors.bottom: parent.bottom columns: 2 - NewButton { + Button { Layout.minimumWidth: parent.width / 2 Layout.fillHeight: true Layout.fillWidth: true @@ -104,7 +105,7 @@ Rectangle { onClicked: clearSelections() // call a helper function to keep button itself simpler } - NewButton { + Button { Layout.minimumWidth: parent.width / 2 Layout.fillHeight: true Layout.fillWidth: true @@ -112,14 +113,14 @@ Rectangle { onClicked: Qt.quit(0); } - NewButton { + Button { Layout.fillHeight: true Layout.fillWidth: true text: "Reset Cameras" onClicked: resetCameras() // call a helper function to keep button itself simpler } - NewButton { + Button { Layout.fillHeight: true Layout.fillWidth: true text: "Toggle Mesh Styles" diff --git a/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc b/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc index c5e63a1c..a1ac4cc0 100644 --- a/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc +++ b/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc @@ -2,6 +2,5 @@ <qresource prefix="/"> <file>qml/qmlmultigraph/Data.qml</file> <file>qml/qmlmultigraph/main.qml</file> - <file>qml/qmlmultigraph/NewButton.qml</file> </qresource> </RCC> diff --git a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/NewButton.qml b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/NewButton.qml deleted file mode 100644 index 19309cca..00000000 --- a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/NewButton.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight + 10 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml index c6a64cc2..dfb67424 100644 --- a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml +++ b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml @@ -27,10 +27,10 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 1.0 -import QtDataVisualization 1.1 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtDataVisualization import "." Item { @@ -130,7 +130,6 @@ Item { anchors.fill: parent RowLayout { id: sliderLayout - anchors.top: parent.top Layout.fillHeight: true Layout.fillWidth: true Layout.minimumHeight: flatShadingToggle.height @@ -157,11 +156,10 @@ Item { Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter Layout.minimumWidth: 80 - minimumValue: mainView.sampleCache * 2 - maximumValue: minimumValue * 10 + from: mainView.sampleCache * 2 + to: from * 10 stepSize: mainView.sampleCache - updateValueWhileDragging: false - Component.onCompleted: value = minimumValue * 2 + Component.onCompleted: value = from * 2 } Rectangle { @@ -203,10 +201,9 @@ Item { Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter Layout.minimumWidth: 80 - minimumValue: 2 - maximumValue: 60 + from: 2 + to: 60 stepSize: 2 - updateValueWhileDragging: true value: 30 } @@ -272,10 +269,9 @@ Item { Layout.fillHeight: true Layout.fillWidth: true Layout.minimumHeight: flatShadingToggle.height - anchors.bottom: parent.bottom spacing: 0 - NewButton { + Button { id: flatShadingToggle Layout.fillHeight: true Layout.fillWidth: true @@ -294,7 +290,7 @@ Item { } } - NewButton { + Button { id: surfaceGridToggle Layout.fillHeight: true Layout.fillWidth: true @@ -312,7 +308,7 @@ Item { } } - NewButton { + Button { id: exitButton Layout.fillHeight: true Layout.fillWidth: true diff --git a/examples/datavisualization/qmloscilloscope/qmloscilloscope.qrc b/examples/datavisualization/qmloscilloscope/qmloscilloscope.qrc index a2358789..52678b78 100644 --- a/examples/datavisualization/qmloscilloscope/qmloscilloscope.qrc +++ b/examples/datavisualization/qmloscilloscope/qmloscilloscope.qrc @@ -1,6 +1,5 @@ <RCC> <qresource prefix="/"> <file>qml/qmloscilloscope/main.qml</file> - <file>qml/qmloscilloscope/NewButton.qml</file> </qresource> </RCC> diff --git a/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc b/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc index 9d13f0bb..667aea49 100644 --- a/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc +++ b/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc @@ -59,7 +59,6 @@ <qresource prefix="/"> <file>qml/qmlscatter/Data.qml</file> <file>qml/qmlscatter/main.qml</file> - <file>qml/qmlscatter/NewButton.qml</file> </qresource> </RCC> \endcode @@ -79,7 +78,7 @@ \snippet qmlscatter/qml/qmlscatter/main.qml 0 The last \c import just imports all the qml files in the same directory as our \c {main.qml}, - because that's where \c NewButton.qml and \c Data.qml are. + because that's where \c Data.qml is. Then we create our main \c Rectangle and call it \c mainView: diff --git a/examples/datavisualization/qmlscatter/qml/qmlscatter/Data.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/Data.qml index e077669f..26bfe3ef 100644 --- a/examples/datavisualization/qmlscatter/qml/qmlscatter/Data.qml +++ b/examples/datavisualization/qmlscatter/qml/qmlscatter/Data.qml @@ -27,7 +27,7 @@ ** ****************************************************************************/ -import QtQuick 2.1 +import QtQuick Item { //! [1] diff --git a/examples/datavisualization/qmlscatter/qml/qmlscatter/NewButton.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/NewButton.qml deleted file mode 100644 index 19309cca..00000000 --- a/examples/datavisualization/qmlscatter/qml/qmlscatter/NewButton.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight + 10 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml index 002f9d93..6e54fc96 100644 --- a/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml +++ b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml @@ -28,9 +28,10 @@ ****************************************************************************/ //! [0] -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtDataVisualization 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtDataVisualization import "." //! [0] @@ -148,7 +149,7 @@ Rectangle { anchors.left: parent.left spacing: 0 //! [7] - NewButton { + Button { id: shadowToggle Layout.fillHeight: true Layout.fillWidth: true @@ -166,7 +167,7 @@ Rectangle { } //! [7] - NewButton { + Button { id: smoothToggle Layout.fillHeight: true Layout.fillWidth: true @@ -182,7 +183,7 @@ Rectangle { } } - NewButton { + Button { id: cameraToggle Layout.fillHeight: true Layout.fillWidth: true @@ -197,7 +198,7 @@ Rectangle { } } - NewButton { + Button { id: themeToggle Layout.fillHeight: true Layout.fillWidth: true @@ -216,7 +217,7 @@ Rectangle { } } - NewButton { + Button { id: backgroundToggle Layout.fillHeight: true Layout.fillWidth: true @@ -232,7 +233,7 @@ Rectangle { } } - NewButton { + Button { id: exitButton Layout.fillHeight: true Layout.fillWidth: true diff --git a/examples/datavisualization/qmlscatter/qmlscatter.qrc b/examples/datavisualization/qmlscatter/qmlscatter.qrc index 225d78b0..f36c81c5 100644 --- a/examples/datavisualization/qmlscatter/qmlscatter.qrc +++ b/examples/datavisualization/qmlscatter/qmlscatter.qrc @@ -2,6 +2,5 @@ <qresource prefix="/"> <file>qml/qmlscatter/Data.qml</file> <file>qml/qmlscatter/main.qml</file> - <file>qml/qmlscatter/NewButton.qml</file> </qresource> </RCC> diff --git a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/Data.qml b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/Data.qml index ed9913b3..75fcee6a 100644 --- a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/Data.qml +++ b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/Data.qml @@ -27,7 +27,7 @@ ** ****************************************************************************/ -import QtQuick 2.1 +import QtQuick Item { property alias model: dataModel diff --git a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/NewButton.qml b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/NewButton.qml deleted file mode 100644 index 19309cca..00000000 --- a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/NewButton.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight + 10 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml index 23eb8312..66de168c 100644 --- a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml +++ b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml @@ -27,10 +27,11 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtQuick.Window 2.1 -import QtDataVisualization 1.2 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtQuick.Window +import QtDataVisualization import "." Window { @@ -171,7 +172,7 @@ Window { opacity: 0.5 //! [3] - NewButton { + Button { id: polarToggle Layout.fillWidth: true Layout.fillHeight: true @@ -188,7 +189,7 @@ Window { } //! [3] - NewButton { + Button { id: orthoToggle Layout.fillWidth: true Layout.fillHeight: true @@ -214,7 +215,7 @@ Window { } } - NewButton { + Button { id: flipGridToggle Layout.fillWidth: true Layout.fillHeight: true @@ -230,7 +231,7 @@ Window { } } - NewButton { + Button { id: labelOffsetToggle Layout.fillWidth: true Layout.fillHeight: true @@ -245,7 +246,7 @@ Window { } } - NewButton { + Button { id: surfaceGridToggle Layout.fillWidth: true Layout.fillHeight: true diff --git a/examples/datavisualization/qmlspectrogram/qmlspectrogram.qrc b/examples/datavisualization/qmlspectrogram/qmlspectrogram.qrc index 9f024404..8c323f37 100644 --- a/examples/datavisualization/qmlspectrogram/qmlspectrogram.qrc +++ b/examples/datavisualization/qmlspectrogram/qmlspectrogram.qrc @@ -2,6 +2,5 @@ <qresource prefix="/qml"> <file>qml/qmlspectrogram/Data.qml</file> <file>qml/qmlspectrogram/main.qml</file> - <file>qml/qmlspectrogram/NewButton.qml</file> </qresource> </RCC> diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml index 062db602..ab976995 100644 --- a/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml +++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml @@ -27,7 +27,7 @@ ** ****************************************************************************/ -import QtQuick 2.1 +import QtQuick Item { property alias model: dataModel diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/NewButton.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/NewButton.qml deleted file mode 100644 index 19309cca..00000000 --- a/examples/datavisualization/qmlsurface/qml/qmlsurface/NewButton.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight + 10 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml index 8a0802cb..107e2f75 100644 --- a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml +++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml @@ -27,9 +27,10 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtDataVisualization 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtDataVisualization import "." Rectangle { @@ -135,7 +136,7 @@ Rectangle { anchors.right: parent.right opacity: 0.5 - NewButton { + Button { id: surfaceGridToggle Layout.fillWidth: true Layout.fillHeight: true @@ -153,7 +154,7 @@ Rectangle { //! [1] } - NewButton { + Button { id: surfaceToggle Layout.fillWidth: true Layout.fillHeight: true @@ -171,7 +172,7 @@ Rectangle { //! [8] } - NewButton { + Button { id: flatShadingToggle Layout.fillWidth: true Layout.fillHeight: true @@ -192,7 +193,7 @@ Rectangle { //! [2] } - NewButton { + Button { id: backgroundToggle Layout.fillWidth: true Layout.fillHeight: true @@ -208,7 +209,7 @@ Rectangle { } } - NewButton { + Button { id: gridToggle Layout.fillWidth: true Layout.fillHeight: true @@ -224,7 +225,7 @@ Rectangle { } } - NewButton { + Button { id: seriesToggle Layout.fillWidth: true Layout.fillHeight: true diff --git a/examples/datavisualization/qmlsurface/qmlsurface.qrc b/examples/datavisualization/qmlsurface/qmlsurface.qrc index c27f2d56..e32f1534 100644 --- a/examples/datavisualization/qmlsurface/qmlsurface.qrc +++ b/examples/datavisualization/qmlsurface/qmlsurface.qrc @@ -2,7 +2,6 @@ <qresource prefix="/qml"> <file>qml/qmlsurface/main.qml</file> <file>qml/qmlsurface/Data.qml</file> - <file>qml/qmlsurface/NewButton.qml</file> </qresource> <qresource prefix="/heightmaps"> <file alias="image">heightmap.png</file> diff --git a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/NewButton.qml b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/NewButton.qml deleted file mode 100644 index 4b1dd5a3..00000000 --- a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/NewButton.qml +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: newbutton - - property alias text: buttonText.text - property real fontSize: 12 - - signal clicked - - implicitWidth: buttonText.implicitWidth + 5 - implicitHeight: buttonText.implicitHeight * 2 - - Button { - id: buttonText - width: parent.width - height: parent.height - - style: ButtonStyle { - label: Component { - Text { - text: buttonText.text - font.pointSize: fontSize - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - } - onClicked: newbutton.clicked() - } -} diff --git a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml index e5c48562..c02c399f 100644 --- a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml +++ b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml @@ -27,11 +27,10 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 -import QtDataVisualization 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtDataVisualization import "." Item { @@ -143,7 +142,6 @@ Item { //! [3] GroupBox { - flat: true Layout.fillWidth: true Column { spacing: 10 @@ -157,34 +155,19 @@ Item { CheckBox { id: layerOneToggle checked: true - style: CheckBoxStyle { - label: Label { - font.pointSize: fontSize - text: "Show Ground Layer" - } - } + text: "Show Ground Layer" } CheckBox { id: layerTwoToggle checked: true - style: CheckBoxStyle { - label: Label { - font.pointSize: fontSize - text: "Show Sea Layer" - } - } + text: "Show Sea Layer" } CheckBox { id: layerThreeToggle checked: true - style: CheckBoxStyle { - label: Label { - font.pointSize: fontSize - text: "Show Tectonic Layer" - } - } + text: "Show Tectonic Layer" } } } @@ -192,7 +175,6 @@ Item { //! [5] GroupBox { - flat: true Layout.fillWidth: true Column { spacing: 10 @@ -205,12 +187,7 @@ Item { CheckBox { id: layerOneGrid - style: CheckBoxStyle { - label: Label { - font.pointSize: fontSize - text: "Show Ground as Grid" - } - } + text: "Show Ground as Grid" onCheckedChanged: { if (checked) layerOneSeries.drawMode = Surface3DSeries.DrawWireframe @@ -221,12 +198,8 @@ Item { CheckBox { id: layerTwoGrid - style: CheckBoxStyle { - label: Label { - font.pointSize: fontSize - text: "Show Sea as Grid" - } - } + text: "Show Sea as Grid" + onCheckedChanged: { if (checked) layerTwoSeries.drawMode = Surface3DSeries.DrawWireframe @@ -237,12 +210,7 @@ Item { CheckBox { id: layerThreeGrid - style: CheckBoxStyle { - label: Label { - font.pointSize: fontSize - text: "Show Tectonic as Grid" - } - } + text: "Show Tectonic as Grid" onCheckedChanged: { if (checked) layerThreeSeries.drawMode = Surface3DSeries.DrawWireframe @@ -255,10 +223,9 @@ Item { //! [5] //! [6] - NewButton { + Button { id: sliceButton text: "Slice All Layers" - fontSize: fontSize Layout.fillWidth: true Layout.minimumHeight: 40 onClicked: { @@ -276,9 +243,8 @@ Item { } //! [6] - NewButton { + Button { id: shadowButton - fontSize: fontSize Layout.fillWidth: true Layout.minimumHeight: 40 text: surfaceLayers.shadowsSupported ? "Show Shadows" : "Shadows not supported" @@ -294,9 +260,8 @@ Item { } } - NewButton { + Button { id: renderModeButton - fontSize: fontSize text: "Switch Render Mode" Layout.fillWidth: true Layout.minimumHeight: 40 diff --git a/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc b/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc index 028a91db..71c2ea33 100644 --- a/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc +++ b/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc @@ -1,7 +1,6 @@ <RCC> <qresource prefix="/"> <file>qml/qmlsurfacelayers/main.qml</file> - <file>qml/qmlsurfacelayers/NewButton.qml</file> </qresource> <qresource prefix="/heightmaps"> <file>layer_1.png</file> |