X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/ab464bc6849dd000b2d0258ececb78ef1eb1a685..b1c9b5126d:/src/selectionmanager.h diff --git a/src/selectionmanager.h b/src/selectionmanager.h index 82e505eb6..080a94267 100644 --- a/src/selectionmanager.h +++ b/src/selectionmanager.h @@ -28,9 +28,11 @@ class DolphinSortFilterProxyModel; class QAbstractItemView; class QModelIndex; class QAbstractButton; +class QItemSelection; +class SelectionToggle; /** - * @brief Allows to select and deselect items for the single-click mode. + * @brief Allows to select and deselect items for item views. * * Whenever an item is hovered by the mouse, a toggle button is shown * which allows to select/deselect the current item. @@ -58,15 +60,17 @@ private slots: void slotEntered(const QModelIndex& index); void slotViewportEntered(); void setItemSelected(bool selected); + void slotRowsRemoved(const QModelIndex& parent, int start, int end); + void slotSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected); private: - KFileItem itemForIndex(const QModelIndex& index) const; - const QModelIndex indexForItem(const KFileItem& item) const; + KUrl urlForIndex(const QModelIndex& index) const; + const QModelIndex indexForUrl(const KUrl& url) const; private: QAbstractItemView* m_view; - QAbstractButton* m_button; - KFileItem m_item; + SelectionToggle* m_toggle; + bool m_connected; }; #endif