]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/statusbarspaceinfo.h
Remove unused #include
[dolphin.git] / src / statusbar / statusbarspaceinfo.h
index d1858f8bb5ee21f95fada8dea52465c4f6932a9d..4f36517aeab5a21ace8a5ee5ef1eac1241d5198e 100644 (file)
 #ifndef STATUSBARSPACEINFO_H
 #define STATUSBARSPACEINFO_H
 
-#include <kurl.h>
+#include <KCapacityBar>
 
-#include <QColor>
-#include <QKeyEvent>
-#include <QString>
-
-#include <kcapacitybar.h>
+#include <QUrl>
 
 class QHideEvent;
 class QShowEvent;
+class QMouseEvent;
+
+class SpaceInfoObserver;
 
 /**
  * @short Shows the available space for the volume represented
@@ -40,24 +39,23 @@ class StatusBarSpaceInfo : public KCapacityBar
     Q_OBJECT
 
 public:
-    explicit StatusBarSpaceInfo(QWidget* parent);
-    virtual ~StatusBarSpaceInfo();
+    explicit StatusBarSpaceInfo(QWidget* parent = nullptr);
+    ~StatusBarSpaceInfo() override;
 
-    void setUrl(const KUrl& url);
-    KUrl url() const;
+    void setUrl(const QUrl& url);
+    QUrl url() const;
 
 protected:
-    void showEvent(QShowEvent* event);
-    void hideEvent(QHideEvent* event);
+    void showEvent(QShowEvent* event) override;
+    void hideEvent(QHideEvent* event) override;
+    void mousePressEvent(QMouseEvent* event) override;
 
 private slots:
-    /** Refreshes the space information for the current set URL. */
-    void refresh();
+    void slotValuesChanged();
 
 private:
-    quint64 m_kBSize;
-    KUrl m_url;
-    QTimer* m_timer;
+    QScopedPointer<SpaceInfoObserver> m_observer;
+    QUrl m_url;
 };
 
 #endif