From 293e65797afd44a530df3435a8cc5b1b024aa3bb Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 10 Jun 2007 11:46:41 +0000 Subject: Remember and restore position of viewport when reloading or going back in history (worked already before the DolphinView/DolphinViewContainer split). Minor open issue: the x-position of the Column View is reset to 0... svn path=/trunk/KDE/kdebase/apps/; revision=673498 --- src/dolphinview.h | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/dolphinview.h') diff --git a/src/dolphinview.h b/src/dolphinview.h index bcccb7404..ebca53e99 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -236,18 +236,14 @@ public: KFileItem* fileItem(const QModelIndex index) const; /** - * Returns the x-position of the view content. - * The content of the view might be larger than the visible area + * Sets the upper left position of the view content + * to (x,y). The content of the view might be larger than the visible area * and hence a scrolling must be done. */ - int contentsX() const; + void setContentsPosition(int x, int y); - /** - * Returns the y-position of the view content. - * The content of the view might be larger than the visible area - * and hence a scrolling must be done. - */ - int contentsY() const; + /** Returns the upper left position of the view content. */ + QPoint contentsPosition() const; /** Increases the size of the current set view mode. */ void zoomIn(); @@ -415,12 +411,6 @@ private slots: */ void showPreview(const KFileItem& item, const QPixmap& pixmap); - /** - * Restores the x- and y-position of the contents if the - * current view is part of the history. - */ - void restoreContentsPos(); - void emitSelectionChangedSignal(); /** -- cgit v1.3