]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistview.h
Merge remote-tracking branch 'origin/KDE/4.9'
[dolphin.git] / src / kitemviews / kitemlistview.h
index de2d2a6bb243c8d431ef1504dd257f6e69d7ab13..2baf20c94079bd7934a313f7f294d2323d6a39ad 100644 (file)
@@ -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;
@@ -626,6 +630,16 @@ 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. An index of -1
+     *         indicates that the item has been dropped after the last item.
+     */
+    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.
@@ -648,6 +662,13 @@ private:
      */
     bool hasSiblingSuccessor(int index) const;
 
+    /**
+     * Helper method for slotRoleEditingCanceled() and slotRoleEditingFinished().
+     * Disconnects the two Signals "roleEditingCanceled" and
+     * "roleEditingFinished"
+     */
+    void disconnectRoleEditingSignals(int index);
+
     /**
      * Helper function for triggerAutoScrolling().
      * @param pos    Logical position of the mouse relative to the range.
@@ -716,10 +737,20 @@ 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;
     friend class KItemListControllerTest;
+    friend class KItemListViewAccessible;
+    friend class KItemListAccessibleCell;
 };
 
 /**