diff options
Diffstat (limited to 'examples/ivivehiclefunctions')
-rw-r--r-- | examples/ivivehiclefunctions/climate_qml/main.qml | 15 | ||||
-rw-r--r-- | examples/ivivehiclefunctions/window_qml/WindowItem.qml | 19 | ||||
-rw-r--r-- | examples/ivivehiclefunctions/window_qml/main.qml | 22 |
3 files changed, 32 insertions, 24 deletions
diff --git a/examples/ivivehiclefunctions/climate_qml/main.qml b/examples/ivivehiclefunctions/climate_qml/main.qml index 737b99e..3a26d10 100644 --- a/examples/ivivehiclefunctions/climate_qml/main.qml +++ b/examples/ivivehiclefunctions/climate_qml/main.qml @@ -52,10 +52,9 @@ ****************************************************************************/ import QtQuick 2.4 -import QtQuick.Controls 1.3 +import QtQuick.Controls 2.15 import QtQuick.Window 2.2 import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.2 import QtIvi.VehicleFunctions 1.0 @@ -68,7 +67,7 @@ ApplicationWindow { //![1] ClimateControl { id: climateControl - discoveryMode: AbstractFeature.LoadOnlySimulationBackends + discoveryMode: ClimateControl.LoadOnlySimulationBackends } //![1] @@ -285,11 +284,15 @@ ApplicationWindow { } } - MessageDialog { + Dialog { id: messageDialog + anchors.centerIn: parent title: "Auto Discovery Failed !" - text: "No Climate Backend available" - icon: StandardIcon.Critical + standardButtons: Dialog.Ok + + Label { + text: "No Climate Backend available" + } } //![4] diff --git a/examples/ivivehiclefunctions/window_qml/WindowItem.qml b/examples/ivivehiclefunctions/window_qml/WindowItem.qml index 94be284..a164d25 100644 --- a/examples/ivivehiclefunctions/window_qml/WindowItem.qml +++ b/examples/ivivehiclefunctions/window_qml/WindowItem.qml @@ -52,10 +52,9 @@ ****************************************************************************/ import QtQuick 2.4 -import QtQuick.Controls 1.3 +import QtQuick.Controls 2.15 import QtQuick.Window 2.2 import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.2 import QtIvi.VehicleFunctions 1.0 @@ -109,13 +108,13 @@ GroupBox { } } - ExclusiveGroup { + ButtonGroup { id: blindGroup } RadioButton { text: "Open" - exclusiveGroup: blindGroup + ButtonGroup.group: blindGroup checked: zone.blindMode === WindowControl.BlindOpen onCheckedChanged: { if (checked) @@ -125,7 +124,7 @@ GroupBox { RadioButton { text: "Closed" - exclusiveGroup: blindGroup + ButtonGroup.group: blindGroup checked: zone.blindMode === WindowControl.BlindClosed onCheckedChanged: { if (checked) @@ -135,7 +134,7 @@ GroupBox { RadioButton { text: "Automatic" - exclusiveGroup: blindGroup + ButtonGroup.group: blindGroup checked: zone.blindMode === WindowControl.AutoBlind onCheckedChanged: { if (checked) @@ -161,13 +160,13 @@ GroupBox { } } - ExclusiveGroup { + ButtonGroup { id: heaterGroup } RadioButton { text: "On" - exclusiveGroup: heaterGroup + ButtonGroup.group: heaterGroup checked: zone.heaterMode === WindowControl.HeaterOn onCheckedChanged: { if (checked) @@ -177,7 +176,7 @@ GroupBox { RadioButton { text: "Off" - exclusiveGroup: heaterGroup + ButtonGroup.group: heaterGroup checked: zone.heaterMode === WindowControl.HeaterOff onCheckedChanged: { if (checked) @@ -187,7 +186,7 @@ GroupBox { RadioButton { text: "Automatic" - exclusiveGroup: heaterGroup + ButtonGroup.group: heaterGroup checked: zone.heaterMode === WindowControl.AutoHeater onCheckedChanged: { if (checked) diff --git a/examples/ivivehiclefunctions/window_qml/main.qml b/examples/ivivehiclefunctions/window_qml/main.qml index f719047..2564e07 100644 --- a/examples/ivivehiclefunctions/window_qml/main.qml +++ b/examples/ivivehiclefunctions/window_qml/main.qml @@ -52,26 +52,28 @@ ****************************************************************************/ import QtQuick 2.4 -import QtQuick.Controls 1.3 +import QtQuick.Controls 2.15 import QtQuick.Window 2.2 import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.2 import QtIvi.VehicleFunctions 1.0 ApplicationWindow { title: "Window Control" visible: true + width: mainLayout.width + height: mainLayout.height WindowControl { id: windowControl - discoveryMode: AbstractFeature.LoadOnlySimulationBackends + discoveryMode: WindowControl.LoadOnlySimulationBackends } ColumnLayout { + id: mainLayout WindowItem { title: "Roof" - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter zone: windowControl.zoneAt.Roof } @@ -99,16 +101,20 @@ ApplicationWindow { WindowItem { title: "Rear" - anchors.horizontalCenter: parent.horizontalCenter + Layout.alignment: Qt.AlignHCenter zone: windowControl.zoneAt.Rear } } - MessageDialog { + Dialog { id: messageDialog + anchors.centerIn: parent title: "Auto Discovery Failed !" - text: "No WindowControl Backend available" - icon: StandardIcon.Critical + standardButtons: Dialog.Ok + + Label { + text: "No WindowControl Backend available" + } } Component.onCompleted: { |