Changeset View
Changeset View
Standalone View
Standalone View
src/search/dolphinfacetswidget.h
Show All 16 Lines | |||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | #ifndef DOLPHINFACETSWIDGET_H | 20 | #ifndef DOLPHINFACETSWIDGET_H | ||
21 | #define DOLPHINFACETSWIDGET_H | 21 | #define DOLPHINFACETSWIDGET_H | ||
22 | 22 | | |||
23 | #include <QWidget> | 23 | #include <QWidget> | ||
24 | 24 | | |||
25 | class QButtonGroup; | 25 | class QComboBox; | ||
26 | class QDate; | 26 | class QDate; | ||
27 | class QEvent; | 27 | class QEvent; | ||
28 | class QRadioButton; | | |||
29 | 28 | | |||
30 | /** | 29 | /** | ||
31 | * @brief Allows to filter search-queries by facets. | 30 | * @brief Allows to filter search-queries by facets. | ||
32 | * | 31 | * | ||
33 | * TODO: The current implementation is a temporary | 32 | * TODO: The current implementation is a temporary | ||
34 | * workaround for the 4.9 release and represents no | 33 | * workaround for the 4.9 release and represents no | ||
35 | * real facets-implementation yet: There have been | 34 | * real facets-implementation yet: There have been | ||
36 | * some Dolphin specific user-interface and interaction | 35 | * some Dolphin specific user-interface and interaction | ||
Show All 28 Lines | 63 | signals: | |||
65 | void facetChanged(); | 64 | void facetChanged(); | ||
66 | 65 | | |||
67 | protected: | 66 | protected: | ||
68 | void changeEvent(QEvent* event) override; | 67 | void changeEvent(QEvent* event) override; | ||
69 | 68 | | |||
70 | private: | 69 | private: | ||
71 | void setRating(const int stars); | 70 | void setRating(const int stars); | ||
72 | void setTimespan(const QDate& date); | 71 | void setTimespan(const QDate& date); | ||
73 | 72 | void initComboBox(QComboBox* combo); | |||
74 | /** | | |||
75 | * @return New radiobutton which is connected to the | | |||
76 | * slotFacedChanged() slot whenever it has | | |||
77 | * been toggled. | | |||
78 | */ | | |||
79 | QRadioButton* createRadioButton(const QString& text, | | |||
80 | QButtonGroup* group); | | |||
81 | 73 | | |||
82 | private: | 74 | private: | ||
83 | QRadioButton* m_anyType; | 75 | QComboBox* m_typeSelector; | ||
84 | QRadioButton* m_folders; | 76 | QComboBox* m_dateSelector; | ||
85 | QRadioButton* m_documents; | 77 | QComboBox* m_ratingSelector; | ||
86 | QRadioButton* m_images; | | |||
87 | QRadioButton* m_audio; | | |||
88 | QRadioButton* m_videos; | | |||
89 | | ||||
90 | QRadioButton* m_anytime; | | |||
91 | QRadioButton* m_today; | | |||
92 | QRadioButton* m_yesterday; | | |||
93 | QRadioButton* m_thisWeek; | | |||
94 | QRadioButton* m_thisMonth; | | |||
95 | QRadioButton* m_thisYear; | | |||
96 | | ||||
97 | QRadioButton* m_anyRating; | | |||
98 | QRadioButton* m_oneOrMore; | | |||
99 | QRadioButton* m_twoOrMore; | | |||
100 | QRadioButton* m_threeOrMore; | | |||
101 | QRadioButton* m_fourOrMore; | | |||
102 | QRadioButton* m_maxRating; | | |||
103 | }; | 78 | }; | ||
104 | 79 | | |||
105 | #endif | 80 | #endif |