diff options
| author | Ismael Asensio <[email protected]> | 2019-12-15 17:18:18 +0100 |
|---|---|---|
| committer | Ismael Asensio <[email protected]> | 2019-12-15 17:28:38 +0100 |
| commit | 8e80c1d6dc1ede9b0a44ea1bd949487280c17064 (patch) | |
| tree | 5d1008fdb62741e49a1b1daeda0d078ffa72bf92 /src/search/dolphinfacetswidget.h | |
| parent | f6229562088487a7694c644be14d77f21d21c762 (diff) | |
[dolphin/search] Search by (multiple) tags
Summary:
Adds a tag selector in the extended filters of the search box.
Selected tag or tags are added to the search query along with the other filters (type, date, rating).
FEATURE: 412564
CCBUG: 356062
Test Plan:
- Menu shows the user tags
- Picking any tag/s filters the search to that specific tag/s
{F7727909}
Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg
Reviewed By: elvisangelaccio, ngraham, #dolphin, #vdg
Subscribers: kfm-devel
Tags: #dolphin
Maniphest Tasks: T9094
Differential Revision: https://phabricator.kde.org/D25130
Diffstat (limited to 'src/search/dolphinfacetswidget.h')
| -rw-r--r-- | src/search/dolphinfacetswidget.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/search/dolphinfacetswidget.h b/src/search/dolphinfacetswidget.h index 0a8a5161f..5325074c6 100644 --- a/src/search/dolphinfacetswidget.h +++ b/src/search/dolphinfacetswidget.h @@ -21,10 +21,12 @@ #define DOLPHINFACETSWIDGET_H #include <QWidget> +#include <KCoreDirLister> class QComboBox; class QDate; class QEvent; +class QToolButton; /** * @brief Allows to filter search-queries by facets. @@ -66,15 +68,27 @@ signals: protected: void changeEvent(QEvent* event) override; +private slots: + void updateTagsMenu(); + void updateTagsMenuItems(const QUrl&, const KFileItemList& items); + private: void setRating(const int stars); void setTimespan(const QDate& date); + void addSearchTag(const QString& tag); + void removeSearchTag(const QString& tag); + void initComboBox(QComboBox* combo); + void updateTagsSelector(); private: QComboBox* m_typeSelector; QComboBox* m_dateSelector; QComboBox* m_ratingSelector; + QToolButton* m_tagsSelector; + + QStringList m_searchTags; + KCoreDirLister m_tagsLister; }; #endif |
