X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a05db2f0d081a67f306141e2f31442eea49dd71b..87e8d0ba:/src/statusbar/dolphinstatusbar.h diff --git a/src/statusbar/dolphinstatusbar.h b/src/statusbar/dolphinstatusbar.h index b2afe2eb9..8b872ace5 100644 --- a/src/statusbar/dolphinstatusbar.h +++ b/src/statusbar/dolphinstatusbar.h @@ -23,13 +23,14 @@ #include #include -class KUrl; +class QUrl; class StatusBarSpaceInfo; class QLabel; 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; @@ -79,7 +80,7 @@ public: void setDefaultText(const QString& text); QString defaultText() const; - KUrl url() const; + QUrl url() const; int zoomLevel() const; /** @@ -89,7 +90,7 @@ public: public slots: void setText(const QString& text); - void setUrl(const KUrl& url); + void setUrl(const QUrl& url); void setZoomLevel(int zoomLevel); signals: @@ -101,8 +102,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); @@ -122,6 +122,12 @@ private slots: */ void slotResetToDefaultText(); + /** + * Updates the text of the zoom slider tooltip to show + * the currently used size. + */ + void updateZoomSliderToolTip(int zoomLevel); + private: /** * Makes the space information widget and zoom slider widget @@ -131,16 +137,10 @@ private: */ void setExtensionsVisible(bool visible); - /** - * Updates the text of the zoom slider tooltip to show - * the currently used size. - */ - void updateZoomSliderToolTip(int zoomLevel); - private: QString m_text; QString m_defaultText; - QLabel* m_label; + KSqueezedTextLabel* m_label; StatusBarSpaceInfo* m_spaceInfo; QSlider* m_zoomSlider;