#ifndef STATUSBARSPACEINFO_H
#define STATUSBARSPACEINFO_H
-#include <QUrl>
-
-
#include <KCapacityBar>
+#include <QUrl>
+
class QHideEvent;
class QShowEvent;
class QMouseEvent;
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;
private:
QScopedPointer<SpaceInfoObserver> m_observer;
QUrl m_url;
+ bool m_ready;
+ bool m_shown;
};
#endif