From 27456a2f73b3d01cc94233fda958d0b22cb1ac5b Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 5 Feb 2011 23:33:08 +0100 Subject: Provide a hook for externally triggered search queries In this case the "From Here"/"Everywhere" buttons and the "Filename"/"Content" buttons are useless. Currently they just get disabled but the plan is to provide a better visual indication of the current query and to remove them completely. --- src/search/dolphinsearchbox.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/search/dolphinsearchbox.h') diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h index 07fda5c29..cb4806292 100644 --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -25,6 +25,7 @@ #include class AbstractSearchFilterWidget; +class QLabel; class KLineEdit; class KSeparator; class QFormLayout; @@ -75,6 +76,14 @@ public: */ void selectAll(); + /** + * @param readOnly If set to true the searchbox cannot be modified + * by the user and acts as visual indicator for + * an externally triggered search query. + */ + void setReadOnly(bool readOnly); + bool isReadOnly() const; + protected: virtual bool event(QEvent* event); virtual void showEvent(QShowEvent* event); @@ -118,8 +127,11 @@ private: */ KUrl nepomukUrlForSearching() const; + void applyReadOnlyState(); + private: bool m_startedSearching; + bool m_readOnly; QVBoxLayout* m_topLayout; @@ -130,6 +142,8 @@ private: QPushButton* m_fromHereButton; QPushButton* m_everywhereButton; + QLabel* m_infoLabel; + KUrl m_searchPath; QTimer* m_startSearchTimer; -- cgit v1.3.1