From cb1f42a1eb3584742fa33e28759ed8fbab199c5b Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 30 Apr 2012 18:26:21 +0200 Subject: Places Panel: Minor fixes/improvements - Determine group of a new entry dependent from the protocol - Allow panels to forward error-messages to the view-container (also applied to Folders Panel) --- src/panels/places/placesitemmodel.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/panels/places/placesitemmodel.h') diff --git a/src/panels/places/placesitemmodel.h b/src/panels/places/placesitemmodel.h index 330e754b0..f8f2b5bc8 100644 --- a/src/panels/places/placesitemmodel.h +++ b/src/panels/places/placesitemmodel.h @@ -50,6 +50,9 @@ public: explicit PlacesItemModel(QObject* parent = 0); virtual ~PlacesItemModel(); + void setHiddenItemsShown(bool show); + bool hiddenItemsShown() const; + int hiddenCount() const; /** @@ -67,9 +70,11 @@ public: */ int closestItem(const KUrl& url) const; - QString placesGroupName() const; - QString recentlyAccessedGroupName() const; - QString searchForGroupName() const; + /** + * @return Name of the group where the item with the URL + * \a URL belongs to. + */ + QString groupName(const KUrl& url) const; QAction* ejectAction(int index) const; QAction* tearDownAction(int index) const; @@ -79,7 +84,11 @@ private: void createSystemBookmarks(); - KUrl translatedSystemBookmarkUrl(const KUrl& url) const; + static QString placesGroupName(); + static QString recentlyAccessedGroupName(); + static QString searchForGroupName(); + + static KUrl translatedSystemBookmarkUrl(const KUrl& url); /** * @return URL using the timeline-protocol for searching. @@ -111,6 +120,7 @@ private: private: bool m_nepomukRunning; + bool m_hiddenItemsShown; QSet m_availableDevices; KBookmarkManager* m_bookmarkManager; -- cgit v1.3