X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/fa988586bc923b33497cbc97aaac07fc93a4ca83..771b9c8fc25edf9848841d5315ac36d5f09836cd:/src/statusbar/dolphinstatusbar.h diff --git a/src/statusbar/dolphinstatusbar.h b/src/statusbar/dolphinstatusbar.h index 7ceb2acf8..2474732f5 100644 --- a/src/statusbar/dolphinstatusbar.h +++ b/src/statusbar/dolphinstatusbar.h @@ -30,6 +30,7 @@ class QProgressBar; class QToolButton; class QSlider; class QTimer; +class KSqueezedTextLabel; /** * @brief Represents the statusbar of a Dolphin view. @@ -42,8 +43,8 @@ class DolphinStatusBar : public QWidget Q_OBJECT public: - DolphinStatusBar(QWidget* parent); - virtual ~DolphinStatusBar(); + explicit DolphinStatusBar(QWidget* parent); + ~DolphinStatusBar() override; QString text() const; @@ -66,8 +67,7 @@ public: /** * Replaces the text set by setText() by the text that - * has been set by setDefaultText(). It is assured that the previous - * text will be shown for at least 1 second. DolphinStatusBar::text() + * has been set by setDefaultText(). DolphinStatusBar::text() * will return an empty string after the reset has been done. */ void resetToDefaultText(); @@ -87,6 +87,11 @@ public: */ void readSettings(); + /** + * Refreshes the disk space information. + */ + void updateSpaceInfo(); + public slots: void setText(const QString& text); void setUrl(const QUrl& url); @@ -101,8 +106,7 @@ signals: void zoomLevelChanged(int zoomLevel); protected: - virtual void contextMenuEvent(QContextMenuEvent* event); - virtual bool eventFilter(QObject* obj, QEvent* event); + void contextMenuEvent(QContextMenuEvent* event) override; private slots: void showZoomSliderToolTip(int zoomLevel); @@ -114,14 +118,6 @@ private slots: */ void updateLabelText(); - /** - * Is invoked by m_resetToDefaultTextTimer and clears - * m_text so that the default text will be shown. This - * prevents that information-messages will be cleared - * too fast. - */ - void slotResetToDefaultText(); - /** * Updates the text of the zoom slider tooltip to show * the currently used size. @@ -140,7 +136,7 @@ private: private: QString m_text; QString m_defaultText; - QLabel* m_label; + KSqueezedTextLabel* m_label; StatusBarSpaceInfo* m_spaceInfo; QSlider* m_zoomSlider; @@ -151,7 +147,7 @@ private: int m_progress; QTimer* m_showProgressBarTimer; - QTimer* m_resetToDefaultTextTimer; + QTimer* m_delayUpdateTimer; QTime m_textTimestamp; };