]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/spaceinfoobserver.h
Fix file preview for desktop files with absolute icon paths
[dolphin.git] / src / statusbar / spaceinfoobserver.h
index d2fb6ebf31ad88ae7b233ebffb00c1ef48db4359..93f4c8c9146b6122be489264c58d7e04907b8111 100644 (file)
 #ifndef SPACEINFOOBSERVER_H
 #define SPACEINFOOBSERVER_H
 
+#include <KIO/Job>
+
 #include <QObject>
 
-class KUrl;
+class QUrl;
 class MountPointObserver;
 
 class SpaceInfoObserver : public QObject
@@ -30,22 +32,31 @@ 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;
+
+    quint64 m_dataSize;
+    quint64 m_dataAvailable;
 };
 
 #endif