diff options
| author | Peter Penz <[email protected]> | 2012-05-10 23:26:29 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-05-10 23:29:25 +0200 |
| commit | 73c30c7ea25891d3579277734393b70d9d1e2ab3 (patch) | |
| tree | cd72e0b6ec9aed6f779d2bdf8b87a3904d2e97d6 /src/views/dolphinview.h | |
| parent | 4fad8f8f530211839f431819031327275240f7f6 (diff) | |
Allow to remember view-properties for the search-mode
Per default Dolphin remembers the view-properties for each search-URL
individually. However when being in the search-mode, where the
search-URL is different each time by definition, it should also
be possible for the user to adjust the view-properties. The DolphinView
is not aware about any "search-mode", so an interface has been added
to provide a "context" for storing the view-properties. The context
will be adjusted by the DolphinViewContainer in case if the search-mode
is active.
Diffstat (limited to 'src/views/dolphinview.h')
| -rw-r--r-- | src/views/dolphinview.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index bfac88502..b2c4121a0 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -286,6 +286,16 @@ public: */ KFileItem rootItem() const; + /** + * Sets a context that is used for remembering the view-properties. + * Per default the context is empty and the path of the currently set URL + * is used for remembering the view-properties. Setting a custom context + * makes sense if specific types of URLs (e.g. search-URLs) should + * share common view-properties. + */ + void setViewPropertiesContext(const QString& context); + QString viewPropertiesContext() const; + public slots: /** * Changes the directory to \a url. If the current directory is equal to @@ -707,6 +717,13 @@ private: */ void updateWritableState(); + /** + * @return The current URL if no viewproperties-context is given (see + * DolphinView::viewPropertiesContext(), otherwise the context + * is returned. + */ + KUrl viewPropertiesUrl() const; + private: bool m_active; bool m_tabsForFiles; @@ -716,6 +733,7 @@ private: // tooltip may be shown when hovering an item. KUrl m_url; + QString m_viewPropertiesContext; Mode m_mode; QList<QByteArray> m_visibleRoles; |
