]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinstatusbar.h
adapt Dolphin to kdelibs coding style (http://techbase.kde.org/Policies/Kdelibs_Codin...
[dolphin.git] / src / dolphinstatusbar.h
index 445419c3fdc4cece814177b19262714e7b5a6b67..e57288228016a00f1e9937e52595df2d5d611b94 100644 (file)
@@ -37,7 +37,8 @@ class QTimer;
  * The statusbar allows to show messages and progress
  * information.
  */
-class DolphinStatusBar : public KHBox {
+class DolphinStatusBar : public KHBox
+{
     Q_OBJECT
 
 public:
@@ -93,7 +94,10 @@ public:
      * operations.
      */
     void setProgress(int percent);
-    int progress() const { return m_progress; }
+    int progress() const
+    {
+        return m_progress;
+    }
 
     /**
      * Clears the message text of the status bar by replacing
@@ -108,7 +112,11 @@ public:
      * is cleared by DolphinStatusBar::clear().
      */
     void setDefaultText(const QString& text);
-    const QString& defaultText() const { return m_defaultText; }
+    const QString& defaultText() const;
+
+protected:
+    /** @see QWidget::resizeEvent() */
+    virtual void resizeEvent(QResizeEvent* event);
 
 private slots:
     void updateProgressInfo();
@@ -116,9 +124,16 @@ private slots:
     /**
      * Is invoked, when the URL of the DolphinView, where the
      * statusbar belongs too, has been changed. The space information
-     * is updated.
+     * content is updated.
      */
-    void updateSpaceInfo(const KUrl& url);
+    void updateSpaceInfoContent(const KUrl& url);
+
+    /**
+     * Shows the space information if there is enough room to show it
+     * without the need to clip the status bar text. If the progress
+     * bar is shown, the space information won't be shown.
+     */
+    void showSpaceInfo();
 
 private:
     StatusBarMessageLabel* m_messageLabel;
@@ -127,8 +142,6 @@ private:
     QLabel* m_progressText;
     QProgressBar* m_progressBar;
     int m_progress;
-
-    QString m_defaultText;
 };
 
 #endif