diff options
| author | Peter Penz <[email protected]> | 2009-11-21 22:08:59 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-11-21 22:08:59 +0000 |
| commit | 35ba6eb132a2b969a53ee31e3a26d72a371e02d6 (patch) | |
| tree | 42cefbf2bf14519c3c5c33c0129f98933cbd6f6c /src/search/dolphinsearchoptionsconfigurator.h | |
| parent | 42372dc3b5f4ffd2cabef9a508d3a44bb95612de (diff) | |
* show only a minimized set of search options per default
* remember the search options when closing Dolphin, so that the user can adjust his "default search template"
svn path=/trunk/KDE/kdebase/apps/; revision=1052499
Diffstat (limited to 'src/search/dolphinsearchoptionsconfigurator.h')
| -rw-r--r-- | src/search/dolphinsearchoptionsconfigurator.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/src/search/dolphinsearchoptionsconfigurator.h b/src/search/dolphinsearchoptionsconfigurator.h index 5bceaceea..ee7867933 100644 --- a/src/search/dolphinsearchoptionsconfigurator.h +++ b/src/search/dolphinsearchoptionsconfigurator.h @@ -20,7 +20,9 @@ #ifndef DOLPHINSEARCHOPTIONSCONFIGURATOR_H #define DOLPHINSEARCHOPTIONSCONFIGURATOR_H +#include <kurl.h> #include <QList> +#include <QString> #include <QWidget> class KComboBox; @@ -40,22 +42,30 @@ public: virtual ~DolphinSearchOptionsConfigurator(); /** - * Returns the configured options as compliant - * string that may be used as input for a nepomuk:/-URI. + * Returns the sum of the configured options and the + * custom search query as Nepomuk URL. + * @see DolphinSearchOptionsConfigurator::setCustomSearchQuery() */ - QString options() const; + KUrl nepomukUrl() const; + +public slots: + /** + * Sets a custom search query that is added to the + * search query defined by the search options configurator. + * This is useful if a custom search user interface is + * offered outside the search options configurator. + */ + void setCustomSearchQuery(const QString& searchQuery); signals: - void searchOptionsChanged(const QString& options); + void searchOptionsChanged(); protected: virtual void showEvent(QShowEvent* event); private slots: void slotAddSelectorButtonClicked(); - - void emitSearchOptionsChanged(); - + void slotCriterionChanged(); void removeCriterion(); /** @@ -76,13 +86,22 @@ private: */ void addCriterion(SearchCriterionSelector* selector); + /** + * Returns true, DolphinSearchOptionsConfigurator::nepomukUrl() + * contains at least 1 search parameter. + */ + bool hasSearchParameters() const; + private: bool m_initialized; - KComboBox* m_searchFromBox; - KComboBox* m_searchWhatBox; + KComboBox* m_locationBox; + KComboBox* m_whatBox; QPushButton* m_addSelectorButton; + QPushButton* m_searchButton; + QPushButton* m_saveButton; QVBoxLayout* m_vBoxLayout; QList<SearchCriterionSelector*> m_criterions; + QString m_customSearchQuery; }; #endif |
