summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-12-02 08:43:02 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-12-02 09:01:25 +0200
commit94235c2e633845951ce6c947965789bb3f8ee7c4 (patch)
tree60f902b9defe670736dff4bf33d13ef5bfb57804 /examples
parent91c9f6791af049b873b7c60a88aa226eaec70c18 (diff)
Theme documented
Task-number: QTRD-2633 Change-Id: Ib274ec236f50145df8fd4c2d83f62d4a9154687a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/audiolevels/audiolevels.cpp2
-rw-r--r--examples/bars/graphmodifier.cpp2
-rw-r--r--examples/custominput/scatterdatamodifier.cpp2
-rw-r--r--examples/customproxy/rainfallgraph.cpp2
-rw-r--r--examples/itemmodel/main.cpp2
-rw-r--r--examples/qmlbars/qml/qmlbars/main.qml2
-rw-r--r--examples/qmlcustominput/qml/qmlcustominput/main.qml2
-rw-r--r--examples/qmlscatter/qml/qmlscatter/main.qml8
-rw-r--r--examples/qmlsurface/qml/qmlsurface/main.qml2
-rw-r--r--examples/scatter/scatterdatamodifier.cpp4
-rw-r--r--examples/surface/surfacegraph.cpp2
11 files changed, 15 insertions, 15 deletions
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]