X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/67f58d5082cbab3a1a4a83926e77ade299ec07ea..d48b733:/src/search/dolphinfacetswidget.h diff --git a/src/search/dolphinfacetswidget.h b/src/search/dolphinfacetswidget.h index 916e05608..6f0f0a619 100644 --- a/src/search/dolphinfacetswidget.h +++ b/src/search/dolphinfacetswidget.h @@ -22,14 +22,15 @@ #include -class QCheckBox; +class QButtonGroup; +class QDate; class QRadioButton; /** * @brief Allows to filter search-queries by facets. * * TODO: The current implementation is a temporary - * workaround for the 4.10 release and represents no + * workaround for the 4.9 release and represents no * real facets-implementation yet: There have been * some Dolphin specific user-interface and interaction * issues since 4.6 by embedding the Nepomuk facet-widget @@ -49,11 +50,35 @@ public: explicit DolphinFacetsWidget(QWidget* parent = 0); virtual ~DolphinFacetsWidget(); + QString ratingTerm() const; + QString facetType() const; + + bool isRatingTerm(const QString& term) const; + void setRatingTerm(const QString& term); + + void setFacetType(const QString& type); + +signals: + void facetChanged(); + +private: + void setRating(const int stars); + void setTimespan(const QDate& date); + + /** + * @return New radiobutton which is connected to the + * slotFacedChanged() slot whenever it has + * been toggled. + */ + QRadioButton* createRadioButton(const QString& text, + QButtonGroup* group); + private: - QCheckBox* m_documents; - QCheckBox* m_images; - QCheckBox* m_audio; - QCheckBox* m_videos; + QRadioButton* m_anyType; + QRadioButton* m_documents; + QRadioButton* m_images; + QRadioButton* m_audio; + QRadioButton* m_videos; QRadioButton* m_anytime; QRadioButton* m_today;