]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/statusbarspaceinfo.h
Port away from QLinkedList
[dolphin.git] / src / statusbar / statusbarspaceinfo.h
index e89966a597d8acb943b24a970849f2e4d43e7623..0b0d787dd4f76e18daf1930653dd602989986feb 100644 (file)
 #ifndef STATUSBARSPACEINFO_H
 #define STATUSBARSPACEINFO_H
 
-#include <QUrl>
-
-
 #include <KCapacityBar>
 
+#include <QUrl>
+
 class QHideEvent;
 class QShowEvent;
 class QMouseEvent;
@@ -40,12 +39,18 @@ class StatusBarSpaceInfo : public KCapacityBar
     Q_OBJECT
 
 public:
-    explicit StatusBarSpaceInfo(QWidget* parent = 0);
+    explicit StatusBarSpaceInfo(QWidget* parent = nullptr);
     ~StatusBarSpaceInfo() override;
 
+    /**
+     * Use this to set the widget visibility as it can hide itself
+     */
+    void setShown(bool);
     void setUrl(const QUrl& url);
     QUrl url() const;
 
+    void update();
+
 protected:
     void showEvent(QShowEvent* event) override;
     void hideEvent(QHideEvent* event) override;
@@ -57,6 +62,8 @@ private slots:
 private:
     QScopedPointer<SpaceInfoObserver> m_observer;
     QUrl m_url;
+    bool m_ready;
+    bool m_shown;
 };
 
 #endif