From 5f1df43b87898b380228a3548553de3290ddb0d7 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Thu, 7 Dec 2017 11:36:00 -0300 Subject: Implemented support for hide/show groups Summary: Added an option on PlacesPanel context menu to show or hide the entire group of places. Depends on D8855 Test Plan: Open Donlphin and use PlacesPanel context menu to hide and show groups Reviewers: franckarrecot, mlaurent, mwolff, elvisangelaccio Reviewed By: franckarrecot, mlaurent, mwolff, elvisangelaccio Subscribers: rkflx, mwolff, elvisangelaccio, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D9242 --- src/panels/places/placesitemmodel.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/panels/places/placesitemmodel.h') diff --git a/src/panels/places/placesitemmodel.h b/src/panels/places/placesitemmodel.h index b701c8ea9..c8830ee6f 100644 --- a/src/panels/places/placesitemmodel.h +++ b/src/panels/places/placesitemmodel.h @@ -21,6 +21,7 @@ #define PLACESITEMMODEL_H #include +#include #include #include @@ -31,7 +32,6 @@ class KBookmark; class KBookmarkManager; -class KFilePlacesModel; class PlacesItem; class QAction; @@ -137,6 +137,12 @@ public: void refresh(); bool isDir(int index) const override; + + + KFilePlacesModel::GroupType groupType(int row) const; + bool isGroupHidden(KFilePlacesModel::GroupType type) const; + void setGroupHidden(KFilePlacesModel::GroupType type, bool hidden); + signals: void errorMessage(const QString& message); void storageSetupDone(int index, bool success); @@ -158,6 +164,7 @@ private slots: void onSourceModelRowsAboutToBeMoved(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row); void onSourceModelRowsMoved(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row); void onSourceModelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles); + void onSourceModelGroupHiddenChanged(KFilePlacesModel::GroupType group, bool hidden); private: /** -- cgit v1.3.1