From 2fd31c8a95eaa38defa0f6adf3b83b12fc1aa1a3 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 16 May 2012 19:15:49 +0200 Subject: Update trash-icon dependent on whether the thrash is empty or not The class PlacesItemStorageAccessListener has been renamed to PlacesItemSignalHandler and represents a generic signal handler for the PlacesItem. --- src/panels/places/placesitem.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/panels/places/placesitem.h') diff --git a/src/panels/places/placesitem.h b/src/panels/places/placesitem.h index 81fbe5c60..1d221170c 100644 --- a/src/panels/places/placesitem.h +++ b/src/panels/places/placesitem.h @@ -29,7 +29,8 @@ #include #include -class PlacesItemStorageAccessListener; +class KDirLister; +class PlacesItemSignalHandler; /** * @brief Extends KStandardItem by places-specific properties. @@ -47,7 +48,6 @@ public: }; explicit PlacesItem(const KBookmark& bookmark, PlacesItem* parent = 0); - explicit PlacesItem(const PlacesItem& item); virtual ~PlacesItem(); void setUrl(const KUrl& url); @@ -85,14 +85,22 @@ protected: const QHash& previous); private: + PlacesItem(const PlacesItem& item); + void initializeDevice(const QString& udi); /** - * Is invoked by m_accessListener if the accessibility - * of the storage access m_access has been changed. + * Is invoked if the accessibility of the storage access + * m_access has been changed and updates the emblem. */ void onAccessibilityChanged(); + /** + * Is invoked if the listing of the trash has been completed. + * Updates the state of the trash-icon to be empty or full. + */ + void onTrashDirListerCompleted(); + /** * Applies the data-value from the role to m_bookmark. */ @@ -105,10 +113,11 @@ private: QPointer m_access; QPointer m_volume; QPointer m_disc; - QPointer m_accessListener; + QPointer m_signalHandler; + QPointer m_trashDirLister; KBookmark m_bookmark; - friend class PlacesItemStorageAccessListener; // Calls onAccessibilityChanged() + friend class PlacesItemSignalHandler; // Calls onAccessibilityChanged() }; #endif -- cgit v1.3