summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/affine
diff options
context:
space:
mode:
authorMontel Laurent <laurent.montel@kdab.com>2012-12-02 22:53:25 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-05 13:27:27 +0100
commitf775f6dd887e1744816d1320fd50092df93f0371 (patch)
tree727adeea004b5d20a3e308389c2327c7a4db5a9d /examples/widgets/painting/affine
parent422b8dd24ec99caed2a22735f53ffbef110a35ad (diff)
Fix compile with -DQT_NO_WHEELEVENT
Change-Id: Icc345e2a361fc233d7debfa88bef2a3a8375fa8f Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'examples/widgets/painting/affine')
-rw-r--r--examples/widgets/painting/affine/xform.cpp2
-rw-r--r--examples/widgets/painting/affine/xform.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/widgets/painting/affine/xform.cpp b/examples/widgets/painting/affine/xform.cpp
index a873ba7af8..d4485df0b3 100644
--- a/examples/widgets/painting/affine/xform.cpp
+++ b/examples/widgets/painting/affine/xform.cpp
@@ -251,12 +251,14 @@ void XFormView::timerEvent(QTimerEvent *e)
}
}
+#ifndef QT_NO_WHEELEVENT
void XFormView::wheelEvent(QWheelEvent *e)
{
m_scale += e->delta() / qreal(600);
m_scale = qMax(qreal(0.1), qMin(qreal(4), m_scale));
emit scaleChanged(int(m_scale*1000));
}
+#endif
void XFormView::reset()
{
diff --git a/examples/widgets/painting/affine/xform.h b/examples/widgets/painting/affine/xform.h
index fff92733a0..a04381165d 100644
--- a/examples/widgets/painting/affine/xform.h
+++ b/examples/widgets/painting/affine/xform.h
@@ -116,7 +116,9 @@ signals:
protected:
void timerEvent(QTimerEvent *e);
+#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *);
+#endif
private:
QPolygonF ctrlPoints;