summaryrefslogtreecommitdiffstats
path: root/examples/multitouch/fingerpaint
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-05 15:36:18 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-05 15:36:18 (GMT)
commit66f1080dc931ea024014ab3153ef7b99039540d2 (patch)
tree4ff5c8fbc3ecaf508635fb915fbe7ec33e61646d /examples/multitouch/fingerpaint
parent8d8b3e03cfc36c72665494eaa9bb461ff18072a0 (diff)
downloadQt-66f1080dc931ea024014ab3153ef7b99039540d2.zip
Qt-66f1080dc931ea024014ab3153ef7b99039540d2.tar.gz
Qt-66f1080dc931ea024014ab3153ef7b99039540d2.tar.bz2
Compile after API updates
Diffstat (limited to 'examples/multitouch/fingerpaint')
-rw-r--r--examples/multitouch/fingerpaint/scribblearea.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/multitouch/fingerpaint/scribblearea.cpp b/examples/multitouch/fingerpaint/scribblearea.cpp
index 71fbd19..ac7df08 100644
--- a/examples/multitouch/fingerpaint/scribblearea.cpp
+++ b/examples/multitouch/fingerpaint/scribblearea.cpp
@@ -176,26 +176,26 @@ bool ScribbleArea::event(QEvent *event)
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
{
- QList<QTouchEvent::TouchPoint *> touchPoints = static_cast<QTouchEvent *>(event)->touchPoints();
- foreach (QTouchEvent::TouchPoint *touchPoint, touchPoints) {
- switch (touchPoint->state()) {
+ QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(event)->touchPoints();
+ foreach (const QTouchEvent::TouchPoint &touchPoint, touchPoints) {
+ switch (touchPoint.state()) {
case Qt::TouchPointStationary:
// don't do anything if this touch point hasn't moved
continue;
default:
{
- QSizeF area = touchPoint->area();
- if (area.isEmpty()) {
- qreal diameter = qreal(50) * touchPoint->pressure();
- area = QSizeF(diameter, diameter);
+ QSizeF size= touchPoint.size();
+ if (size.isEmpty()) {
+ qreal diameter = qreal(50) * touchPoint.pressure();
+ size = QSizeF(diameter, diameter);
}
- QRectF rectF(QPointF(), area);
- rectF.moveCenter(touchPoint->pos());
+ QRectF rectF(QPointF(), size);
+ rectF.moveCenter(touchPoint.pos());
QRect rect = rectF.toRect();
QPainter painter(&image);
painter.setPen(Qt::NoPen);
- painter.setBrush(myPenColors.at(touchPoint->id()));
+ painter.setBrush(myPenColors.at(touchPoint.id()));
painter.drawEllipse(rectF);
painter.end();