diff options
author | Robert Brock <robert.brock@kdab.com> | 2016-01-18 17:32:57 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-01-19 18:42:15 +0000 |
commit | aa6371900b038199b04a7977b199098c2d2b83da (patch) | |
tree | fecfcfd41ceecba09911f6f5eb22b0bdd8893b9e /examples/qt3d/basicshapes-cpp/main.cpp | |
parent | 06a4f3e651d5afd28e2e5552abbef9d850538dba (diff) |
Cone and Plane added to Basic shapes
Existing shapes have been moved outward to 5 and -5 x.
Cone and plane were then added at x: 0
Task-number: QTBUG-41548
Change-Id: I65a3a1998b010179e4171686f71d52ce42e112ec
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/qt3d/basicshapes-cpp/main.cpp')
-rw-r--r-- | examples/qt3d/basicshapes-cpp/main.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/examples/qt3d/basicshapes-cpp/main.cpp b/examples/qt3d/basicshapes-cpp/main.cpp index 90c926ac3..4c3ea2e90 100644 --- a/examples/qt3d/basicshapes-cpp/main.cpp +++ b/examples/qt3d/basicshapes-cpp/main.cpp @@ -116,13 +116,18 @@ int main(int argc, char **argv) // Create control widgets QCommandLinkButton *info = new QCommandLinkButton(); info->setText(QStringLiteral("Qt3D ready-made meshes")); - info->setDescription(QStringLiteral("Qt3D provides several ready-made meshes, like torus, cylinder, cube and sphere.")); + info->setDescription(QString::fromLatin1("Qt3D provides several ready-made meshes, like torus, cylinder, cone, " + "cube, plane and sphere.")); info->setIconSize(QSize(0,0)); QCheckBox *torusCB = new QCheckBox(widget); torusCB->setChecked(true); torusCB->setText(QStringLiteral("Torus")); + QCheckBox *coneCB = new QCheckBox(widget); + coneCB->setChecked(true); + coneCB->setText(QStringLiteral("Cone")); + QCheckBox *cylinderCB = new QCheckBox(widget); cylinderCB->setChecked(true); cylinderCB->setText(QStringLiteral("Cylinder")); @@ -131,28 +136,40 @@ int main(int argc, char **argv) cuboidCB->setChecked(true); cuboidCB->setText(QStringLiteral("Cuboid")); + QCheckBox *planeCB = new QCheckBox(widget); + planeCB->setChecked(true); + planeCB->setText(QStringLiteral("Plane")); + QCheckBox *sphereCB = new QCheckBox(widget); sphereCB->setChecked(true); sphereCB->setText(QStringLiteral("Sphere")); vLayout->addWidget(info); vLayout->addWidget(torusCB); + vLayout->addWidget(coneCB); vLayout->addWidget(cylinderCB); vLayout->addWidget(cuboidCB); + vLayout->addWidget(planeCB); vLayout->addWidget(sphereCB); QObject::connect(torusCB, &QCheckBox::stateChanged, modifier, &SceneModifier::enableTorus); + QObject::connect(coneCB, &QCheckBox::stateChanged, + modifier, &SceneModifier::enableCone); QObject::connect(cylinderCB, &QCheckBox::stateChanged, modifier, &SceneModifier::enableCylinder); QObject::connect(cuboidCB, &QCheckBox::stateChanged, modifier, &SceneModifier::enableCuboid); + QObject::connect(planeCB, &QCheckBox::stateChanged, + modifier, &SceneModifier::enablePlane); QObject::connect(sphereCB, &QCheckBox::stateChanged, modifier, &SceneModifier::enableSphere); torusCB->setChecked(true); + coneCB->setChecked(true); cylinderCB->setChecked(true); cuboidCB->setChecked(true); + planeCB->setChecked(true); sphereCB->setChecked(true); // Show window |