diff options
author | Kimmo Ollila <kimmo.ollila@theqtcompany.com> | 2016-02-23 09:13:21 +0200 |
---|---|---|
committer | Kimmo Ollila <kimmo.ollila@theqtcompany.com> | 2016-03-02 12:51:24 +0000 |
commit | c6b5855b446c73f8a60cc3d4427fc445e0ba400d (patch) | |
tree | b57f45df2a297335392f56953410a4c3ab599a8d /src/settingsui/network/NetworkSettings.qml | |
parent | f1d884b6dad5a93d7a3077b6b05d3ec7fcd9a6ea (diff) |
Migrate settings UI to use Qt Quick Controls 2
Task-number: QTEE-1057
Change-Id: I389d784241d4b68384765dfde4b572e7652eb76c
Reviewed-by: Teemu Holappa <teemu.holappa@theqtcompany.com>
Diffstat (limited to 'src/settingsui/network/NetworkSettings.qml')
-rw-r--r-- | src/settingsui/network/NetworkSettings.qml | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/src/settingsui/network/NetworkSettings.qml b/src/settingsui/network/NetworkSettings.qml index 2eed812..d516426 100644 --- a/src/settingsui/network/NetworkSettings.qml +++ b/src/settingsui/network/NetworkSettings.qml @@ -33,21 +33,22 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import QtQuick 2.5 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles.Flat 1.0 as Flat -import "../common" +import QtQuick 2.6 +import QtQuick.Layouts 1.3 +import Qt.labs.controls 1.0 +import Qt.labs.controls.material 1.0 +import Qt.labs.controls.universal 1.0 import com.theqtcompany.settings.network 1.0 Item { property string title: qsTr("Network Settings") GroupBox { id: networkSelect - anchors.fill: parent anchors.rightMargin: parent.width * 0.618 - anchors.leftMargin: Math.round(20 * Flat.FlatStyle.scaleFactor) - anchors.topMargin: Math.round(20 * Flat.FlatStyle.scaleFactor) + anchors.leftMargin: 20 + anchors.topMargin: 20 + anchors.bottomMargin: 20 + anchors.fill: parent title: qsTr("Select Connection") function stateToStr(serviceState) { @@ -70,45 +71,37 @@ Item { return qsTr("Undefined"); } } - ColumnLayout { - width: networkSelect.width - ExclusiveGroup { - id: exgroup - } + width: parent.width Repeater { model: NetworkSettingsManager.interfaces Button { - implicitWidth: networkSelect.width - Math.round(20 * Flat.FlatStyle.scaleFactor) - implicitHeight: Math.round(54 * Flat.FlatStyle.scaleFactor) + Layout.fillWidth: true + implicitHeight: 54 checkable: true - exclusiveGroup: exgroup - Row { + label: Row { anchors.fill: parent - spacing: Math.round(10 * Flat.FlatStyle.scaleFactor) + spacing: 10 Image { - id: typeId - height: parent.height - width: height + id: typeId + height: parent.height + width: height } - Column { - height: Math.round(parent.height * 0.7) + height: parent.height * .7 spacing: 0 anchors.verticalCenter: parent.verticalCenter - TextLabel { + Label { text: name } - - TextLabel { + Label { text: networkSelect.stateToStr(modelData.state) - font.pixelSize: Math.round(12 * Flat.FlatStyle.scaleFactor) + font.pixelSize: 12 } - } } @@ -131,7 +124,10 @@ Item { NetworkDetails { id: networkDetails + anchors.leftMargin: networkSelect.width + 40 + anchors.topMargin: 20 + anchors.rightMargin: 20 + anchors.bottomMargin: 20 anchors.fill: parent - anchors.leftMargin: networkSelect.width + Math.round(20 * Flat.FlatStyle.scaleFactor) } } |