diff options
| author | Peter Penz <[email protected]> | 2008-10-05 21:17:06 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-10-05 21:17:06 +0000 |
| commit | 2a1c78d3dad73dff28e5cd5899987edc5f5d5780 (patch) | |
| tree | 52abf872cc4f0f5547bc76ff9f2f1de0badf8f7e /src/dolphinstatusbar.h | |
| parent | 2efa5667f6dcde4429ec259c4ac703b9d99fb4bc (diff) | |
Provide a zoom slider in the status bar. It is configurable whether the zoom slider and/or the space information is shown in the statusbar (the GUI in the settings dialog will be provided during the next week).
svn path=/trunk/KDE/kdebase/apps/; revision=868272
Diffstat (limited to 'src/dolphinstatusbar.h')
| -rw-r--r-- | src/dolphinstatusbar.h | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/src/dolphinstatusbar.h b/src/dolphinstatusbar.h index 1a9aaa4c1..49f14357d 100644 --- a/src/dolphinstatusbar.h +++ b/src/dolphinstatusbar.h @@ -27,8 +27,10 @@ class DolphinView; class KUrl; class StatusBarMessageLabel; class StatusBarSpaceInfo; -class QProgressBar; class QLabel; +class QProgressBar; +class QSlider; +class QTimer; /** * @brief Represents the statusbar of a Dolphin view. @@ -53,8 +55,7 @@ public: Error }; - DolphinStatusBar(QWidget* parent, - const KUrl& url); + DolphinStatusBar(QWidget* parent, DolphinView* view); virtual ~DolphinStatusBar(); @@ -128,21 +129,50 @@ private slots: * content is updated. */ void updateSpaceInfoContent(const KUrl& url); + + /** + * Requests setting the zoom level to \a zoomLevel by applying it + * to m_requestedZoomLevel and triggering a short timer, which will + * invoke DolphinStatusBar::updateZoomLevel(). This assures no blocking + * of the zoom slider when zooming views having a huge number of + * items. + */ + void requestZoomLevel(int zoomLevel); + + /** + * Updates the zoom level to m_requestedZoomLevel (see also + * DolphinStatusBar::requestZoomLevel(). + */ + void updateZoomLevel(); /** - * 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. + * 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(); + +private: + /** + * Makes the space information widget and zoom slider widget + * visible, if \a visible is true and the settings allow to show + * the widgets. If \a visible is false, it is assured that both + * widgets are hidden. */ - void showSpaceInfo(); + void setExtensionsVisible(bool visible); private: + DolphinView* m_view; StatusBarMessageLabel* m_messageLabel; StatusBarSpaceInfo* m_spaceInfo; + QSlider* m_zoomSlider; + QTimer* m_zoomTimer; QLabel* m_progressText; QProgressBar* m_progressBar; int m_progress; + + int m_requestedZoomLevel; }; #endif |
