summaryrefslogtreecommitdiffstats
path: root/examples/mapdata
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-05-28 09:17:30 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-05-28 09:22:51 +0300
commita3d0bd53dda283e5a0d1fb7ea7b4062589cb4928 (patch)
tree218567884b32f3d160bccc5cddbd4dfdce6b91a2 /examples/mapdata
parent79a68aaa027b57e9d845764aa692a4a59c8fa47a (diff)
Android: rotation and selection updated
Rotation by moving finger on screen selection by double-tapping a bar. Removed double layout addition from 2 examples. Change-Id: Ic294665f0056d80359c96473610609e920c4835b Change-Id: Ic294665f0056d80359c96473610609e920c4835b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'examples/mapdata')
-rw-r--r--examples/mapdata/main.cpp4
-rw-r--r--examples/mapdata/mapdata.cpp14
2 files changed, 13 insertions, 5 deletions
diff --git a/examples/mapdata/main.cpp b/examples/mapdata/main.cpp
index a7d227cb..976b2165 100644
--- a/examples/mapdata/main.cpp
+++ b/examples/mapdata/main.cpp
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
QWidget *widget = new QWidget;
QHBoxLayout *hLayout = new QHBoxLayout(widget);
- QVBoxLayout *vLayout = new QVBoxLayout(widget);
+ QVBoxLayout *vLayout = new QVBoxLayout();
Q3DMaps *chart = new Q3DMaps();
QSize screenSize = chart->screen()->size();
@@ -145,7 +145,7 @@ int main(int argc, char **argv)
QSlider *fontSizeSlider = new QSlider(Qt::Horizontal, widget);
fontSizeSlider->setTickInterval(1);
fontSizeSlider->setMinimum(1);
- fontSizeSlider->setValue(20);
+ fontSizeSlider->setValue(80);
fontSizeSlider->setMaximum(200);
// vLayout->addWidget(rotationCheckBox, 0, Qt::AlignTop);
diff --git a/examples/mapdata/mapdata.cpp b/examples/mapdata/mapdata.cpp
index 3d8dd58a..8f4aee7c 100644
--- a/examples/mapdata/mapdata.cpp
+++ b/examples/mapdata/mapdata.cpp
@@ -47,15 +47,23 @@ using namespace QtDataVis3D;
MapsModifier::MapsModifier(Q3DMaps *maps)
: m_chart(maps),
m_imageRect(QRect()),
- m_fontSize(20.0f),
+ m_fontSize(80.0f),
m_barSpecs(QVector3D(30.0f, 30.0f, 30.0f))
{
- m_chart->setBarSpecs(m_barSpecs, Q3DMaps::AdjustAll);
QImage image = QImage(QStringLiteral(":/images/finland"));
m_imageRect = image.rect();
m_chart->setAreaSpecs(m_imageRect, image);
- //m_chart->setBarType(Cones, false);
+ m_chart->setFontSize(m_fontSize);
+
+#if 0
+ m_chart->setBarSpecs(m_barSpecs, Q3DMaps::AdjustHeight);
+ m_chart->setBarType(BevelBars, true);
+ m_chart->setTheme(ThemeBlueIcy);
+ m_chart->setShadowQuality(ShadowMedium);
+#else
+ m_chart->setBarSpecs(m_barSpecs, Q3DMaps::AdjustAll);
m_chart->setMeshFileName(QStringLiteral(":/meshes/weirdthing"));
+#endif
}
MapsModifier::~MapsModifier()