]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/statusbarspaceinfo.h
Status bar: Hide the space free bar when size is unknown
[dolphin.git] / src / statusbar / statusbarspaceinfo.h
index 87e9f776b47db79990bd2dcc16b151f80510dc0f..0b0d787dd4f76e18daf1930653dd602989986feb 100644 (file)
 #ifndef STATUSBARSPACEINFO_H
 #define STATUSBARSPACEINFO_H
 
-#include <QUrl>
-
-
 #include <KCapacityBar>
 
+#include <QUrl>
+
 class QHideEvent;
 class QShowEvent;
 class QMouseEvent;
@@ -43,9 +42,15 @@ public:
     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