summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-11-10 12:35:42 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-11-10 12:52:35 (GMT)
commit637d6b26d778189a767e28b80aa316cf327e67a2 (patch)
tree8ac632c593c4f2827d9a95bc6bba4d82467c24ff /src/gui/kernel/qwidget.cpp
parentdc551cdc3422631baab50860c1a46711e3079f18 (diff)
downloadQt-637d6b26d778189a767e28b80aa316cf327e67a2.zip
Qt-637d6b26d778189a767e28b80aa316cf327e67a2.tar.gz
Qt-637d6b26d778189a767e28b80aa316cf327e67a2.tar.bz2
Improvements to graphics effects API after review round.
* 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
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index f856b13..e764774 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5238,7 +5238,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
QPainter p(pdev);
p.translate(offset);
context.painter = &p;
- graphicsEffect->draw(&p, source);
+ graphicsEffect->draw(&p);
paintEngine->d_func()->systemClip = QRegion();
} else {
context.painter = sharedPainter;
@@ -5248,7 +5248,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
}
sharedPainter->save();
sharedPainter->translate(offset);
- graphicsEffect->draw(sharedPainter, source);
+ graphicsEffect->draw(sharedPainter);
sharedPainter->restore();
}
sourced->context = 0;
@@ -5470,7 +5470,7 @@ void QWidgetEffectSourcePrivate::draw(QPainter *painter)
}
QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *offset,
- QGraphicsEffectSource::PixmapPadMode mode) const
+ QGraphicsEffect::PixmapPadMode mode) const
{
const bool deviceCoordinates = (system == Qt::DeviceCoordinates);
if (!context && deviceCoordinates) {
@@ -5491,10 +5491,10 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *
QRect effectRect;
- if (mode == QGraphicsEffectSource::ExpandToEffectRectPadMode) {
+ if (mode == QGraphicsEffect::PadToEffectiveBoundingRect) {
effectRect = m_widget->graphicsEffect()->boundingRectFor(sourceRect).toAlignedRect();
- } else if (mode == QGraphicsEffectSource::ExpandToTransparentBorderPadMode) {
+ } else if (mode == QGraphicsEffect::PadToTransparentBorder) {
effectRect = sourceRect.adjusted(-1, -1, 1, 1).toAlignedRect();
} else {