diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-06-06 13:32:58 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-06-06 12:45:54 +0000 |
commit | 51c181776f2c389d6b12d78514008d3208841192 (patch) | |
tree | 02b0d621b84188faf4c6994f3e4565519bbf1016 /src/quicktemplates2/qquickswipeview_p.h | |
parent | 14e08bafc88824f3d16602b04b5e60ae8c4005b0 (diff) |
SwipeView: add isNextItem and isPreviousItem attached properties
[ChangeLog][SwipeView] Added isNextItem and isPreviousItem attached
properties to make it straight-forward to use Loader for unloading
pages that are outside the reach.
Change-Id: Idb97d64282afaef58cc3302d3f558900a0d7d4b5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickswipeview_p.h')
-rw-r--r-- | src/quicktemplates2/qquickswipeview_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickswipeview_p.h b/src/quicktemplates2/qquickswipeview_p.h index 49d3b840..8ab1f051 100644 --- a/src/quicktemplates2/qquickswipeview_p.h +++ b/src/quicktemplates2/qquickswipeview_p.h @@ -80,6 +80,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSwipeViewAttached : public QObject Q_OBJECT Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL) Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY isCurrentItemChanged FINAL) + Q_PROPERTY(bool isNextItem READ isNextItem NOTIFY isNextItemChanged FINAL REVISION 1) + Q_PROPERTY(bool isPreviousItem READ isPreviousItem NOTIFY isPreviousItemChanged FINAL REVISION 1) Q_PROPERTY(QQuickSwipeView *view READ view NOTIFY viewChanged FINAL) public: @@ -88,11 +90,15 @@ public: int index() const; bool isCurrentItem() const; + bool isNextItem() const; + bool isPreviousItem() const; QQuickSwipeView *view() const; Q_SIGNALS: void indexChanged(); void isCurrentItemChanged(); + void isNextItemChanged(); + void isPreviousItemChanged(); void viewChanged(); private: |