From f158bf097a079cba181afa9ecc03e5eb20f3573a Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 2 May 2012 21:23:38 +0200 Subject: Places Panel: Fix implementation issues when hiding items --- src/panels/places/placesitemmodel.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/panels/places/placesitemmodel.h') diff --git a/src/panels/places/placesitemmodel.h b/src/panels/places/placesitemmodel.h index 50f2be9d4..cd4fd2f75 100644 --- a/src/panels/places/placesitemmodel.h +++ b/src/panels/places/placesitemmodel.h @@ -42,6 +42,14 @@ class QAction; } #endif +#define PLACESITEMMODEL_DEBUG + +/** + * @brief Model for maintaining the bookmarks of the places panel. + * + * It is compatible to the KFilePlacesModel from kdelibs but adds + * the ability to have groups for places. + */ class PlacesItemModel: public KStandardItemModel { Q_OBJECT @@ -89,8 +97,17 @@ protected: private: void loadBookmarks(); + /** + * Creates system bookmarks that are shown per default and can + * only be hidden but not removed. The result will be stored + * in m_systemBookmarks. + */ void createSystemBookmarks(); + /** + * @param index Item index related to the model. + * @return Corresponding item index related to m_hiddenItems. + */ int hiddenIndex(int index) const; static QString placesGroupName(); @@ -127,6 +144,10 @@ private: static KUrl searchUrlForTerm(const Nepomuk::Query::Term& term); #endif +#ifdef PLACESITEMMODEL_DEBUG + void showModelState(); +#endif + private: bool m_nepomukRunning; bool m_hiddenItemsShown; -- cgit v1.3.1