From 637d6b26d778189a767e28b80aa316cf327e67a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 10 Nov 2009 13:35:42 +0100 Subject: Improvements to graphics effects API after review round. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Get rid of QGraphicsEffectSource from the public API, instead add convenience functions in QGraphicsEffect. This way we commit to less API, and are free to introduce a customizable QGraphicsEffectSource in a future release. * Move PixmapPadMode into QGraphicsEffect and tweak the names of the enum values. * Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility. Reviewed-by: Bjørn Erik Nilsen --- tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/auto/qgraphicseffect') diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index b40cf431ba..d21692431f 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -49,6 +49,7 @@ #include #include "../../shared/util.h" +#include //TESTED_CLASS= //TESTED_FILES= @@ -131,16 +132,16 @@ public: int margin() const { return m_margin; } - void draw(QPainter *painter, QGraphicsEffectSource *source) + void draw(QPainter *painter) { ++numRepaints; if (doNothingInDraw) return; - m_source = source; + m_source = source(); m_painter = painter; - m_styleOption = source->styleOption(); + m_styleOption = source()->styleOption(); m_opacity = painter->opacity(); - source->draw(painter); + drawSource(painter); } void sourceChanged(QGraphicsEffect::ChangeFlags flags) -- cgit v1.2.3