]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbar/dolphinstatusbar.h
Merge branch 'Applications/18.04'
[dolphin.git] / src / statusbar / dolphinstatusbar.h
index b2afe2eb9f6da930658d62a6c0b04af9426a8d28..8b872ace58325a161d6370d15ec94a960164bfb8 100644 (file)
 #include <QTime>
 #include <QWidget>
 
-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;