From 12215d6f0f7768fc943347a349d9817844e0528a Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 2 Jun 2012 15:02:34 +0200 Subject: Use PlacesItemModel instead of KFilePlacesModel This allows inserting items to the corresponding group. --- src/panels/places/placesitemmodel.h | 11 ++++++++++- 1 file changed, 10 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 b850f356f..89a111730 100644 --- a/src/panels/places/placesitemmodel.h +++ b/src/panels/places/placesitemmodel.h @@ -69,7 +69,7 @@ public: */ PlacesItem* createPlacesItem(const QString& text, const KUrl& url, - const QString& iconName); + const QString& iconName = QString()); PlacesItem* placesItem(int index) const; @@ -99,6 +99,15 @@ public: */ int closestItem(const KUrl& url) const; + /** + * Appends the item \a item as last element of the group + * the item belongs to. If no item with the same group is + * present, the item gets appended as last element of the + * model. PlacesItemModel takes the ownership + * of the item. + */ + void appendItemToGroup(PlacesItem* item); + QAction* ejectAction(int index) const; QAction* teardownAction(int index) const; -- cgit v1.3.1