summaryrefslogtreecommitdiffstats
path: root/examples/qmlsurface/qml/qmlsurface/main.qml
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-11-28 06:40:59 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-11-28 08:10:29 +0200
commit5fde532408da5b6b3ddef13aff5e07f32015e7d9 (patch)
tree8a243126c37a92be3ca14734adc5074a9642c129 /examples/qmlsurface/qml/qmlsurface/main.qml
parent964897e316c0fd524cba3a3cbb3c32fad53f965a (diff)
Visual properties moved to theme
Task-number: QTRD-2632 Change-Id: I91eaa8fa26e232de24fe89ef0c8a2fc53f31fb8c Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/qmlsurface/qml/qmlsurface/main.qml')
-rw-r--r--examples/qmlsurface/qml/qmlsurface/main.qml20
1 files changed, 11 insertions, 9 deletions
diff --git a/examples/qmlsurface/qml/qmlsurface/main.qml b/examples/qmlsurface/qml/qmlsurface/main.qml
index f83dc9a9..49cfb148 100644
--- a/examples/qmlsurface/qml/qmlsurface/main.qml
+++ b/examples/qmlsurface/qml/qmlsurface/main.qml
@@ -49,13 +49,15 @@ Item {
id: surfaceplot
width: surfaceView.width
height: surfaceView.height
- theme: Theme3D { type: AbstractGraph3D.ThemeStoneMoss }
+ theme: Theme3D {
+ type: AbstractGraph3D.ThemeStoneMoss
+ font.family: "STCaiyun"
+ font.pointSize: 35
+ }
shadowQuality: AbstractGraph3D.ShadowQualityMedium
selectionMode: AbstractGraph3D.SelectionSlice | AbstractGraph3D.SelectionItemAndRow
smoothSurfaceEnabled: true
surfaceGridEnabled: false
- font.family: "STCaiyun"
- font.pointSize: 35
scene.activeCamera.cameraPreset: AbstractGraph3D.CameraPresetIsometricLeft
axisY.min: 0.0
axisY.max: 500.0
@@ -167,11 +169,11 @@ Item {
width: smoothSurfaceToggle.width
text: "Hide Background"
onClicked: {
- if (surfaceplot.backgroundVisible === true) {
- surfaceplot.backgroundVisible = false;
+ if (surfaceplot.theme.backgroundEnabled === true) {
+ surfaceplot.theme.backgroundEnabled = false;
text = "Show Background"
} else {
- surfaceplot.backgroundVisible = true;
+ surfaceplot.theme.backgroundEnabled = true;
text = "Hide Background"
}
}
@@ -183,11 +185,11 @@ Item {
width: backgroundToggle.width
text: "Hide Grid"
onClicked: {
- if (surfaceplot.gridVisible === true) {
- surfaceplot.gridVisible = false;
+ if (surfaceplot.theme.gridEnabled === true) {
+ surfaceplot.theme.gridEnabled = false;
text = "Show Grid"
} else {
- surfaceplot.gridVisible = true;
+ surfaceplot.theme.gridEnabled = true;
text = "Hide Grid"
}
}