#include <QWidget>
-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
Q_OBJECT
public:
- explicit DolphinFacetsWidget(QWidget* parent = 0);
- virtual ~DolphinFacetsWidget();
+ explicit DolphinFacetsWidget(QWidget* parent = nullptr);
+ ~DolphinFacetsWidget() override;
+
+ 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_folders;
+ QRadioButton* m_documents;
+ QRadioButton* m_images;
+ QRadioButton* m_audio;
+ QRadioButton* m_videos;
QRadioButton* m_anytime;
QRadioButton* m_today;