diff options
Diffstat (limited to 'examples/qmlscatter/qml/qmlscatter')
-rw-r--r-- | examples/qmlscatter/qml/qmlscatter/data.qml | 3 | ||||
-rw-r--r-- | examples/qmlscatter/qml/qmlscatter/main.qml | 44 | ||||
-rw-r--r-- | examples/qmlscatter/qml/qmlscatter/newbutton.qml | 2 |
3 files changed, 25 insertions, 24 deletions
diff --git a/examples/qmlscatter/qml/qmlscatter/data.qml b/examples/qmlscatter/qml/qmlscatter/data.qml index bf4853df..23c4e5d5 100644 --- a/examples/qmlscatter/qml/qmlscatter/data.qml +++ b/examples/qmlscatter/qml/qmlscatter/data.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** @@ -17,7 +17,6 @@ ****************************************************************************/ import QtQuick 2.1 -import QtDataVisualization 1.0 Item { //! [1] diff --git a/examples/qmlscatter/qml/qmlscatter/main.qml b/examples/qmlscatter/qml/qmlscatter/main.qml index 62727f84..beb4ccaa 100644 --- a/examples/qmlscatter/qml/qmlscatter/main.qml +++ b/examples/qmlscatter/qml/qmlscatter/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** @@ -30,16 +30,22 @@ Item { //! [4] Data { - id: seriesOneData + id: seriesData } //! [4] - Data { - id: seriesTwoData + //! [13] + Theme3D { + id: themeIsabelle + type: Theme3D.ThemeIsabelle + font.family: "Lucida Handwriting" + font.pointSize: 40 } + //! [13] - Data { - id: seriesThreeData + Theme3D { + id: themeArmyBlue + type: Theme3D.ThemeArmyBlue } //! [8] @@ -59,11 +65,7 @@ Item { height: dataView.height //! [2] //! [3] - theme: Theme3D { - type: Theme3D.ThemeIsabelle - font.family: "Lucida Handwriting" - font.pointSize: 40 - } + theme: themeIsabelle shadowQuality: AbstractGraph3D.ShadowQualitySoftLow //! [3] //! [6] @@ -87,7 +89,7 @@ Item { //! [11] ItemModelScatterDataProxy { - itemModel: seriesOneData.model + itemModel: seriesData.model xPosRole: "xPos" yPosRole: "yPos" zPosRole: "zPos" @@ -104,7 +106,7 @@ Item { //! [12] ItemModelScatterDataProxy { - itemModel: seriesTwoData.modelTwo + itemModel: seriesData.modelTwo xPosRole: "xPos" yPosRole: "yPos" zPosRole: "zPos" @@ -117,7 +119,7 @@ Item { mesh: Abstract3DSeries.MeshMinimal ItemModelScatterDataProxy { - itemModel: seriesThreeData.modelThree + itemModel: seriesData.modelThree xPosRole: "xPos" yPosRole: "yPos" zPosRole: "zPos" @@ -188,14 +190,14 @@ Item { text: "Change Theme" onClicked: { if (scatterGraph.theme.type === Theme3D.ThemeArmyBlue) { - // Ownership of the theme is transferred and old theme is destroyed when setting - // a new one, so we need to create them dynamically - scatterGraph.theme = Qt.createQmlObject('import QtDataVisualization 1.0; - Theme3D {type: Theme3D.ThemeIsabelle; font.family: "Lucida Handwriting"; - font.pointSize: 40}', parent); + scatterGraph.theme = themeIsabelle + } else { + scatterGraph.theme = themeArmyBlue + } + if (scatterGraph.theme.backgroundEnabled === true) { + backgroundToggle.text = "Hide Background"; } else { - scatterGraph.theme = Qt.createQmlObject('import QtDataVisualization 1.0; - Theme3D {type: Theme3D.ThemeArmyBlue}', parent); + backgroundToggle.text = "Show Background"; } } } diff --git a/examples/qmlscatter/qml/qmlscatter/newbutton.qml b/examples/qmlscatter/qml/qmlscatter/newbutton.qml index e44c9d1a..e4fb99d2 100644 --- a/examples/qmlscatter/qml/qmlscatter/newbutton.qml +++ b/examples/qmlscatter/qml/qmlscatter/newbutton.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** |