]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistselectionmanager.h
Port away from deprecated QFontMetrics::width()
[dolphin.git] / src / kitemviews / kitemlistselectionmanager.h
index 4bb503a802bdd4b3a1108f19a80a43b6e8085dde..6b043513992c1d2457261edcc8dbee6a5092b9c3 100644 (file)
@@ -1,8 +1,7 @@
 /***************************************************************************
  *   Copyright (C) 2011 by Peter Penz <peter.penz19@gmail.com>             *
  *                                                                         *
- *   Based on the Itemviews NG project from Trolltech Labs:                *
- *   http://qt.gitorious.org/qt-labs/itemviews-ng                          *
+ *   Based on the Itemviews NG project from Trolltech Labs                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -62,6 +61,13 @@ public:
     bool hasSelection() const;
 
     void setSelected(int index, int count = 1, SelectionMode mode = Select);
+    /**
+     * Equivalent to:
+     * clearSelection();
+     * setSelected(index, count);
+     * but emitting once only selectionChanged signal
+     */
+    void replaceSelection(int index, int count = 1);
     void clearSelection();
 
     void beginAnchoredSelection(int anchor);