Commit 60ef0fc7 authored by XY Quadrat's avatar XY Quadrat Committed by Elvis Angelaccio

Add option to only search for folders

This commit adds an option under "More options" at the search widget.
It allows to only search for folders and filter out everything else,
just like the other options (e.g. "Videos") above.

FEATURE: 269334
REVIEW: 130159
parent f9bbbd82
......@@ -33,6 +33,7 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) :
m_images(0),
m_audio(0),
m_videos(0),
m_folders(0),
m_anytime(0),
m_today(0),
m_yesterday(0),
......@@ -52,6 +53,7 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) :
m_images = createRadioButton(i18nc("@option:check", "Images"), filetypeGroup);
m_audio = createRadioButton(i18nc("@option:check", "Audio Files"), filetypeGroup);
m_videos = createRadioButton(i18nc("@option:check", "Videos"), filetypeGroup);
m_folders = createRadioButton(i18nc("@option:check", "Folders"), filetypeGroup);
QVBoxLayout* typeLayout = new QVBoxLayout();
typeLayout->setSpacing(0);
......@@ -60,6 +62,7 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) :
typeLayout->addWidget(m_images);
typeLayout->addWidget(m_audio);
typeLayout->addWidget(m_videos);
typeLayout->addWidget(m_folders);
typeLayout->addStretch();
QButtonGroup* timespanGroup = new QButtonGroup(this);
......@@ -160,6 +163,8 @@ QString DolphinFacetsWidget::facetType() const
return QStringLiteral("Audio");
} else if (m_videos->isChecked()) {
return QStringLiteral("Video");
} else if (m_folders->isChecked()) {
return QStringLiteral("Folder");
}
return QString();
......
......@@ -79,6 +79,7 @@ private:
QRadioButton* m_images;
QRadioButton* m_audio;
QRadioButton* m_videos;
QRadioButton* m_folders;
QRadioButton* m_anytime;
QRadioButton* m_today;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment