]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/statusbarspaceinfo.h
Don't block unmounting when terminal panel's cwd is the mountpoint
[dolphin.git] / src / statusbar / statusbarspaceinfo.h
index 0a563ad13fb78d732f3b13b34689f9a533c61b73..326c419ab3dc709f5bc4ab23f73e727d1106b3a4 100644 (file)
 #ifndef STATUSBARSPACEINFO_H
 #define STATUSBARSPACEINFO_H
 
-#include <KUrl>
+#include <QUrl>
 
-#include <QColor>
-#include <QKeyEvent>
-#include <QString>
 
-#include <kcapacitybar.h>
+#include <KCapacityBar>
 
 class QHideEvent;
 class QShowEvent;
+class QMouseEvent;
+
+class SpaceInfoObserver;
 
 /**
  * @short Shows the available space for the volume represented
@@ -43,21 +43,20 @@ public:
     explicit StatusBarSpaceInfo(QWidget* parent = 0);
     virtual ~StatusBarSpaceInfo();
 
-    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) Q_DECL_OVERRIDE;
+    void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE;
+    void mousePressEvent(QMouseEvent* event) Q_DECL_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