┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinsearchbox.h
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-09-09 21:21:43 +0200
committerFrank Reininghaus <[email protected]>2013-09-09 21:27:22 +0200
commit258f0f60feb76876c846294c23121d41997ddc34 (patch)
tree7f5ad16a1e10a4418bf6dc936cadd85849b98ff7 /src/search/dolphinsearchbox.h
parent7e30467679a403f953e2547894febb51e8a3d78b (diff)
parent2d8872c3accbf4a6f07e3ce4d220c9f87057545a (diff)
Merge remote-tracking branch 'origin/KDE/4.11'
The most recent commit from the KDE/4.11 branch (new unit test) had to be modified slightly due to the changed signal emission when resorting the model changes only the groups, and not the order of the items (groupsChaged instead of itemsMoved).
Diffstat (limited to 'src/search/dolphinsearchbox.h')
-rw-r--r--src/search/dolphinsearchbox.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h
index f3cc535d6..e4c14b7cb 100644
--- a/src/search/dolphinsearchbox.h
+++ b/src/search/dolphinsearchbox.h
@@ -87,10 +87,27 @@ public:
void setReadOnly(bool readOnly, const KUrl& query = KUrl());
bool isReadOnly() const;
+ /**
+ * Set the search box to the active mode, if \a active
+ * is true. The active mode is default. The inactive mode only differs
+ * visually from the active mode, no change of the behavior is given.
+ *
+ * Using the search box in the inactive mode is useful when having split views,
+ * where the inactive view is indicated by an search box visually.
+ */
+ void setActive(bool active);
+
+ /**
+ * @return True, if the search box is in the active mode.
+ * @see DolphinSearchBox::setActive()
+ */
+ bool isActive() const;
+
protected:
virtual bool event(QEvent* event);
virtual void showEvent(QShowEvent* event);
virtual void keyReleaseEvent(QKeyEvent* event);
+ virtual bool eventFilter(QObject* obj, QEvent* event);
signals:
/**
@@ -111,6 +128,13 @@ signals:
*/
void closeRequest();
+ /**
+ * Is emitted, if the searchbox has been activated by
+ * an user interaction
+ * @see DolphinSearchBox::setActive()
+ */
+ void activated();
+
private slots:
void emitSearchRequest();
void emitCloseRequest();
@@ -137,6 +161,7 @@ private:
private:
bool m_startedSearching;
bool m_readOnly;
+ bool m_active;
QVBoxLayout* m_topLayout;