summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-04-24 10:13:25 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-04-24 10:14:52 +0300
commit42b1f6fbb3ff6a1ffc78893dcf74f33a913fd69a (patch)
treed897667ed4617bad94ea4cb700c1d5b6bc67d882 /examples
parent0a6ac7151ce88c6e88a975389bd046e1f43003bb (diff)
Replaced QPoints with QPairs and QSizes where applicable
Change-Id: I0368be22d506fe99258d1430bdc5cbfccd1d38e8 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/datavis3d/barchart/main.cpp8
-rw-r--r--examples/datavis3d/rainfall/main.cpp4
-rw-r--r--examples/datavis3d/spectrum/spectrumapp/main.cpp6
-rw-r--r--examples/datavis3d/widget/chart.cpp16
4 files changed, 17 insertions, 17 deletions
diff --git a/examples/datavis3d/barchart/main.cpp b/examples/datavis3d/barchart/main.cpp
index 35fcad84..d4c13061 100644
--- a/examples/datavis3d/barchart/main.cpp
+++ b/examples/datavis3d/barchart/main.cpp
@@ -88,11 +88,11 @@ ChartDataGenerator::ChartDataGenerator(Q3DBars *barchart)
{
// Set up bar specifications; make the bars as wide as they are deep,
// and add a small space between the bars
- m_chart->setBarSpecs(QPointF(1.0f, 1.0f), QPointF(0.2f, 0.2f), true);
+ m_chart->setBarSpecs(QSizeF(1.0f, 1.0f), QSizeF(0.2f, 0.2f), true);
#ifndef USE_STATIC_DATA
// Set up sample space; make it as deep as it's wide
- m_chart->setupSampleSpace(QPoint(m_columnCount, m_rowCount));
+ m_chart->setupSampleSpace(m_columnCount, m_rowCount);
#endif
// Set bar type to smooth bar
@@ -201,7 +201,7 @@ void ChartDataGenerator::addDataSet()
row.clear();
}
// Set up sample space based on inserted data
- m_chart->setupSampleSpace(QPoint(m_columnCount, m_rowCount));
+ m_chart->setupSampleSpace(m_columnCount, m_rowCount);
// Add data to chart
m_chart->addDataSet(data);
#else
@@ -246,7 +246,7 @@ void ChartDataGenerator::addDataSet()
}
// Set up sample space based on prepared data
- m_chart->setupSampleSpace(QPoint(days.size(), weeks.size()));
+ m_chart->setupSampleSpace(days.size(), weeks.size());
// Add data to chart
m_chart->addDataSet(dataSet);
diff --git a/examples/datavis3d/rainfall/main.cpp b/examples/datavis3d/rainfall/main.cpp
index fb7738ee..1f903bec 100644
--- a/examples/datavis3d/rainfall/main.cpp
+++ b/examples/datavis3d/rainfall/main.cpp
@@ -69,10 +69,10 @@ RainfallChart::RainfallChart(Q3DBars *rainfall)
{
// Set up bar specifications; make the bars as wide as they are deep,
// and add a small space between the bars
- m_chart->setBarSpecs(QPointF(1.0f, 1.0f), QPointF(0.2f, 0.2f), true);
+ m_chart->setBarSpecs(QSizeF(1.0f, 1.0f), QSizeF(0.2f, 0.2f), true);
// Set up sample space; make it match actual data size
- m_chart->setupSampleSpace(QPoint(m_columnCount, m_rowCount),
+ m_chart->setupSampleSpace(m_columnCount, m_rowCount,
QStringLiteral("year"), QStringLiteral("month"),
QStringLiteral("rainfall (in mm)"));
diff --git a/examples/datavis3d/spectrum/spectrumapp/main.cpp b/examples/datavis3d/spectrum/spectrumapp/main.cpp
index e386396b..8c1062be 100644
--- a/examples/datavis3d/spectrum/spectrumapp/main.cpp
+++ b/examples/datavis3d/spectrum/spectrumapp/main.cpp
@@ -86,11 +86,11 @@ MainApp::MainApp(Q3DBars *window)
m_lowFreq(SpectrumLowFreq),
m_highFreq(SpectrumHighFreq)
{
- m_chart->setupSampleSpace(QPoint(SpectrumNumBands, SpectrumNumBands*2));
+ m_chart->setupSampleSpace(SpectrumNumBands, SpectrumNumBands * 2);
#if USE_CONES
// Set bar specifications; make them a bit wider than deep and make them be drawn 75%
// inside each other
- m_chart->setBarSpecs(QPointF(1.0f, 0.75f), QPointF(0.2f, -0.75f));
+ m_chart->setBarSpecs(QSizeF(1.0f, 0.75f), QSizeF(0.2f, -0.75f));
// Set bar type, smooth cones
m_chart->setBarType(Q3DBars::Cones, true);
// Adjust zoom manually; automatic zoom level calculation does not work well with negative
@@ -98,7 +98,7 @@ MainApp::MainApp(Q3DBars *window)
m_chart->setCameraPosition(10.0f, 5.0f, 70);
#else
// Set bar specifications; make them twice as wide as they're deep
- m_chart->setBarSpecs(QPointF(1.0f, 0.5f), QPointF(0.0f, 0.0f));
+ m_chart->setBarSpecs(QSizeF(1.0f, 0.5f), QSizeF(0.0f, 0.0f));
// Set bar type, flat bars
m_chart->setBarType(Q3DBars::Bars, false);
// Adjust camera position
diff --git a/examples/datavis3d/widget/chart.cpp b/examples/datavis3d/widget/chart.cpp
index e543e2a3..a09f770b 100644
--- a/examples/datavis3d/widget/chart.cpp
+++ b/examples/datavis3d/widget/chart.cpp
@@ -81,7 +81,7 @@ void ChartModifier::restart(bool dynamicData)
m_chart->setFont(QFont("Times Roman", 20));
} else {
// Set up sample space; make it as deep as it's wide
- m_chart->setupSampleSpace(QPoint(m_columnCount, m_rowCount));
+ m_chart->setupSampleSpace(m_columnCount, m_rowCount);
// Set selection mode to full
m_chart->setSelectionMode(Q3DBars::BarRowAndColumn);
}
@@ -133,7 +133,7 @@ void ChartModifier::addDataSet()
}
// Set up sample space based on prepared data
- m_chart->setupSampleSpace(QPoint(months.size(), years.size()));
+ m_chart->setupSampleSpace(months.size(), years.size());
// Add data to chart
m_chart->addDataSet(dataSet);
@@ -235,35 +235,35 @@ void ChartModifier::rotateY(int rotation)
void ChartModifier::setSpecsX(int barwidth)
{
m_barWidth = (float)barwidth / 100.0f;
- m_chart->setBarSpecs(QPointF(m_barWidth, m_barDepth), QPointF(m_barSpacingX, m_barSpacingZ));
+ m_chart->setBarSpecs(QSizeF(m_barWidth, m_barDepth), QSizeF(m_barSpacingX, m_barSpacingZ));
}
void ChartModifier::setSpecsZ(int bardepth)
{
m_barDepth = (float)bardepth / 100.0f;
- m_chart->setBarSpecs(QPointF(m_barWidth, m_barDepth), QPointF(m_barSpacingX, m_barSpacingZ));
+ m_chart->setBarSpecs(QSizeF(m_barWidth, m_barDepth), QSizeF(m_barSpacingX, m_barSpacingZ));
}
void ChartModifier::setSpacingSpecsX(int spacing)
{
m_barSpacingX = (float)spacing / 100.0f;
- m_chart->setBarSpecs(QPointF(m_barWidth, m_barDepth), QPointF(m_barSpacingX, m_barSpacingZ));
+ m_chart->setBarSpecs(QSizeF(m_barWidth, m_barDepth), QSizeF(m_barSpacingX, m_barSpacingZ));
}
void ChartModifier::setSpacingSpecsZ(int spacing)
{
m_barSpacingZ = (float)spacing / 100.0f;
- m_chart->setBarSpecs(QPointF(m_barWidth, m_barDepth), QPointF(m_barSpacingX, m_barSpacingZ));
+ m_chart->setBarSpecs(QSizeF(m_barWidth, m_barDepth), QSizeF(m_barSpacingX, m_barSpacingZ));
}
void ChartModifier::setSampleCountX(int samples)
{
m_columnCount = samples;
- m_chart->setupSampleSpace(QPoint(m_columnCount, m_rowCount));
+ m_chart->setupSampleSpace(m_columnCount, m_rowCount);
}
void ChartModifier::setSampleCountZ(int samples)
{
m_rowCount = samples;
- m_chart->setupSampleSpace(QPoint(m_columnCount, m_rowCount));
+ m_chart->setupSampleSpace(m_columnCount, m_rowCount);
}