on xenial help sign in
item() function is still needed on other parts of GenericScopeView ^_^
commit0ef5061fbfbe200362aa1d0eb48fddeeb3a7cdc7 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 6 Oct 2016, 12:54 (10 years ago) parentc8be7b6
2 files changed+10
plugins/Dash/listviewwithpageheader.cpp+9 plugins/Dash/listviewwithpageheader.h+1
plugins/Dash/listviewwithpageheader.cpp+9
@@ -442,6 +442,15 @@ int ListViewWithPageHeader::createdItemCount() const
442442 return m_visibleItems.count();
443443}
444444
445+QQuickItem *ListViewWithPageHeader::item(int modelIndex) const
446+{
447+ ListItem *item = itemAtIndex(modelIndex);
448+ if (item)
449+ return item->m_item;
450+ else
451+ return nullptr;
452+}
453+
445454bool ListViewWithPageHeader::maximizeVisibleArea(int modelIndex)
446455{
447456 ListItem *listItem = itemAtIndex(modelIndex);
plugins/Dash/listviewwithpageheader.h+1
@@ -92,6 +92,7 @@ public:
9292 Q_INVOKABLE void showHeader();
9393 Q_INVOKABLE int firstCreatedIndex() const;
9494 Q_INVOKABLE int createdItemCount() const;
95+ Q_INVOKABLE QQuickItem *item(int modelIndex) const;
9596
9697 // The index has to be created for this to try to do something
9798 // Created items are those visible and the precached ones