diff options
| author | Peter Penz <[email protected]> | 2010-04-03 08:48:35 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-04-03 08:48:35 +0000 |
| commit | 7ae94915f72857ed4825ef6b78e4753896be28f9 (patch) | |
| tree | 2359b214d6dff9584ffce0bab32e45c5ca142937 /src/statusbar/dolphinstatusbar.h | |
| parent | 2dc23d4e6dc8a3b5d9e4f816fe9ddab13f957cc6 (diff) | |
Cleanup of statusbar widgets:
- Provide proper size hints instead of hiding extensions on small widths
- Provide context menu, which allows to enable/disable the zoom level extension and the space info extension. Also copying the status bar text is possible (useful e. g. for error messages).
BUG: 188980
svn path=/trunk/KDE/kdebase/apps/; revision=1110498
Diffstat (limited to 'src/statusbar/dolphinstatusbar.h')
| -rw-r--r-- | src/statusbar/dolphinstatusbar.h | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/statusbar/dolphinstatusbar.h b/src/statusbar/dolphinstatusbar.h index 2fed4788d..6f5844270 100644 --- a/src/statusbar/dolphinstatusbar.h +++ b/src/statusbar/dolphinstatusbar.h @@ -21,8 +21,8 @@ #ifndef DOLPHINSTATUSBAR_H #define DOLPHINSTATUSBAR_H -#include <khbox.h> #include <QTime> +#include <QWidget> class DolphinView; class KUrl; @@ -39,7 +39,7 @@ class QSlider; * The statusbar allows to show messages and progress * information. */ -class DolphinStatusBar : public KHBox +class DolphinStatusBar : public QWidget { Q_OBJECT @@ -56,7 +56,7 @@ public: Error }; - DolphinStatusBar(QWidget* parent, DolphinView* view); + explicit DolphinStatusBar(QWidget* parent, DolphinView* view); virtual ~DolphinStatusBar(); @@ -97,10 +97,7 @@ public: * operations. */ void setProgress(int percent); - int progress() const - { - return m_progress; - } + int progress() const; /** * Clears the message text of the status bar by replacing @@ -115,7 +112,7 @@ public: * is cleared by DolphinStatusBar::clear(). */ void setDefaultText(const QString& text); - const QString& defaultText() const; + QString defaultText() const; /** * Refreshes the status bar to get synchronized with the (updated) Dolphin settings. @@ -123,8 +120,8 @@ public: void refresh(); protected: - /** @see QWidget::resizeEvent() */ - virtual void resizeEvent(QResizeEvent* event); + /** @see QWidget::contextMenuEvent() */ + virtual void contextMenuEvent(QContextMenuEvent* event); private slots: /** @@ -139,13 +136,6 @@ private slots: */ void setZoomLevel(int zoomLevel); - /** - * Assures that the text of the statusbar stays visible by hiding - * the space information widget or the zoom slider widget if not - * enough width is available. - */ - void assureVisibleText(); - void zoomOut(); void zoomIn(); void showZoomSliderToolTip(int zoomLevel); |
