summaryrefslogtreecommitdiffstats
path: root/weatherinfo/weatherinfo.cpp
diff options
context:
space:
mode:
authorAriya Hidayat <ariya.hidayat@nokia.com>2009-07-29 10:47:52 +0200
committerAriya Hidayat <ariya.hidayat@nokia.com>2009-07-29 10:47:52 +0200
commitb68a35bbc398f443cbba48200986d61cf7e5948b (patch)
treeb4678dfea4253c3abef8d302022a8039716baa63 /weatherinfo/weatherinfo.cpp
parent53c8f61bdd5349b44bbca32b71b814da5b3077d9 (diff)
Make it compile with Qt < 4.5.
Diffstat (limited to 'weatherinfo/weatherinfo.cpp')
-rw-r--r--weatherinfo/weatherinfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/weatherinfo/weatherinfo.cpp b/weatherinfo/weatherinfo.cpp
index aedb668..65c81f0 100644
--- a/weatherinfo/weatherinfo.cpp
+++ b/weatherinfo/weatherinfo.cpp
@@ -109,13 +109,17 @@ private slots:
void animate(int frame) {
qreal progress = static_cast<qreal>(frame) / 100;
+#if QT_VERSION >= 0x040500
m_iconItem->setOpacity(progress);
+#endif
qreal hw = width() / 2.0;
m_statusItem->setPos(-hw + hw * progress, 0);
for (int i = 0; i < m_forecastItems.count(); ++i) {
qreal ofs = i * 0.5 / m_forecastItems.count();
qreal alpha = qBound(qreal(0), 2 * (progress - ofs), qreal(1));
+#if QT_VERSION >= 0x040500
m_conditionItems[i]->setOpacity(alpha);
+#endif
QPointF pos = m_forecastItems[i]->pos();
if (width() > height()) {
qreal fx = width() - width() * 0.4 * alpha;