diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-04-09 14:07:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-15 17:47:28 +0200 |
commit | 6d438f3b5ca9fd94889461ca481bba387904af94 (patch) | |
tree | 48f2982c0a896257e2d422ee577f32b2b594821f /src/dialogs/qquickabstractdialog_p.h | |
parent | f42ef1db6a111fd420776da2c620be9cefba7f14 (diff) | |
download | qtquickcontrols-6d438f3b5ca9fd94889461ca481bba387904af94.tar.gz |
Dialogs: implementation prop renamed to contentItem; API cleanup
- contentItem is a common name for an item inside something such as a
window or a flickable. We now consider it adequate API that you can
directly set this to some item which you want to fill the whole dialog
instead of adding an item as a child of the default property and being
subject to the dialog's margins and space reservation for buttons.
- contentItem MUST be an Item. Allowing the old "implementation"
property to alternatively be a ready-made Window was just a
hypothetical use case, but if anyone made use of that, then it would
be a problem to have that kind of dialog on a GUI that cannot have
windows (such as Android or EGLFS). So there's no point in having
the possibility as long as we cannot emulate windows as items.
- standardButtonsRightModel and standardButtonsLeftModel are
implementation details so they should not be exposed as properties
which Creator can discover; users shouldn't depend on them.
Task-number: QTBUG-38056
Change-Id: Iefa3def314353495cfe8d1ef9f775a8e46d5bcf4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/dialogs/qquickabstractdialog_p.h')
-rw-r--r-- | src/dialogs/qquickabstractdialog_p.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dialogs/qquickabstractdialog_p.h b/src/dialogs/qquickabstractdialog_p.h index 79283c19..a905b097 100644 --- a/src/dialogs/qquickabstractdialog_p.h +++ b/src/dialogs/qquickabstractdialog_p.h @@ -82,7 +82,7 @@ public: bool isVisible() const { return m_visible; } Qt::WindowModality modality() const { return m_modality; } virtual QString title() const = 0; - QObject* qmlImplementation() { return m_qmlImplementation; } + QQuickItem* contentItem() { return m_contentItem; } int x() const; int y() const; @@ -92,7 +92,7 @@ public: virtual void setVisible(bool v); virtual void setModality(Qt::WindowModality m); virtual void setTitle(const QString &t) = 0; - void setQmlImplementation(QObject* obj); + void setContentItem(QQuickItem* obj); bool isWindow() const { return m_hasNativeWindows; } enum StandardButton { @@ -154,9 +154,8 @@ protected: Qt::WindowModality m_modality; protected: // variables for pure-QML implementations only - QObject *m_qmlImplementation; - QWindow *m_dialogWindow; QQuickItem *m_contentItem; + QWindow *m_dialogWindow; QQuickItem *m_windowDecoration; bool m_hasNativeWindows; QRect m_sizeAspiration; |