summaryrefslogtreecommitdiffstats
path: root/examples/qmlsurface
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-11-04 13:40:09 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-11-04 13:46:52 +0200
commit0d5caf7904098186e50009627996191dc7f8687b (patch)
treeabff5454cd8839e77f6e9484f92556bb733f3cb1 /examples/qmlsurface
parent9cb3cf372155e2a57c15e4044a3684694ff1b1bd (diff)
Surface toggling API implemented
Task-number: QTRD-2337 Change-Id: I59695a042c864faed90839c4e566fcece5cb94f4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples/qmlsurface')
-rw-r--r--examples/qmlsurface/qml/qmlsurface/main.qml18
1 files changed, 17 insertions, 1 deletions
diff --git a/examples/qmlsurface/qml/qmlsurface/main.qml b/examples/qmlsurface/qml/qmlsurface/main.qml
index ab266c56..600d75c1 100644
--- a/examples/qmlsurface/qml/qmlsurface/main.qml
+++ b/examples/qmlsurface/qml/qmlsurface/main.qml
@@ -104,9 +104,25 @@ Item {
}
NewButton {
- id: smoothSurfaceToggle
+ id: surfaceToggle
anchors.top: surfaceGridToggle.bottom
width: surfaceGridToggle.width
+ text: "Hide Surface"
+ onClicked: {
+ if (surfaceplot.surfaceVisible === true) {
+ surfaceplot.surfaceVisible = false;
+ text = "Show Surface"
+ } else {
+ surfaceplot.surfaceVisible = true;
+ text = "Hide Surface"
+ }
+ }
+ }
+
+ NewButton {
+ id: smoothSurfaceToggle
+ anchors.top: surfaceToggle.bottom
+ width: surfaceToggle.width
text: "Show Flat"
//! [2]
onClicked: {