summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/listfilter.ui10
-rw-r--r--desktop-widgets/simplewidgets.cpp6
2 files changed, 16 insertions, 0 deletions
diff --git a/desktop-widgets/listfilter.ui b/desktop-widgets/listfilter.ui
index 48d813d21..dcdcd932e 100644
--- a/desktop-widgets/listfilter.ui
+++ b/desktop-widgets/listfilter.ui
@@ -51,6 +51,16 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QToolButton" name="selectionButton">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="popupMode">
+ <enum>QToolButton::InstantPopup</enum>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index addbda6af..86ea1fbc0 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -513,6 +513,12 @@ FilterBase::FilterBase(FilterModelBase *model_, QWidget *parent)
filter->setFilterCaseSensitivity(Qt::CaseInsensitive);
connect(ui.filterInternalList, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString)));
ui.filterList->setModel(filter);
+
+ QMenu *menu = new QMenu(this);
+ menu->addAction(tr("Select All"), model, &FilterModelBase::selectAll);
+ menu->addAction(tr("Unselect All"), model, &FilterModelBase::clearFilter);
+ menu->addAction(tr("Invert Selection"), model, &FilterModelBase::invertSelection);
+ ui.selectionButton->setMenu(menu);
}
void FilterBase::showEvent(QShowEvent *event)