X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/90e27974a4a4a3cb4d08717b5270bea8645b063e..bf4388c75525cffd150a51e6c4e0455f60db520f:/src/statusbar/spaceinfoobserver.h diff --git a/src/statusbar/spaceinfoobserver.h b/src/statusbar/spaceinfoobserver.h index d2fb6ebf3..67dbf15ec 100644 --- a/src/statusbar/spaceinfoobserver.h +++ b/src/statusbar/spaceinfoobserver.h @@ -20,9 +20,11 @@ #ifndef SPACEINFOOBSERVER_H #define SPACEINFOOBSERVER_H +#include + #include -class KUrl; +class QUrl; class MountPointObserver; class SpaceInfoObserver : public QObject @@ -30,22 +32,32 @@ class SpaceInfoObserver : public QObject Q_OBJECT public: - explicit SpaceInfoObserver(const KUrl& url, QObject* parent = 0); - virtual ~SpaceInfoObserver(); + explicit SpaceInfoObserver(const QUrl& url, QObject* parent = nullptr); + ~SpaceInfoObserver() override; quint64 size() const; quint64 available() const; - void setUrl(const KUrl& url); + void setUrl(const QUrl& url); + +public slots: + void update(); signals: /** - * This signal is emitted if the information that size() and/or available() will return has changed. + * This signal is emitted when the size or available space changes. */ void valuesChanged(); +private slots: + void spaceInfoChanged(quint64 size, quint64 available); + private: MountPointObserver* m_mountPointObserver; + + bool m_hasData; + quint64 m_dataSize; + quint64 m_dataAvailable; }; #endif