class StatusBarSpaceInfo;
class QProgressBar;
class QLabel;
-class QTimer;
/**
* @brief Represents the statusbar of a Dolphin view.
* The statusbar allows to show messages and progress
* information.
*/
-class DolphinStatusBar : public KHBox {
+class DolphinStatusBar : public KHBox
+{
Q_OBJECT
public:
Error
};
- DolphinStatusBar(DolphinView* parent = 0);
+ DolphinStatusBar(QWidget* parent,
+ const KUrl& url);
+
virtual ~DolphinStatusBar();
/**
* 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
* 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();
/**
* 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 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 updateSpaceInfo(const KUrl& url);
+ void showSpaceInfo();
private:
StatusBarMessageLabel* m_messageLabel;
QLabel* m_progressText;
QProgressBar* m_progressBar;
int m_progress;
-
- QString m_defaultText;
};
#endif