diff -r 41300fa6a67c -r f7bc934e204c demos/embedded/anomaly/src/ControlStrip.cpp --- a/demos/embedded/anomaly/src/ControlStrip.cpp Tue Feb 02 00:43:10 2010 +0200 +++ b/demos/embedded/anomaly/src/ControlStrip.cpp Wed Mar 31 11:06:36 2010 +0300 @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -50,6 +50,7 @@ menuPixmap.load(":/images/edit-find.png"); backPixmap.load(":/images/go-previous.png"); forwardPixmap.load(":/images/go-next.png"); + closePixmap.load(":/images/button-close.png"); } QSize ControlStrip::sizeHint() const @@ -74,12 +75,18 @@ } if (x > width() - h) { + emit closeClicked(); + event->accept(); + return; + } + + if ((x < width() - 2 * h) && (x > width() - 3 * h)) { emit forwardClicked(); event->accept(); return; } - if ((x < width() - 2 * h) && (x > width() - 3 * h)) { + if ((x < width() - 3 * h) && (x > width() - 5 * h)) { emit backClicked(); event->accept(); return; @@ -95,7 +102,9 @@ p.fillRect(event->rect(), QColor(32, 32, 32, 192)); p.setCompositionMode(QPainter::CompositionMode_SourceOver); p.drawPixmap(s, s, menuPixmap); - p.drawPixmap(width() - 3 * h + s, s, backPixmap); - p.drawPixmap(width() - h + s, s, forwardPixmap); + p.drawPixmap(width() - h + s, s, closePixmap); + p.drawPixmap(width() - 3 * h + s, s, forwardPixmap); + p.drawPixmap(width() - 5 * h + s, s, backPixmap); + p.end(); }