diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-13 07:07:29 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-13 07:07:29 (GMT) |
commit | 3794e55c2c8427dd8bd4f86af5e894cc80267881 (patch) | |
tree | 9067656d5e021a585a976fb84f73b94e161cae19 /examples/effects | |
parent | 7be079e1b1f13b58f5d69f86e5854edd25065532 (diff) | |
parent | 99b19431e6846a36a65f23d21a95140a081d1f1a (diff) | |
download | Qt-3794e55c2c8427dd8bd4f86af5e894cc80267881.zip Qt-3794e55c2c8427dd8bd4f86af5e894cc80267881.tar.gz Qt-3794e55c2c8427dd8bd4f86af5e894cc80267881.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Conflicts:
dist/changes-4.6.0
Diffstat (limited to 'examples/effects')
-rw-r--r-- | examples/effects/blurpicker/blureffect.cpp | 4 | ||||
-rw-r--r-- | examples/effects/blurpicker/blureffect.h | 2 | ||||
-rw-r--r-- | examples/effects/customshader/blureffect.cpp | 4 | ||||
-rw-r--r-- | examples/effects/customshader/blureffect.h | 2 | ||||
-rw-r--r-- | examples/effects/fademessage/fademessage.cpp | 10 | ||||
-rw-r--r-- | examples/effects/fademessage/fademessage.pro | 3 |
6 files changed, 16 insertions, 9 deletions
diff --git a/examples/effects/blurpicker/blureffect.cpp b/examples/effects/blurpicker/blureffect.cpp index 9046cbd..956637d 100644 --- a/examples/effects/blurpicker/blureffect.cpp +++ b/examples/effects/blurpicker/blureffect.cpp @@ -62,8 +62,8 @@ QRectF BlurEffect::boundingRect() const return QGraphicsBlurEffect::boundingRect(); } -void BlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source) +void BlurEffect::draw(QPainter *painter) { adjustForItem(); - QGraphicsBlurEffect::draw(painter, source); + QGraphicsBlurEffect::draw(painter); } diff --git a/examples/effects/blurpicker/blureffect.h b/examples/effects/blurpicker/blureffect.h index 6cfa55a..3d1d433 100644 --- a/examples/effects/blurpicker/blureffect.h +++ b/examples/effects/blurpicker/blureffect.h @@ -54,7 +54,7 @@ public: QRectF boundingRect() const; - void draw(QPainter *painter, QGraphicsEffectSource *source); + void draw(QPainter *painter); private: void adjustForItem(); diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp index 9046cbd..956637d 100644 --- a/examples/effects/customshader/blureffect.cpp +++ b/examples/effects/customshader/blureffect.cpp @@ -62,8 +62,8 @@ QRectF BlurEffect::boundingRect() const return QGraphicsBlurEffect::boundingRect(); } -void BlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source) +void BlurEffect::draw(QPainter *painter) { adjustForItem(); - QGraphicsBlurEffect::draw(painter, source); + QGraphicsBlurEffect::draw(painter); } diff --git a/examples/effects/customshader/blureffect.h b/examples/effects/customshader/blureffect.h index 6cfa55a..3d1d433 100644 --- a/examples/effects/customshader/blureffect.h +++ b/examples/effects/customshader/blureffect.h @@ -54,7 +54,7 @@ public: QRectF boundingRect() const; - void draw(QPainter *painter, QGraphicsEffectSource *source); + void draw(QPainter *painter); private: void adjustForItem(); diff --git a/examples/effects/fademessage/fademessage.cpp b/examples/effects/fademessage/fademessage.cpp index 818d00f..28dd3bd 100644 --- a/examples/effects/fademessage/fademessage.cpp +++ b/examples/effects/fademessage/fademessage.cpp @@ -94,13 +94,17 @@ void FadeMessage::setupScene() QFont font; font.setPointSize(font.pointSize() * 2); font.setBold(true); - int fh = QFontMetrics(font).height(); + QFontMetrics fontMetrics(font); + int fh = fontMetrics.height(); - QGraphicsRectItem *block = m_scene.addRect(50, 300, 300, fh + 3); + QString sceneText = "Qt Everywhere!"; + int sceneTextWidth = fontMetrics.width(sceneText); + + QGraphicsRectItem *block = m_scene.addRect(50, 300, sceneTextWidth, fh + 3); block->setPen(Qt::NoPen); block->setBrush(QColor(102, 153, 51)); - QGraphicsTextItem *text = m_scene.addText("Qt Everywhere!", font); + QGraphicsTextItem *text = m_scene.addText(sceneText, font); text->setDefaultTextColor(Qt::white); text->setPos(50, 300); block->setZValue(2); diff --git a/examples/effects/fademessage/fademessage.pro b/examples/effects/fademessage/fademessage.pro index ed9e53d..cb1fda7 100644 --- a/examples/effects/fademessage/fademessage.pro +++ b/examples/effects/fademessage/fademessage.pro @@ -11,3 +11,6 @@ sources.files = $$SOURCES \ $$FORMS \ fademessage.pro sources.path = $$[QT_INSTALL_EXAMPLES]/effects/fademessage + +DEPLOYMENT_PLUGIN += qjpeg + |