diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2010-05-12 14:32:12 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2010-05-12 14:36:10 (GMT) |
commit | 812f78e55aa3db4d51ec8617320358d80c4a71d5 (patch) | |
tree | aaceddad76df5b4d91bd2de4d56bb21b73ca94fa /examples/graphicsview/padnavigator/splashitem.cpp | |
parent | e4902b4f25ca9c1ecff99609dbe376b407d9c6c5 (diff) | |
download | Qt-812f78e55aa3db4d51ec8617320358d80c4a71d5.zip Qt-812f78e55aa3db4d51ec8617320358d80c4a71d5.tar.gz Qt-812f78e55aa3db4d51ec8617320358d80c4a71d5.tar.bz2 |
Documentation for the Pad Navigator Example.
This also does a few touch-ups on the source code.
Diffstat (limited to 'examples/graphicsview/padnavigator/splashitem.cpp')
-rw-r--r-- | examples/graphicsview/padnavigator/splashitem.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/graphicsview/padnavigator/splashitem.cpp b/examples/graphicsview/padnavigator/splashitem.cpp index e609656..cd7074a 100644 --- a/examples/graphicsview/padnavigator/splashitem.cpp +++ b/examples/graphicsview/padnavigator/splashitem.cpp @@ -43,20 +43,25 @@ #include <QtGui/QtGui> -SplashItem::SplashItem(QGraphicsItem *parent) : - QGraphicsObject(parent) +//! [0] +SplashItem::SplashItem(QGraphicsItem *parent) + : QGraphicsObject(parent) { text = tr("Welcome to the Pad Navigator Example. You can use the" " keyboard arrows to navigate the icons, and press enter" " to activate an item. Press any key to begin."); setCacheMode(DeviceCoordinateCache); } +//! [0] +//! [1] QRectF SplashItem::boundingRect() const { return QRectF(0, 0, 400, 175); } +//! [1] +//! [2] void SplashItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { @@ -76,3 +81,4 @@ void SplashItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option painter->setFont(font); painter->drawText(textRect, flags, text); } +//! [2] |