diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-19 17:56:25 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-19 17:56:25 (GMT) |
commit | 7706b14fbca90a339a4ed1e55549f100462f9df4 (patch) | |
tree | 21caee47118965b8bcfd8533f4581df398cd9546 /src/gui/graphicsview | |
parent | 54839932adbddf68c78fd79d1b824ff1ad3f83b8 (diff) | |
parent | 695071d6ca899378afe1fcfa5c54fdbd840d7bce (diff) | |
download | Qt-7706b14fbca90a339a4ed1e55549f100462f9df4.zip Qt-7706b14fbca90a339a4ed1e55549f100462f9df4.tar.gz Qt-7706b14fbca90a339a4ed1e55549f100462f9df4.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
fix QTabBar scroll button arrow position in Windows mobile style
Revert "Optimize getting bearings of a glyph on Windows for true type fonts"
stabilize tst_QAccessibility::comboBoxTest
Better handling for NOTIFY in QGraphicsWidget regarding geometry changes
Add NOTIFY to size property so QML bindings are working fine.
Implement Q_PRIVATE_PROPERTY that allows you to declare properties
fix PM_TabBarScrollButtonWidth pixel metric in Windows mobile style
Stabilize taskQTBUG_7863_paintIntoCacheWithTransparentParts auto-test.
Optimize getting bearings of a glyph on Windows for true type fonts
Fixes blending problem when paiting non-opaque items with cache enabled.
Optimize speed of QTextLayout and QPainter::drawText
Fix a crash in animation groups when deleting uncontrolled animations
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 6 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.h | 8 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 4ee2301..6934abc 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4285,6 +4285,12 @@ static void _q_paintIntoCache(QPixmap *pix, QGraphicsItem *item, const QRegion & if (!subPix.isNull()) { // Blit the subpixmap into the main pixmap. pixmapPainter.begin(pix); + if (item->cacheMode() == QGraphicsItem::DeviceCoordinateCache + && itemToPixmap.type() > QTransform::TxTranslate) { + pixmapPainter.setCompositionMode(QPainter::CompositionMode_SourceAtop); + } else { + pixmapPainter.setCompositionMode(QPainter::CompositionMode_Source); + } pixmapPainter.setClipRegion(pixmapExposed); pixmapPainter.drawPixmap(br.topLeft(), subPix); pixmapPainter.end(); diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 5e01785..f42fe4f 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -384,7 +384,7 @@ void QGraphicsWidget::setGeometry(const QRectF &rect) } QSizeF oldSize = size(); QGraphicsLayoutItem::setGeometry(newGeom); - + emit geometryChanged(); // Send resize event bool resized = newGeom.size() != oldSize; if (resized) { diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h index f1d382b..468a134 100644 --- a/src/gui/graphicsview/qgraphicswidget.h +++ b/src/gui/graphicsview/qgraphicswidget.h @@ -73,7 +73,7 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay Q_PROPERTY(QPalette palette READ palette WRITE setPalette) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection RESET unsetLayoutDirection) - Q_PROPERTY(QSizeF size READ size WRITE resize) + Q_PROPERTY(QSizeF size READ size WRITE resize NOTIFY geometryChanged) Q_PROPERTY(QSizeF minimumSize READ minimumSize WRITE setMinimumSize) Q_PROPERTY(QSizeF preferredSize READ preferredSize WRITE setPreferredSize) Q_PROPERTY(QSizeF maximumSize READ maximumSize WRITE setMaximumSize) @@ -81,11 +81,10 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay Q_PROPERTY(Qt::FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy) Q_PROPERTY(Qt::WindowFlags windowFlags READ windowFlags WRITE setWindowFlags) Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle) - Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry) + Q_PROPERTY(QRectF geometry READ geometry WRITE setGeometry NOTIFY geometryChanged) public: QGraphicsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0); ~QGraphicsWidget(); - QGraphicsLayout *layout() const; void setLayout(QGraphicsLayout *layout); void adjustSize(); @@ -175,6 +174,9 @@ public: using QObject::children; #endif +Q_SIGNALS: + void geometryChanged(); + public Q_SLOTS: bool close(); |