┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-05-21 21:43:26 +0200
committerPeter Penz <[email protected]>2012-05-21 21:48:45 +0200
commit894232ebda5b2cf155a4f4e5bf1287eb700faa18 (patch)
tree3eed796e481cb7d3f486d9032d46db57f172f803 /src/kitemviews/kitemlistview.h
parent3b6892b68575e55cae4571f17ddc55dca4abba88 (diff)
Places Panel: Show drop indicator
The dropping itself has not been implemented yet.
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
-rw-r--r--src/kitemviews/kitemlistview.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h
index de2d2a6bb..de40791da 100644
--- a/src/kitemviews/kitemlistview.h
+++ b/src/kitemviews/kitemlistview.h
@@ -151,6 +151,10 @@ public:
void setGroupHeaderCreator(KItemListGroupHeaderCreatorBase* groupHeaderCreator);
KItemListGroupHeaderCreatorBase* groupHeaderCreator() const;
+ /**
+ * @return The basic size of all items. The size of an item may be larger than
+ * the basic size (see KItemListView::itemSizeHint() and KItemListView::itemRect()).
+ */
QSizeF itemSize() const;
const KItemListStyleOption& styleOption() const;
@@ -627,6 +631,15 @@ private:
bool scrollBarRequired(const QSizeF& size) const;
/**
+ * Shows a drop-indicator between items dependent on the given
+ * cursor position. The cursor position is relative the the upper left
+ * edge of the view.
+ * @return Index of the item where the dropping is done.
+ */
+ int showDropIndicator(const QPointF& pos);
+ void hideDropIndicator();
+
+ /**
* Applies the height of the group header to the layouter. The height
* depends on the used scroll orientation.
*/
@@ -716,6 +729,14 @@ private:
KItemListHeader* m_header;
KItemListHeaderWidget* m_headerWidget;
+ // When dragging items into the view where the sort-role of the model
+ // is empty, a visual indicator should be shown during dragging where
+ // the dropping will happen. This indicator is specified by an index
+ // of the item. -1 means that no indicator will be shown at all.
+ // The m_dropIndicator is set by the KItemListController
+ // by KItemListView::showDropIndicator() and KItemListView::hideDropIndicator().
+ QRectF m_dropIndicator;
+
friend class KItemListContainer; // Accesses scrollBarRequired()
friend class KItemListHeader; // Accesses m_headerWidget
friend class KItemListController;