┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinsearchbox.h
diff options
context:
space:
mode:
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;