summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicseffect.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-28 10:24:32 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-29 06:42:31 (GMT)
commit72debacc7f57b9ea9115e549170341a9ad11bf0f (patch)
tree798a7bbf7dc4bc376a53b8f705d52e18f6dd26f4 /src/gui/graphicsview/qgraphicseffect.h
parent854acb3478651312dbe84d9b4ef971b46485fe1f (diff)
downloadQt-72debacc7f57b9ea9115e549170341a9ad11bf0f.zip
Qt-72debacc7f57b9ea9115e549170341a9ad11bf0f.tar.gz
Qt-72debacc7f57b9ea9115e549170341a9ad11bf0f.tar.bz2
Add QGraphicsEffectSource::pixmap.
We need a convenient way of getting the pixmap representation of the source.
Diffstat (limited to 'src/gui/graphicsview/qgraphicseffect.h')
-rw-r--r--src/gui/graphicsview/qgraphicseffect.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicseffect.h b/src/gui/graphicsview/qgraphicseffect.h
index c13461e..77eebd6 100644
--- a/src/gui/graphicsview/qgraphicseffect.h
+++ b/src/gui/graphicsview/qgraphicseffect.h
@@ -65,6 +65,7 @@ QT_MODULE(Gui)
#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
class QGraphicsEffectSourcePrivate;
+class QStyleOption;
class Q_GUI_EXPORT QGraphicsEffectSource : public QObject
{
Q_OBJECT
@@ -75,6 +76,7 @@ public:
const QStyleOption *styleOption() const;
void draw(QPainter *painter);
bool drawIntoPixmap(QPixmap *pixmap, const QPoint &offset = QPoint());
+ QPixmap pixmap(bool deviceCoordinates, QPoint *offset = 0) const;
protected:
QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent = 0);
@@ -97,9 +99,13 @@ public:
virtual ~QGraphicsEffect();
QRectF boundingRect() const;
+ void setSourcePixmap(const QPixmap &pixmap);
+ QPixmap sourcePixmap() const;
+ bool hasSourcePixmap() const;
+ virtual QRectF boundingRectFor(const QRectF &rect) const;
+
protected:
QGraphicsEffect(QGraphicsEffectPrivate &d);
- virtual QRectF boundingRectFor(const QRectF &rect) const;
virtual void draw(QPainter *painter, QGraphicsEffectSource *source) = 0;
private: