┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/search/searchpanel.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-03-10 23:17:55 +0100
committerPeter Penz <[email protected]>2011-03-10 23:21:42 +0100
commit984c20161bc71684325a1394cfbb292683c94d53 (patch)
tree8be45dd133b78acb2acbfa65a9d1bb49d8cf60be /src/panels/search/searchpanel.h
parent6e0583f9888fcf46bb89735423b02b5ca53f1459 (diff)
Add search modes for the Search Panel
The search panel must get a hint whether clicking on the facets should result in searching everywhere or from the current folder. It is not sufficient to check the search-settings of the "Find:"-box, as when the "Find:"-box is invisible there is no hint for the user what kind of searching is done and the setting must be ignored.
Diffstat (limited to 'src/panels/search/searchpanel.h')
-rw-r--r--src/panels/search/searchpanel.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/panels/search/searchpanel.h b/src/panels/search/searchpanel.h
index 2e0ef669b..9404b4f8c 100644
--- a/src/panels/search/searchpanel.h
+++ b/src/panels/search/searchpanel.h
@@ -32,16 +32,33 @@ namespace Nepomuk {
}
/**
- * @brief Allows the filtering of search results.
+ * @brief Allows to search for files by enabling generic search patterns (= facets).
+ *
+ * For example it is possible to search for images, documents or specific tags.
+ * The search panel can be adjusted to search only from the current folder or everywhere.
*/
class SearchPanel : public Panel
{
Q_OBJECT
public:
+ enum SearchMode
+ {
+ Everywhere,
+ FromCurrentDir
+ };
+
SearchPanel(QWidget* parent = 0);
virtual ~SearchPanel();
+ /**
+ * Specifies whether a searching is done in all folders (= Everywhere)
+ * or from the current directory (= FromCurrentDir). The current directory
+ * is automatically determined when setUrl() has been called.
+ */
+ void setSearchMode(SearchMode mode);
+ SearchMode searchMode() const;
+
signals:
void urlActivated(const KUrl& url);
@@ -67,6 +84,7 @@ private:
private:
bool m_initialized;
+ SearchMode m_searchMode;
KJob* m_lastSetUrlStatJob;
KUrl m_startedFromDir;