┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-07-24 16:37:07 +0000
committerPeter Penz <[email protected]>2010-07-24 16:37:07 +0000
commit49eb864b03b6370e403c6f048ab18d1478eab045 (patch)
treef056b119de4d358e056287b90ec2e05f53fe2004 /src/dolphinviewcontainer.h
parent4ba9eb8ea34baee7e5e100a0d3c33f23f75cf708 (diff)
Unify the search interface for non-indexed and indexed folders
svn path=/trunk/KDE/kdebase/apps/; revision=1154073
Diffstat (limited to 'src/dolphinviewcontainer.h')
-rw-r--r--src/dolphinviewcontainer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h
index 50d7c9461..c222e7a55 100644
--- a/src/dolphinviewcontainer.h
+++ b/src/dolphinviewcontainer.h
@@ -41,6 +41,7 @@ class KUrl;
class DolphinModel;
class KUrlNavigator;
class DolphinDirLister;
+class DolphinSearchBox;
class DolphinSortFilterProxyModel;
class DolphinStatusBar;
@@ -94,6 +95,13 @@ public:
/** Returns true, if the filter bar is visible. */
bool isFilterBarVisible() const;
+ /**
+ * Enables the search mode, if \p enabled is true. In the search mode the URL navigator
+ * will be hidden and replaced by a line editor that allows to enter a search term.
+ */
+ void setSearchModeEnabled(bool enabled);
+ bool isSearchModeEnabled() const;
+
public slots:
/**
* Sets the current active URL, where all actions are applied. The
@@ -227,11 +235,22 @@ private slots:
void slotHistoryChanged();
+ /**
+ * Gets the search URL from the searchbox and starts searching.
+ * @param text Text the user has entered into the searchbox.
+ */
+ void startSearching(const QString& text);
+ void closeSearchBox();
+
+private:
+ bool isSearchUrl(const KUrl& url) const;
+
private:
bool m_isFolderWritable;
QVBoxLayout* m_topLayout;
KUrlNavigator* m_urlNavigator;
+ DolphinSearchBox* m_searchBox;
DolphinView* m_view;