┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinsearchbox.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-04-20 20:03:51 +0200
committerPeter Penz <[email protected]>2011-04-20 20:09:08 +0200
commitae488b13186a4cb5d0bc5d7f23b07467d6638979 (patch)
treed50e891437d11d2e77ae5acafb9699bfcebe2102 /src/search/dolphinsearchbox.h
parentf551f73ae65c1901c86bbf7d130552c4540f427f (diff)
Improve usability of Search Panel
If the Search Panel is shown outside the context of the "Find" mode it will be always enabled and does a global search. Only if the user is in the "Find" mode and the searching is restricted to the current directory the Search Panel might get disabled if the current directory is not indexed. This solves the major usability issue that it was not clear for the users whether a global or restricted search is done.
Diffstat (limited to 'src/search/dolphinsearchbox.h')
-rw-r--r--src/search/dolphinsearchbox.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h
index cb4806292..27561481d 100644
--- a/src/search/dolphinsearchbox.h
+++ b/src/search/dolphinsearchbox.h
@@ -46,6 +46,16 @@ class DolphinSearchBox : public QWidget {
Q_OBJECT
public:
+ enum SearchContext {
+ SearchFileName,
+ SearchContent
+ };
+
+ enum SearchLocation {
+ SearchFromHere,
+ SearchEverywhere
+ };
+
explicit DolphinSearchBox(QWidget* parent = 0);
virtual ~DolphinSearchBox();
@@ -106,12 +116,24 @@ signals:
void returnPressed(const QString& text);
/**
+ * Is emitted if the search location has been changed by the user.
+ */
+ void searchLocationChanged(SearchLocation location);
+
+ /**
+ * Is emitted if the search context has been changed by the user.
+ */
+ void searchContextChanged(SearchContext context);
+
+ /**
* Emitted as soon as the search box should get closed.
*/
void closeRequest();
private slots:
void emitSearchSignal();
+ void slotSearchLocationChanged();
+ void slotSearchContextChanged();
void slotConfigurationChanged();
void slotSearchTextChanged(const QString& text);
void slotReturnPressed(const QString& text);