mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 09:20:13 +00:00
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
This commit is contained in:
parent
f9bbbd82f4
commit
60ef0fc76b
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue