]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistselectionmanager.h
Simplify handling of preview jobs
[dolphin.git] / src / kitemviews / kitemlistselectionmanager.h
index 4afad1f8b811dfb58b09876fa44a5d9d67f4058d..c89b8a4b85916655e48a7853eb889849ec2c8e16 100644 (file)
@@ -39,6 +39,11 @@ class LIBDOLPHINPRIVATE_EXPORT KItemListSelectionManager : public QObject
 {
     Q_OBJECT
 
+    enum RangesRemovingBehaviour {
+        DiscardRemovedIndex,
+        AdjustRemovedIndex
+    };
+
 public:
     enum SelectionMode {
         Select,
@@ -81,7 +86,7 @@ private:
      * Helper method for itemsRemoved. Returns the changed index after removing
      * the given range. If the index is part of the range, -1 will be returned.
      */
-    int indexAfterRangesRemoving(int index, const KItemRangeList& itemRanges) const;
+    int indexAfterRangesRemoving(int index, const KItemRangeList& itemRanges, const RangesRemovingBehaviour behaviour) const;
 
 private:
     int m_currentItem;
@@ -92,7 +97,7 @@ private:
     KItemModelBase* m_model;
 
     friend class KItemListController; // Calls setModel()
-    friend class KItemListView;       // Calls itemsInserted() and itemsRemoved()
+    friend class KItemListView;       // Calls itemsInserted(), itemsRemoved() and itemsMoved()
     friend class KItemListSelectionManagerTest;
 };