+ QStringList types = query.types();
+ types.removeOne("File"); // We are only interested in facet widget types
+ if (!types.isEmpty()) {
+ m_facetsWidget->setFacetType(types.first());
+ }
+
+ foreach (const Baloo::Term& subTerm, term.subTerms()) {
+ const QString property = subTerm.property();
+
+ if (property == QLatin1String("filename")) {
+ setText(subTerm.value().toString());
+ } else if (m_facetsWidget->isRatingTerm(subTerm)) {
+ m_facetsWidget->setRatingTerm(subTerm);
+ }
+ }
+
+ m_startSearchTimer->stop();
+ blockSignals(false);
+#endif
+}
+
+void DolphinSearchBox::updateFacetsToggleButton()
+{
+ const bool facetsIsVisible = SearchSettings::showFacetsWidget();
+ m_facetsToggleButton->setChecked(facetsIsVisible ? true : false);
+ m_facetsToggleButton->setIcon(QIcon::fromTheme(facetsIsVisible ? "arrow-up-double" : "arrow-down-double"));
+ m_facetsToggleButton->setText(facetsIsVisible ? i18nc("action:button", "Fewer Options") : i18nc("action:button", "More Options"));