From 7308c7d03e182795d6b64d85a3f0725d8af32436 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 5 Aug 2008 20:15:51 +0000 Subject: First step of refactoring to improve the zooming capabilities of views: * Let classes that use DolphinView know about the currently used zoom level. * Provide more zoom levels for all views (the settings dialogs have not been adjusted yet). * Fixed issue that when using the wheel that the enabled state of the zoom actions has not been updated. svn path=/trunk/KDE/kdebase/apps/; revision=842715 --- src/dolphinview.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/dolphinview.h') diff --git a/src/dolphinview.h b/src/dolphinview.h index e74975f67..8060ebd4e 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -234,12 +234,17 @@ public: /** Returns the upper left position of the view content. */ QPoint contentsPosition() const; - /** Increases the size of the current set view mode. */ - void zoomIn(); - - /** Decreases the size of the current set view mode. */ - void zoomOut(); - + /** + * Sets the zoom level to \a level. It is assured that the used + * level is adjusted to be inside the range DolphinView::zoomLevelMinimum() and + * DolphinView::zoomLevelMaximum(). + */ + void setZoomLevel(int level); + int zoomLevel() const; + + int zoomLevelMinimum() const; + int zoomLevelMaximum() const; + /** * Returns true, if zooming in is possible. If false is returned, * the minimal zoom size is possible. @@ -460,6 +465,9 @@ signals: /** Is emitted if the additional information shown for this view has been changed. */ void additionalInfoChanged(); + + /** Is emitted if the zoom level has been changed by zooming in or out. */ + void zoomLevelChanged(int level); /** * Is emitted if information of an item is requested to be shown e. g. in the sidebar. -- cgit v1.3