aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicklistview_p.h
diff options
context:
space:
mode:
authorNils Jeisecke <jeisecke@saltation.de>2013-10-07 11:55:12 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-26 09:19:23 +0100
commit1061c7e5cfae88a336f1327cc20b2d8a0a3c6015 (patch)
tree058e8a07c1da7671ac8fcd9c91b91b386d106a2e /src/quick/items/qquicklistview_p.h
parent7d25db8ff452926e58b7a66608666b35c194fc69 (diff)
Make GridView/ListView attached "view" property available to all delegate types
This is useful for accessing the view (e.g. "width", "cellWidth", ... properties) from within section (ListView only), header, footer and highlight delegate components. A typical usecase are components that are used in multiple views and therefore cannot use the views's id for access. The only attached property valid for those non-item delegates is "view". This has been added to the documentation. Change-Id: I33d976da778be23ed531a3b193ceee95ed9800d2 Task-number: QTBUG-32836 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/quick/items/qquicklistview_p.h')
-rw-r--r--src/quick/items/qquicklistview_p.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/quick/items/qquicklistview_p.h b/src/quick/items/qquicklistview_p.h
index b00501d274..2494e101cd 100644
--- a/src/quick/items/qquicklistview_p.h
+++ b/src/quick/items/qquicklistview_p.h
@@ -43,7 +43,6 @@
#define QQUICKLISTVIEW_P_H
#include "qquickitemview_p.h"
-#include <qpointer.h>
QT_BEGIN_NAMESPACE
@@ -175,23 +174,10 @@ class QQuickListViewAttached : public QQuickItemViewAttached
public:
QQuickListViewAttached(QObject *parent)
- : QQuickItemViewAttached(parent), m_view(0), m_sectionItem(0) {}
+ : QQuickItemViewAttached(parent), m_sectionItem(0) {}
~QQuickListViewAttached() {}
- Q_PROPERTY(QQuickListView *view READ view NOTIFY viewChanged)
- QQuickListView *view() { return m_view; }
- void setView(QQuickListView *view) {
- if (view != m_view) {
- m_view = view;
- Q_EMIT viewChanged();
- }
- }
-
-Q_SIGNALS:
- void viewChanged();
-
public:
- QPointer<QQuickListView> m_view;
QQuickItem *m_sectionItem;
};