summaryrefslogtreecommitdiffstats
path: root/examples/surface
diff options
context:
space:
mode:
Diffstat (limited to 'examples/surface')
-rw-r--r--examples/surface/doc/images/surface-example.pngbin164522 -> 149046 bytes
-rw-r--r--examples/surface/doc/src/surface.qdoc5
-rw-r--r--examples/surface/main.cpp2
-rw-r--r--examples/surface/surfacegraph.cpp12
-rw-r--r--examples/surface/surfacegraph.h14
5 files changed, 17 insertions, 16 deletions
diff --git a/examples/surface/doc/images/surface-example.png b/examples/surface/doc/images/surface-example.png
index 77c1f900..c323df78 100644
--- a/examples/surface/doc/images/surface-example.png
+++ b/examples/surface/doc/images/surface-example.png
Binary files differ
diff --git a/examples/surface/doc/src/surface.qdoc b/examples/surface/doc/src/surface.qdoc
index 6f49a3dc..4b0ec63d 100644
--- a/examples/surface/doc/src/surface.qdoc
+++ b/examples/surface/doc/src/surface.qdoc
@@ -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
**
@@ -124,7 +124,8 @@
Q3DSurface supports all the themes Qt Data Visualization has. The example has a pull
down menu for selecting the theme. The following method is connected to the
- menu to activate the selected theme.
+ menu to activate the selected theme. The theme type is changed to another predefined theme,
+ which overwrites all theme properties to predefined values:
\snippet ../examples/surface/surfacegraph.cpp 6
diff --git a/examples/surface/main.cpp b/examples/surface/main.cpp
index 313ddf6d..4e82eca8 100644
--- a/examples/surface/main.cpp
+++ b/examples/surface/main.cpp
@@ -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
**
diff --git a/examples/surface/surfacegraph.cpp b/examples/surface/surfacegraph.cpp
index 7ebb6b72..5dd64c1f 100644
--- a/examples/surface/surfacegraph.cpp
+++ b/examples/surface/surfacegraph.cpp
@@ -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
**
@@ -18,7 +18,7 @@
#include "surfacegraph.h"
-#include <QtDataVisualization/Q3DValueAxis>
+#include <QtDataVisualization/QValue3DAxis>
#include <QtDataVisualization/Q3DTheme>
#include <QtGui/QImage>
#include <QtCore/qmath.h>
@@ -35,9 +35,9 @@ const float sampleMax = 8.0f;
SurfaceGraph::SurfaceGraph(Q3DSurface *surface)
: m_graph(surface)
{
- m_graph->setAxisX(new Q3DValueAxis);
- m_graph->setAxisY(new Q3DValueAxis);
- m_graph->setAxisZ(new Q3DValueAxis);
+ m_graph->setAxisX(new QValue3DAxis);
+ m_graph->setAxisY(new QValue3DAxis);
+ m_graph->setAxisZ(new QValue3DAxis);
//! [0]
m_sqrtSinProxy = new QSurfaceDataProxy();
@@ -229,7 +229,7 @@ void SurfaceGraph::setAxisZRange(float min, float max)
//! [6]
void SurfaceGraph::changeTheme(int theme)
{
- m_graph->setTheme(new Q3DTheme(Q3DTheme::Theme(theme)));
+ m_graph->activeTheme()->setType(Q3DTheme::Theme(theme));
}
//! [6]
diff --git a/examples/surface/surfacegraph.h b/examples/surface/surfacegraph.h
index ecdec672..8047be11 100644
--- a/examples/surface/surfacegraph.h
+++ b/examples/surface/surfacegraph.h
@@ -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
**
@@ -38,12 +38,12 @@ public:
void enableSqrtSinModel(bool enable);
//! [0]
- void toggleModeNone() { m_graph->setSelectionMode(QDataVis::SelectionNone); }
- void toggleModeItem() { m_graph->setSelectionMode(QDataVis::SelectionItem); }
- void toggleModeSliceRow() { m_graph->setSelectionMode(QDataVis::SelectionItemAndRow
- | QDataVis::SelectionSlice); }
- void toggleModeSliceColumn() { m_graph->setSelectionMode(QDataVis::SelectionItemAndColumn
- | QDataVis::SelectionSlice); }
+ void toggleModeNone() { m_graph->setSelectionMode(QAbstract3DGraph::SelectionNone); }
+ void toggleModeItem() { m_graph->setSelectionMode(QAbstract3DGraph::SelectionItem); }
+ void toggleModeSliceRow() { m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndRow
+ | QAbstract3DGraph::SelectionSlice); }
+ void toggleModeSliceColumn() { m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndColumn
+ | QAbstract3DGraph::SelectionSlice); }
//! [0]
void setBlackToYellowGradient();