X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/f40e6db807380b51a7b8a87d50dd6032f9a2ff55..b1c9b5126d:/src/statusbarspaceinfo.h diff --git a/src/statusbarspaceinfo.h b/src/statusbarspaceinfo.h index eaecae8b4..06d060538 100644 --- a/src/statusbarspaceinfo.h +++ b/src/statusbarspaceinfo.h @@ -24,16 +24,19 @@ #include #include -#include #include +#include + class KDiskFreeSp; +class QHideEvent; +class QShowEvent; /** * @short Shows the available space for the volume represented * by the given URL as part of the status bar. */ -class StatusBarSpaceInfo : public QProgressBar +class StatusBarSpaceInfo : public KCapacityBar { Q_OBJECT @@ -44,27 +47,18 @@ public: void setUrl(const KUrl& url); const KUrl& url() const; - /** @see QProgressBar::text() */ - virtual QString text() const; +protected: + void showEvent(QShowEvent* event); + void hideEvent(QHideEvent* event); private slots: - void slotFoundMountPoint(const QString& mountPoint, - quint64 kBSize, - quint64 kBUsed, - quint64 kBAvailable); - - void slotDiskFreeSpaceDone(); - /** Refreshes the space information for the current set URL. */ void refresh(); - void showGettingSizeInfo(); - private: - bool m_gettingSize; - bool m_foundMountPoint; + quint64 m_kBSize; KUrl m_url; - QString m_text; + QTimer* m_timer; }; inline const KUrl& StatusBarSpaceInfo::url() const