┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places/placesitem.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-05-16 19:15:49 +0200
committerPeter Penz <[email protected]>2012-05-16 19:19:57 +0200
commit2fd31c8a95eaa38defa0f6adf3b83b12fc1aa1a3 (patch)
treec207e2e743e23f88a42b8eac5e5c3907c02ac745 /src/panels/places/placesitem.h
parenta632e8b9ef43f3b3516012bc1c44f53f31c385da (diff)
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.
Diffstat (limited to 'src/panels/places/placesitem.h')
-rw-r--r--src/panels/places/placesitem.h21
1 files changed, 15 insertions, 6 deletions
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 <Solid/StorageAccess>
#include <Solid/StorageVolume>
-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,15 +85,23 @@ protected:
const QHash<QByteArray, QVariant>& 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.
*/
void updateBookmarkForRole(const QByteArray& role);
@@ -105,10 +113,11 @@ private:
QPointer<Solid::StorageAccess> m_access;
QPointer<Solid::StorageVolume> m_volume;
QPointer<Solid::OpticalDisc> m_disc;
- QPointer<PlacesItemStorageAccessListener> m_accessListener;
+ QPointer<PlacesItemSignalHandler> m_signalHandler;
+ QPointer<KDirLister> m_trashDirLister;
KBookmark m_bookmark;
- friend class PlacesItemStorageAccessListener; // Calls onAccessibilityChanged()
+ friend class PlacesItemSignalHandler; // Calls onAccessibilityChanged()
};
#endif