diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2016-04-26 11:21:52 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2016-04-27 10:18:08 +0000 |
commit | 5c9ea131a07e5fe08dee859e8dd29cd870f52836 (patch) | |
tree | 1cd3536e7f3117ae160e1362bfc9588a7b187982 /src/quicktemplates2/qquickpage_p.h | |
parent | 3393180efbb186bee365deb730afa42e670a3187 (diff) |
Introduce Page::title
Useful i.e. for displaying the current page's title name somewhere.
Change-Id: I3546a9e2d4bf5a0fb4aa3ed1db564254b1e11858
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpage_p.h')
-rw-r--r-- | src/quicktemplates2/qquickpage_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickpage_p.h b/src/quicktemplates2/qquickpage_p.h index 7dab76a8..be6bffae 100644 --- a/src/quicktemplates2/qquickpage_p.h +++ b/src/quicktemplates2/qquickpage_p.h @@ -58,6 +58,7 @@ class QQuickPagePrivate; class Q_QUICKTEMPLATES2_EXPORT QQuickPage : public QQuickControl { Q_OBJECT + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL) Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL) Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL) Q_PROPERTY(QQmlListProperty<QObject> contentData READ contentData FINAL) @@ -67,6 +68,9 @@ class Q_QUICKTEMPLATES2_EXPORT QQuickPage : public QQuickControl public: explicit QQuickPage(QQuickItem *parent = nullptr); + QString title() const; + void setTitle(const QString &title); + QQuickItem *header() const; void setHeader(QQuickItem *header); @@ -77,6 +81,7 @@ public: QQmlListProperty<QQuickItem> contentChildren(); Q_SIGNALS: + void titleChanged(); void headerChanged(); void footerChanged(); void contentChildrenChanged(); |