diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index f9b38d2e6d0..a67917ca3bf 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1946,13 +1946,12 @@ void QGuiApplicationPrivate::reportGeometryChange(QWindowSystemInterfacePrivate: Qt::ScreenOrientation primaryOrientation = s->primaryOrientation(); s->d_func()->updatePrimaryOrientation(); - emit s->sizeChanged(s->size()); emit s->geometryChanged(s->geometry()); - emit s->physicalDotsPerInchXChanged(s->physicalDotsPerInchX()); - emit s->physicalDotsPerInchYChanged(s->physicalDotsPerInchY()); + emit s->physicalSizeChanged(s->physicalSize()); emit s->physicalDotsPerInchChanged(s->physicalDotsPerInch()); - emit s->availableSizeChanged(s->availableSize()); - emit s->availableGeometryChanged(s->availableGeometry()); + emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch()); + foreach (QScreen* sibling, s->virtualSiblings()) + emit sibling->virtualGeometryChanged(sibling->virtualGeometry()); if (s->primaryOrientation() != primaryOrientation) emit s->primaryOrientationChanged(s->primaryOrientation()); @@ -1974,8 +1973,8 @@ void QGuiApplicationPrivate::reportAvailableGeometryChange( QScreen *s = e->screen.data(); s->d_func()->availableGeometry = e->availableGeometry; - emit s->availableSizeChanged(s->availableSize()); - emit s->availableGeometryChanged(s->availableGeometry()); + foreach (QScreen* sibling, s->virtualSiblings()) + emit sibling->virtualGeometryChanged(sibling->virtualGeometry()); } void QGuiApplicationPrivate::reportLogicalDotsPerInchChange(QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e) @@ -1990,8 +1989,6 @@ void QGuiApplicationPrivate::reportLogicalDotsPerInchChange(QWindowSystemInterfa QScreen *s = e->screen.data(); s->d_func()->logicalDpi = QDpi(e->dpiX, e->dpiY); - emit s->logicalDotsPerInchXChanged(s->logicalDotsPerInchX()); - emit s->logicalDotsPerInchYChanged(s->logicalDotsPerInchY()); emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch()); } diff --git a/src/gui/kernel/qscreen.h b/src/gui/kernel/qscreen.h index 6a47a7be9c0..48eaad94f76 100644 --- a/src/gui/kernel/qscreen.h +++ b/src/gui/kernel/qscreen.h @@ -70,20 +70,20 @@ class Q_GUI_EXPORT QScreen : public QObject Q_PROPERTY(QString name READ name CONSTANT) Q_PROPERTY(int depth READ depth CONSTANT) - Q_PROPERTY(QSize size READ size NOTIFY sizeChanged) - Q_PROPERTY(QSize availableSize READ availableSize NOTIFY availableSizeChanged) - Q_PROPERTY(QSize virtualSize READ virtualSize NOTIFY sizeChanged) - Q_PROPERTY(QSize availableVirtualSize READ availableVirtualSize NOTIFY availableSizeChanged) + Q_PROPERTY(QSize size READ size NOTIFY geometryChanged) + Q_PROPERTY(QSize availableSize READ availableSize NOTIFY virtualGeometryChanged) + Q_PROPERTY(QSize virtualSize READ virtualSize NOTIFY virtualGeometryChanged) + Q_PROPERTY(QSize availableVirtualSize READ availableVirtualSize NOTIFY virtualGeometryChanged) Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged) - Q_PROPERTY(QRect availableGeometry READ availableGeometry NOTIFY availableGeometryChanged) - Q_PROPERTY(QRect virtualGeometry READ virtualGeometry NOTIFY sizeChanged) - Q_PROPERTY(QRect availableVirtualGeometry READ availableVirtualGeometry NOTIFY availableGeometryChanged) - Q_PROPERTY(QSizeF physicalSize READ physicalSize CONSTANT) - Q_PROPERTY(qreal physicalDotsPerInchX READ physicalDotsPerInchX NOTIFY physicalDotsPerInchXChanged) - Q_PROPERTY(qreal physicalDotsPerInchY READ physicalDotsPerInchY NOTIFY physicalDotsPerInchYChanged) + Q_PROPERTY(QRect availableGeometry READ availableGeometry NOTIFY virtualGeometryChanged) + Q_PROPERTY(QRect virtualGeometry READ virtualGeometry NOTIFY virtualGeometryChanged) + Q_PROPERTY(QRect availableVirtualGeometry READ availableVirtualGeometry NOTIFY virtualGeometryChanged) + Q_PROPERTY(QSizeF physicalSize READ physicalSize NOTIFY physicalSizeChanged) + Q_PROPERTY(qreal physicalDotsPerInchX READ physicalDotsPerInchX NOTIFY physicalDotsPerInchChanged) + Q_PROPERTY(qreal physicalDotsPerInchY READ physicalDotsPerInchY NOTIFY physicalDotsPerInchChanged) Q_PROPERTY(qreal physicalDotsPerInch READ physicalDotsPerInch NOTIFY physicalDotsPerInchChanged) - Q_PROPERTY(qreal logicalDotsPerInchX READ logicalDotsPerInchX NOTIFY logicalDotsPerInchXChanged) - Q_PROPERTY(qreal logicalDotsPerInchY READ logicalDotsPerInchY NOTIFY logicalDotsPerInchYChanged) + Q_PROPERTY(qreal logicalDotsPerInchX READ logicalDotsPerInchX NOTIFY logicalDotsPerInchChanged) + Q_PROPERTY(qreal logicalDotsPerInchY READ logicalDotsPerInchY NOTIFY logicalDotsPerInchChanged) Q_PROPERTY(qreal logicalDotsPerInch READ logicalDotsPerInch NOTIFY logicalDotsPerInchChanged) Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY primaryOrientationChanged) Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged) @@ -138,16 +138,11 @@ public: qreal refreshRate() const; Q_SIGNALS: - void sizeChanged(const QSize &size); void geometryChanged(const QRect &geometry); - void physicalDotsPerInchXChanged(qreal dpi); - void physicalDotsPerInchYChanged(qreal dpi); + void physicalSizeChanged(const QSizeF &size); void physicalDotsPerInchChanged(qreal dpi); - void logicalDotsPerInchXChanged(qreal dpi); - void logicalDotsPerInchYChanged(qreal dpi); void logicalDotsPerInchChanged(qreal dpi); - void availableSizeChanged(const QSize &size); - void availableGeometryChanged(const QRect &rect); + void virtualGeometryChanged(const QRect &rect); void primaryOrientationChanged(Qt::ScreenOrientation orientation); void orientationChanged(Qt::ScreenOrientation orientation); void refreshRateChanged(qreal refreshRate);