]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/spaceinfoobserver.h
Status bar: Hide the space free bar when size is unknown
[dolphin.git] / src / statusbar / spaceinfoobserver.h
index e1311abde592aefcbe222085d25f17250dcb6396..67dbf15ec4801f472e0a23e307280565725f1f20 100644 (file)
 #ifndef SPACEINFOOBSERVER_H
 #define SPACEINFOOBSERVER_H
 
 #ifndef SPACEINFOOBSERVER_H
 #define SPACEINFOOBSERVER_H
 
-#include <QObject>
-
 #include <KIO/Job>
 
 #include <KIO/Job>
 
+#include <QObject>
+
 class QUrl;
 class MountPointObserver;
 
 class QUrl;
 class MountPointObserver;
 
@@ -32,14 +32,17 @@ class SpaceInfoObserver : public QObject
     Q_OBJECT
 
 public:
     Q_OBJECT
 
 public:
-    explicit SpaceInfoObserver(const QUrl& 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 QUrl& url);
 
 
     quint64 size() const;
     quint64 available() const;
 
     void setUrl(const QUrl& url);
 
+public slots:
+    void update();
+
 signals:
     /**
      * This signal is emitted when the size or available space changes.
 signals:
     /**
      * This signal is emitted when the size or available space changes.
@@ -52,6 +55,7 @@ private slots:
 private:
     MountPointObserver* m_mountPointObserver;
 
 private:
     MountPointObserver* m_mountPointObserver;
 
+    bool    m_hasData;
     quint64 m_dataSize;
     quint64 m_dataAvailable;
 };
     quint64 m_dataSize;
     quint64 m_dataAvailable;
 };