┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinsearchbox.h
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2013-09-05 16:22:59 +0200
committerEmmanuel Pescosta <[email protected]>2013-09-05 16:22:59 +0200
commite1d88c4d69ba0fb38951954dceab937741528eab (patch)
treec6d2759e0628a431880fe1ca2ad1519c4e5296c6 /src/search/dolphinsearchbox.h
parent5df1b07bbc5cf669da1fb1a4a128755e7567c6a1 (diff)
Fix Bug 296970 - split view wrong behavior with search tab
Implemented setActive(bool active), isActive() and activated() signal for DolphinSearchBox - similar to the KUrlNavigator implementation. BUG: 296970 FIXED-IN: 4.11.2 REVIEW: 112534
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;