From c11aa82e3b28dc1d386b8451b64365cfef893bbd Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Fri, 15 Jan 2016 14:50:38 +0200 Subject: Improve qt datavis demo For now just minor changes, plan is to replace the buttons with more fancy stuff Change-Id: I32a8a17326cd52dc0927cb4f9e3a25ab65311b56 Task-number: QTRD-3782 Reviewed-by: Kimmo Ollila --- basicsuite/enterprise-qtdatavis3d/main.qml | 20 +++++++++----------- basicsuite/enterprise-qtdatavis3d/preview_l.jpg | Bin 101747 -> 77166 bytes 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/basicsuite/enterprise-qtdatavis3d/main.qml b/basicsuite/enterprise-qtdatavis3d/main.qml index a84baca..8651f2d 100644 --- a/basicsuite/enterprise-qtdatavis3d/main.qml +++ b/basicsuite/enterprise-qtdatavis3d/main.qml @@ -27,10 +27,6 @@ import "." Item { id: mainview - function toPixels(percentage) { - return percentage * Math.min(mainview.width, mainview.height); - } - Item { id: surfaceView width: mainview.width - buttonLayout.width @@ -123,6 +119,7 @@ Item { anchors.left: parent.left anchors.bottom: parent.bottom spacing: 0 + property int buttonWidth: Math.min(engine.centimeter(3), parent.height/7 - engine.mm(2)) Column { Layout.fillWidth: true spacing: 5 @@ -130,7 +127,7 @@ Item { id: layerOneToggle text: "Ground\n Layer" checked: true - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } } @@ -139,7 +136,7 @@ Item { id: layerTwoToggle text: "Sea\n Layer" checked: true - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } } @@ -148,7 +145,7 @@ Item { id: layerThreeToggle text: "Tectonic\n Layer" checked: true - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } } @@ -160,7 +157,7 @@ Item { ToggleButton { id: layerOneGrid text: "Ground\n as\n Grid" - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } onCheckedChanged: { @@ -174,7 +171,7 @@ Item { ToggleButton { id: layerTwoGrid text: "Sea\n as\n Grid" - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } onCheckedChanged: { @@ -188,8 +185,9 @@ Item { ToggleButton { id: layerThreeGrid text: "Tectonic\n as\n Grid" - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width + style: ToggleButtonStyle { } onCheckedChanged: { if (checked) @@ -206,7 +204,7 @@ Item { ToggleButton { id: sliceButton text: "Slice\n All\n Layers" - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } onClicked: { diff --git a/basicsuite/enterprise-qtdatavis3d/preview_l.jpg b/basicsuite/enterprise-qtdatavis3d/preview_l.jpg index 290546f..ceb7048 100644 Binary files a/basicsuite/enterprise-qtdatavis3d/preview_l.jpg and b/basicsuite/enterprise-qtdatavis3d/preview_l.jpg differ -- cgit v1.2.3