From 94235c2e633845951ce6c947965789bb3f8ee7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Mon, 2 Dec 2013 08:43:02 +0200 Subject: Theme documented Task-number: QTRD-2633 Change-Id: Ib274ec236f50145df8fd4c2d83f62d4a9154687a Reviewed-by: Miikka Heikkinen --- examples/audiolevels/audiolevels.cpp | 2 +- examples/bars/graphmodifier.cpp | 2 +- examples/custominput/scatterdatamodifier.cpp | 2 +- examples/customproxy/rainfallgraph.cpp | 2 +- examples/itemmodel/main.cpp | 2 +- examples/qmlbars/qml/qmlbars/main.qml | 2 +- examples/qmlcustominput/qml/qmlcustominput/main.qml | 2 +- examples/qmlscatter/qml/qmlscatter/main.qml | 8 ++++---- examples/qmlsurface/qml/qmlsurface/main.qml | 2 +- examples/scatter/scatterdatamodifier.cpp | 4 ++-- examples/surface/surfacegraph.cpp | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) (limited to 'examples') diff --git a/examples/audiolevels/audiolevels.cpp b/examples/audiolevels/audiolevels.cpp index 5b2c16ba..2786e5c5 100644 --- a/examples/audiolevels/audiolevels.cpp +++ b/examples/audiolevels/audiolevels.cpp @@ -46,7 +46,7 @@ AudioLevels::AudioLevels(Q3DBars *graph, QObject *parent) m_graph->setShadowQuality(QDataVis::ShadowQualityNone); m_graph->setSelectionMode(QDataVis::SelectionNone); m_graph->scene()->activeCamera()->setCameraPosition(-25.0f, 10.0f, 190.0f); - m_graph->setTheme(new Q3DTheme(QDataVis::ThemeIsabelle)); + m_graph->setTheme(new Q3DTheme(Q3DTheme::ThemeIsabelle)); m_graph->theme()->setGridEnabled(true); m_graph->theme()->setBackgroundEnabled(false); QBar3DSeries *series = new QBar3DSeries; diff --git a/examples/bars/graphmodifier.cpp b/examples/bars/graphmodifier.cpp index 23cefeb4..09c45c6f 100644 --- a/examples/bars/graphmodifier.cpp +++ b/examples/bars/graphmodifier.cpp @@ -185,7 +185,7 @@ void GraphModifier::changePresetCamera() void GraphModifier::changeTheme(int theme) { - m_graph->setTheme(new Q3DTheme(QDataVis::Theme(theme))); + m_graph->setTheme(new Q3DTheme(Q3DTheme::Theme(theme))); emit backgroundEnabledChanged(m_graph->theme()->isBackgroundEnabled()); emit gridEnabledChanged(m_graph->theme()->isGridEnabled()); emit fontChanged(m_graph->theme()->font()); diff --git a/examples/custominput/scatterdatamodifier.cpp b/examples/custominput/scatterdatamodifier.cpp index 6d7abf4f..a712be17 100644 --- a/examples/custominput/scatterdatamodifier.cpp +++ b/examples/custominput/scatterdatamodifier.cpp @@ -32,7 +32,7 @@ ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter) : m_graph(scatter), m_inputHandler(new CustomInputHandler()) { - m_graph->setTheme(new Q3DTheme(QDataVis::ThemeDigia)); + m_graph->setTheme(new Q3DTheme(Q3DTheme::ThemeDigia)); m_graph->setShadowQuality(QDataVis::ShadowQualitySoftLow); m_graph->scene()->activeCamera()->setCameraPreset(QDataVis::CameraPresetFront); diff --git a/examples/customproxy/rainfallgraph.cpp b/examples/customproxy/rainfallgraph.cpp index 6556a296..36fd3733 100644 --- a/examples/customproxy/rainfallgraph.cpp +++ b/examples/customproxy/rainfallgraph.cpp @@ -72,7 +72,7 @@ RainfallGraph::RainfallGraph(Q3DBars *rainfall) m_graph->setSelectionMode(QDataVis::SelectionItemAndColumn | QDataVis::SelectionSlice); // Set theme - m_graph->setTheme(new Q3DTheme(QDataVis::ThemeArmyBlue)); + m_graph->setTheme(new Q3DTheme(Q3DTheme::ThemeArmyBlue)); // Set font to theme m_graph->theme()->setFont(QFont("Century Gothic", 30)); diff --git a/examples/itemmodel/main.cpp b/examples/itemmodel/main.cpp index 708fd723..3d06f5c1 100644 --- a/examples/itemmodel/main.cpp +++ b/examples/itemmodel/main.cpp @@ -107,7 +107,7 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid //! [7] // Set theme - m_graph->setTheme(new Q3DTheme(QDataVis::ThemeDigia)); + m_graph->setTheme(new Q3DTheme(Q3DTheme::ThemeDigia)); // Set font m_graph->theme()->setFont(QFont("Impact", 20)); diff --git a/examples/qmlbars/qml/qmlbars/main.qml b/examples/qmlbars/qml/qmlbars/main.qml index 7f9c8039..742a2a62 100644 --- a/examples/qmlbars/qml/qmlbars/main.qml +++ b/examples/qmlbars/qml/qmlbars/main.qml @@ -79,7 +79,7 @@ Item { shadowQuality: AbstractGraph3D.ShadowQualityMedium selectionMode: AbstractGraph3D.SelectionItem theme: Theme3D { - type: AbstractGraph3D.ThemeRetro + type: Theme3D.ThemeRetro labelBorderEnabled: true font.pointSize: 35 labelBackgroundEnabled: true diff --git a/examples/qmlcustominput/qml/qmlcustominput/main.qml b/examples/qmlcustominput/qml/qmlcustominput/main.qml index 005b40a0..a7e7f466 100644 --- a/examples/qmlcustominput/qml/qmlcustominput/main.qml +++ b/examples/qmlcustominput/qml/qmlcustominput/main.qml @@ -42,7 +42,7 @@ Item { id: scatterGraph width: dataView.width height: dataView.height - theme: Theme3D { type: AbstractGraph3D.ThemeDigia } + theme: Theme3D { type: Theme3D.ThemeDigia } shadowQuality: AbstractGraph3D.ShadowQualitySoftMedium scene.activeCamera.yRotation: 30.0 //! [1] diff --git a/examples/qmlscatter/qml/qmlscatter/main.qml b/examples/qmlscatter/qml/qmlscatter/main.qml index e4f95d09..636239bf 100644 --- a/examples/qmlscatter/qml/qmlscatter/main.qml +++ b/examples/qmlscatter/qml/qmlscatter/main.qml @@ -52,7 +52,7 @@ Item { //! [2] //! [3] theme: Theme3D { - type: AbstractGraph3D.ThemeIsabelle + type: Theme3D.ThemeIsabelle font.family: "Lucida Handwriting" font.pointSize: 40 } @@ -139,12 +139,12 @@ Item { text: "Change Theme" anchors.left: cameraToggle.right onClicked: { - if (scatterGraph.theme.type === AbstractGraph3D.ThemeArmyBlue) { + 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: AbstractGraph3D.ThemeIsabelle}', parent); + scatterGraph.theme = Qt.createQmlObject('import QtDataVisualization 1.0; Theme3D {type: Theme3D.ThemeIsabelle}', parent); } else { - scatterGraph.theme = Qt.createQmlObject('import QtDataVisualization 1.0; Theme3D {type: AbstractGraph3D.ThemeArmyBlue}', parent); + scatterGraph.theme = Qt.createQmlObject('import QtDataVisualization 1.0; Theme3D {type: Theme3D.ThemeArmyBlue}', parent); } } } diff --git a/examples/qmlsurface/qml/qmlsurface/main.qml b/examples/qmlsurface/qml/qmlsurface/main.qml index 49cfb148..e0cb0d46 100644 --- a/examples/qmlsurface/qml/qmlsurface/main.qml +++ b/examples/qmlsurface/qml/qmlsurface/main.qml @@ -50,7 +50,7 @@ Item { width: surfaceView.width height: surfaceView.height theme: Theme3D { - type: AbstractGraph3D.ThemeStoneMoss + type: Theme3D.ThemeStoneMoss font.family: "STCaiyun" font.pointSize: 35 } diff --git a/examples/scatter/scatterdatamodifier.cpp b/examples/scatter/scatterdatamodifier.cpp index ee49402a..db1b408a 100644 --- a/examples/scatter/scatterdatamodifier.cpp +++ b/examples/scatter/scatterdatamodifier.cpp @@ -39,7 +39,7 @@ ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter) m_smooth(true) { //! [0] - m_graph->setTheme(new Q3DTheme(QDataVis::ThemeEbony)); + m_graph->setTheme(new Q3DTheme(Q3DTheme::ThemeEbony)); QFont font = m_graph->theme()->font(); font.setPointSize(m_fontSize); m_graph->theme()->setFont(font); @@ -136,7 +136,7 @@ void ScatterDataModifier::setSmoothDots(int smooth) void ScatterDataModifier::changeTheme(int theme) { - m_graph->setTheme(new Q3DTheme(QDataVis::Theme(theme))); + m_graph->setTheme(new Q3DTheme(Q3DTheme::Theme(theme))); emit backgroundEnabledChanged(m_graph->theme()->isBackgroundEnabled()); emit gridEnabledChanged(m_graph->theme()->isGridEnabled()); emit fontChanged(m_graph->theme()->font()); diff --git a/examples/surface/surfacegraph.cpp b/examples/surface/surfacegraph.cpp index d54bf9ff..7008a32b 100644 --- a/examples/surface/surfacegraph.cpp +++ b/examples/surface/surfacegraph.cpp @@ -226,7 +226,7 @@ void SurfaceGraph::setAxisZRange(float min, float max) //! [6] void SurfaceGraph::changeTheme(int theme) { - m_graph->setTheme(new Q3DTheme(QDataVis::Theme(theme))); + m_graph->setTheme(new Q3DTheme(Q3DTheme::Theme(theme))); } //! [6] -- cgit v1.2.3