┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinsearchbox.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-02-05 23:33:08 +0100
committerPeter Penz <[email protected]>2011-02-05 23:33:08 +0100
commit27456a2f73b3d01cc94233fda958d0b22cb1ac5b (patch)
tree10f247281b858a63e63fbf4c72c53bf62c12d219 /src/search/dolphinsearchbox.h
parent0a9cdfa4ed20d5efca8bb6d5a156ccf506c58bcc (diff)
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.
Diffstat (limited to 'src/search/dolphinsearchbox.h')
-rw-r--r--src/search/dolphinsearchbox.h14
1 files changed, 14 insertions, 0 deletions
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 <QWidget>
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;