From 2efa5667f6dcde4429ec259c4ac703b9d99fb4bc Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 5 Oct 2008 21:13:50 +0000 Subject: do only a polling of the available space when the widget is visible svn path=/trunk/KDE/kdebase/apps/; revision=868270 --- src/statusbarspaceinfo.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/statusbarspaceinfo.h') diff --git a/src/statusbarspaceinfo.h b/src/statusbarspaceinfo.h index 839c74e1a..7a9fae36d 100644 --- a/src/statusbarspaceinfo.h +++ b/src/statusbarspaceinfo.h @@ -29,6 +29,8 @@ #include class KDiskFreeSp; +class QHideEvent; +class QShowEvent; /** * @short Shows the available space for the volume represented @@ -45,6 +47,10 @@ public: void setUrl(const KUrl& url); const KUrl& url() const; +protected: + void showEvent(QShowEvent* event); + void hideEvent(QHideEvent* event); + private slots: /** Refreshes the space information for the current set URL. */ void refresh(); @@ -52,6 +58,7 @@ private slots: private: quint64 m_kBSize; KUrl m_url; + QTimer* m_timer; }; inline const KUrl& StatusBarSpaceInfo::url() const -- cgit v1.3