summaryrefslogtreecommitdiffstats
path: root/examples/datavisualization/graphgallery/surfacegraphmodifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/datavisualization/graphgallery/surfacegraphmodifier.cpp')
-rw-r--r--examples/datavisualization/graphgallery/surfacegraphmodifier.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/datavisualization/graphgallery/surfacegraphmodifier.cpp b/examples/datavisualization/graphgallery/surfacegraphmodifier.cpp
index 527a0d4a..190a96b9 100644
--- a/examples/datavisualization/graphgallery/surfacegraphmodifier.cpp
+++ b/examples/datavisualization/graphgallery/surfacegraphmodifier.cpp
@@ -152,10 +152,10 @@ void SurfaceGraphModifier::fillSqrtSinProxy()
float stepZ = (sampleMax - sampleMin) / float(sampleCountZ - 1);
//! [1]
- QSurfaceDataArray *dataArray = new QSurfaceDataArray;
+ auto *dataArray = new QSurfaceDataArray;
dataArray->reserve(sampleCountZ);
for (int i = 0 ; i < sampleCountZ ; ++i) {
- QSurfaceDataRow *newRow = new QSurfaceDataRow;
+ auto *newRow = new QSurfaceDataRow;
newRow->reserve(sampleCountX);
// Keep values within range bounds, since just adding step can cause minor drift due
// to the rounding errors.
@@ -447,10 +447,10 @@ void SurfaceGraphModifier::toggleItemOne(bool show)
color.fill(Qt::red);
//! [9]
//! [11]
- QCustom3DItem *item = new QCustom3DItem(":/data/oilrig.obj", positionOne,
- QVector3D(0.025f, 0.025f, 0.025f),
- QQuaternion::fromAxisAndAngle(0.f, 1.f, 0.f, 45.f),
- color);
+ auto *item = new QCustom3DItem(":/data/oilrig.obj", positionOne,
+ QVector3D(0.025f, 0.025f, 0.025f),
+ QQuaternion::fromAxisAndAngle(0.f, 1.f, 0.f, 45.f),
+ color);
//! [11]
//! [12]
m_graph->addCustomItem(item);
@@ -463,7 +463,7 @@ void SurfaceGraphModifier::toggleItemOne(bool show)
m_graph->addCustomItem(item);
//! [13]
- QCustom3DLabel *label = new QCustom3DLabel();
+ auto *label = new QCustom3DLabel();
label->setText("Oil Rig One");
label->setPosition(positionOneLabel);
label->setScaling(QVector3D(1.f, 1.f, 1.f));
@@ -487,7 +487,7 @@ void SurfaceGraphModifier::toggleItemTwo(bool show)
if (show) {
QImage color = QImage(2, 2, QImage::Format_RGB32);
color.fill(Qt::red);
- QCustom3DItem *item = new QCustom3DItem();
+ auto *item = new QCustom3DItem();
item->setMeshFile(":/data/oilrig.obj");
item->setPosition(positionTwo);
item->setScaling(QVector3D(0.025f, 0.025f, 0.025f));
@@ -501,7 +501,7 @@ void SurfaceGraphModifier::toggleItemTwo(bool show)
item->setShadowCasting(false);
m_graph->addCustomItem(item);
- QCustom3DLabel *label = new QCustom3DLabel();
+ auto *label = new QCustom3DLabel();
label->setText("Oil Rig Two");
label->setPosition(positionTwoLabel);
label->setScaling(QVector3D(1.f, 1.f, 1.f));
@@ -521,7 +521,7 @@ void SurfaceGraphModifier::toggleItemThree(bool show)
if (show) {
QImage color = QImage(2, 2, QImage::Format_RGB32);
color.fill(Qt::darkMagenta);
- QCustom3DItem *item = new QCustom3DItem();
+ auto *item = new QCustom3DItem();
item->setMeshFile(":/data/refinery.obj");
item->setPosition(positionThree);
item->setScaling(QVector3D(0.04f, 0.04f, 0.04f));
@@ -529,7 +529,7 @@ void SurfaceGraphModifier::toggleItemThree(bool show)
item->setTextureImage(color);
m_graph->addCustomItem(item);
- QCustom3DLabel *label = new QCustom3DLabel();
+ auto *label = new QCustom3DLabel();
label->setText("Refinery");
label->setPosition(positionThreeLabel);
label->setScaling(QVector3D(1.f, 1.f, 1.f));