2010-05-09 22:18:05 +02:00
|
|
|
/* This file is part of Clementine.
|
2010-11-20 14:27:10 +01:00
|
|
|
Copyright 2010, David Sansome <me@davidsansome.com>
|
2010-05-09 22:18:05 +02:00
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "libraryfilterwidget.h"
|
|
|
|
|
2010-11-27 21:20:26 +01:00
|
|
|
#include <QActionGroup>
|
2015-12-11 20:59:55 +01:00
|
|
|
#include <QInputDialog>
|
2010-08-29 14:15:30 +02:00
|
|
|
#include <QKeyEvent>
|
2010-05-09 22:18:05 +02:00
|
|
|
#include <QMenu>
|
2014-02-22 18:10:30 +01:00
|
|
|
#include <QRegExp>
|
2010-05-09 22:18:05 +02:00
|
|
|
#include <QSettings>
|
2010-11-27 21:20:26 +01:00
|
|
|
#include <QTimer>
|
2010-05-09 22:18:05 +02:00
|
|
|
|
2020-09-18 16:15:19 +02:00
|
|
|
#include "core/song.h"
|
|
|
|
#include "groupbydialog.h"
|
|
|
|
#include "librarymodel.h"
|
|
|
|
#include "libraryquery.h"
|
|
|
|
#include "ui/iconloader.h"
|
|
|
|
#include "ui/settingsdialog.h"
|
|
|
|
#include "ui_libraryfilterwidget.h"
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
LibraryFilterWidget::LibraryFilterWidget(QWidget* parent)
|
|
|
|
: QWidget(parent),
|
|
|
|
ui_(new Ui_LibraryFilterWidget),
|
|
|
|
model_(nullptr),
|
|
|
|
group_by_dialog_(new GroupByDialog),
|
|
|
|
filter_delay_(new QTimer(this)),
|
|
|
|
filter_applies_to_model_(true),
|
|
|
|
delay_behaviour_(DelayedOnLargeLibraries) {
|
2010-05-10 23:50:31 +02:00
|
|
|
ui_->setupUi(this);
|
2014-02-22 18:10:30 +01:00
|
|
|
|
|
|
|
// Add the available fields to the tooltip here instead of the ui
|
|
|
|
// file to prevent that they get translated by mistake.
|
2018-09-08 22:18:44 +02:00
|
|
|
QString available_fields = (Song::kFtsColumns + Song::kIntColumns +
|
|
|
|
Song::kFloatColumns + Song::kDateColumns)
|
|
|
|
.join(", ")
|
|
|
|
.replace(QRegExp("\\bfts"), "");
|
2014-02-22 18:10:30 +01:00
|
|
|
ui_->filter->setToolTip(ui_->filter->toolTip().arg(available_fields));
|
|
|
|
|
2012-06-28 12:35:20 +02:00
|
|
|
connect(ui_->filter, SIGNAL(returnPressed()), SIGNAL(ReturnPressed()));
|
2010-11-27 21:20:26 +01:00
|
|
|
connect(filter_delay_, SIGNAL(timeout()), SLOT(FilterDelayTimeout()));
|
|
|
|
|
|
|
|
filter_delay_->setInterval(kFilterDelay);
|
|
|
|
filter_delay_->setSingleShot(true);
|
2010-05-09 22:18:05 +02:00
|
|
|
|
2010-05-19 17:45:29 +02:00
|
|
|
// Icons
|
2015-10-14 03:01:08 +02:00
|
|
|
ui_->options->setIcon(IconLoader::Load("configure", IconLoader::Base));
|
2010-05-19 17:45:29 +02:00
|
|
|
|
2010-05-09 22:18:05 +02:00
|
|
|
// Filter by age
|
|
|
|
QActionGroup* filter_age_group = new QActionGroup(this);
|
2010-05-10 23:50:31 +02:00
|
|
|
filter_age_group->addAction(ui_->filter_age_all);
|
|
|
|
filter_age_group->addAction(ui_->filter_age_today);
|
|
|
|
filter_age_group->addAction(ui_->filter_age_week);
|
|
|
|
filter_age_group->addAction(ui_->filter_age_month);
|
|
|
|
filter_age_group->addAction(ui_->filter_age_three_months);
|
|
|
|
filter_age_group->addAction(ui_->filter_age_year);
|
2010-05-09 22:18:05 +02:00
|
|
|
|
|
|
|
filter_age_menu_ = new QMenu(tr("Show"), this);
|
|
|
|
filter_age_menu_->addActions(filter_age_group->actions());
|
|
|
|
|
2019-11-10 15:07:12 +01:00
|
|
|
filter_ages_[ui_->filter_age_all] = -1;
|
|
|
|
filter_ages_[ui_->filter_age_today] = 60 * 60 * 24;
|
|
|
|
filter_ages_[ui_->filter_age_week] = 60 * 60 * 24 * 7;
|
|
|
|
filter_ages_[ui_->filter_age_month] = 60 * 60 * 24 * 30;
|
|
|
|
filter_ages_[ui_->filter_age_three_months] = 60 * 60 * 24 * 30 * 3;
|
|
|
|
filter_ages_[ui_->filter_age_year] = 60 * 60 * 24 * 365;
|
2010-05-09 22:18:05 +02:00
|
|
|
|
|
|
|
// "Group by ..."
|
2012-06-17 17:20:40 +02:00
|
|
|
group_by_group_ = CreateGroupByActions(this);
|
2010-05-09 22:18:05 +02:00
|
|
|
|
|
|
|
group_by_menu_ = new QMenu(tr("Group by"), this);
|
|
|
|
group_by_menu_->addActions(group_by_group_->actions());
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
connect(group_by_group_, SIGNAL(triggered(QAction*)),
|
|
|
|
SLOT(GroupByClicked(QAction*)));
|
2010-05-09 22:18:05 +02:00
|
|
|
|
2015-12-11 20:59:55 +01:00
|
|
|
connect(ui_->save_grouping, SIGNAL(triggered()), this, SLOT(SaveGroupBy()));
|
2015-12-12 04:49:51 +01:00
|
|
|
connect(ui_->manage_groupings, SIGNAL(triggered()), this,
|
|
|
|
SLOT(ShowGroupingManager()));
|
2015-12-11 20:59:55 +01:00
|
|
|
|
2010-05-09 22:18:05 +02:00
|
|
|
// Library config menu
|
2011-11-05 20:09:02 +01:00
|
|
|
library_menu_ = new QMenu(tr("Display options"), this);
|
|
|
|
library_menu_->setIcon(ui_->options->icon());
|
2010-06-09 17:38:00 +02:00
|
|
|
library_menu_->addMenu(filter_age_menu_);
|
|
|
|
library_menu_->addMenu(group_by_menu_);
|
2015-12-11 20:59:55 +01:00
|
|
|
library_menu_->addAction(ui_->save_grouping);
|
2015-12-12 04:49:51 +01:00
|
|
|
library_menu_->addAction(ui_->manage_groupings);
|
2010-06-09 17:38:00 +02:00
|
|
|
library_menu_->addSeparator();
|
|
|
|
ui_->options->setMenu(library_menu_);
|
2010-08-28 21:29:20 +02:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
connect(ui_->filter, SIGNAL(textChanged(QString)),
|
|
|
|
SLOT(FilterTextChanged(QString)));
|
2010-05-09 22:18:05 +02:00
|
|
|
}
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
LibraryFilterWidget::~LibraryFilterWidget() { delete ui_; }
|
2010-05-09 22:18:05 +02:00
|
|
|
|
2015-12-12 00:58:06 +01:00
|
|
|
void LibraryFilterWidget::UpdateGroupByActions() {
|
|
|
|
if (group_by_group_) {
|
2015-12-12 04:49:51 +01:00
|
|
|
disconnect(group_by_group_, 0, 0, 0);
|
2015-12-12 00:58:06 +01:00
|
|
|
delete group_by_group_;
|
|
|
|
}
|
|
|
|
|
|
|
|
group_by_group_ = CreateGroupByActions(this);
|
|
|
|
group_by_menu_->clear();
|
|
|
|
group_by_menu_->addActions(group_by_group_->actions());
|
|
|
|
connect(group_by_group_, SIGNAL(triggered(QAction*)),
|
|
|
|
SLOT(GroupByClicked(QAction*)));
|
|
|
|
if (model_) {
|
|
|
|
CheckCurrentGrouping(model_->GetGroupBy());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-17 17:20:40 +02:00
|
|
|
QActionGroup* LibraryFilterWidget::CreateGroupByActions(QObject* parent) {
|
|
|
|
QActionGroup* ret = new QActionGroup(parent);
|
2014-02-07 16:34:20 +01:00
|
|
|
ret->addAction(CreateGroupByAction(
|
|
|
|
tr("Group by Artist"), parent,
|
2012-06-17 17:20:40 +02:00
|
|
|
LibraryModel::Grouping(LibraryModel::GroupBy_Artist)));
|
2014-02-07 16:34:20 +01:00
|
|
|
ret->addAction(
|
|
|
|
CreateGroupByAction(tr("Group by Artist/Album"), parent,
|
|
|
|
LibraryModel::Grouping(LibraryModel::GroupBy_Artist,
|
|
|
|
LibraryModel::GroupBy_Album)));
|
2020-09-18 16:15:19 +02:00
|
|
|
ret->addAction(CreateGroupByAction(
|
|
|
|
tr("Group by Album artist/Album"), parent,
|
|
|
|
LibraryModel::Grouping(LibraryModel::GroupBy_AlbumArtist,
|
|
|
|
LibraryModel::GroupBy_Album)));
|
2014-02-07 16:34:20 +01:00
|
|
|
ret->addAction(CreateGroupByAction(
|
|
|
|
tr("Group by Artist/Year - Album"), parent,
|
|
|
|
LibraryModel::Grouping(LibraryModel::GroupBy_Artist,
|
|
|
|
LibraryModel::GroupBy_YearAlbum)));
|
|
|
|
ret->addAction(
|
|
|
|
CreateGroupByAction(tr("Group by Album"), parent,
|
|
|
|
LibraryModel::Grouping(LibraryModel::GroupBy_Album)));
|
|
|
|
ret->addAction(
|
|
|
|
CreateGroupByAction(tr("Group by Genre/Album"), parent,
|
|
|
|
LibraryModel::Grouping(LibraryModel::GroupBy_Genre,
|
|
|
|
LibraryModel::GroupBy_Album)));
|
|
|
|
ret->addAction(
|
|
|
|
CreateGroupByAction(tr("Group by Genre/Artist/Album"), parent,
|
|
|
|
LibraryModel::Grouping(LibraryModel::GroupBy_Genre,
|
|
|
|
LibraryModel::GroupBy_Artist,
|
|
|
|
LibraryModel::GroupBy_Album)));
|
2015-12-11 20:59:55 +01:00
|
|
|
|
|
|
|
QAction* sep1 = new QAction(parent);
|
|
|
|
sep1->setSeparator(true);
|
|
|
|
ret->addAction(sep1);
|
|
|
|
|
|
|
|
// read saved groupings
|
|
|
|
QSettings s;
|
|
|
|
s.beginGroup(LibraryModel::kSavedGroupingsSettingsGroup);
|
|
|
|
QStringList saved = s.childKeys();
|
|
|
|
for (int i = 0; i < saved.size(); ++i) {
|
|
|
|
QByteArray bytes = s.value(saved.at(i)).toByteArray();
|
|
|
|
QDataStream ds(&bytes, QIODevice::ReadOnly);
|
|
|
|
LibraryModel::Grouping g;
|
|
|
|
ds >> g;
|
|
|
|
ret->addAction(CreateGroupByAction(saved.at(i), parent, g));
|
|
|
|
}
|
|
|
|
|
|
|
|
QAction* sep2 = new QAction(parent);
|
|
|
|
sep2->setSeparator(true);
|
|
|
|
ret->addAction(sep2);
|
|
|
|
|
2012-06-17 17:20:40 +02:00
|
|
|
ret->addAction(CreateGroupByAction(tr("Advanced grouping..."), parent,
|
2014-02-07 16:34:20 +01:00
|
|
|
LibraryModel::Grouping()));
|
2012-06-17 17:20:40 +02:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
QAction* LibraryFilterWidget::CreateGroupByAction(
|
2014-02-07 16:34:20 +01:00
|
|
|
const QString& text, QObject* parent,
|
|
|
|
const LibraryModel::Grouping& grouping) {
|
2012-06-17 17:20:40 +02:00
|
|
|
QAction* ret = new QAction(text, parent);
|
|
|
|
ret->setCheckable(true);
|
|
|
|
|
|
|
|
if (grouping.first != LibraryModel::GroupBy_None) {
|
|
|
|
ret->setProperty("group_by", QVariant::fromValue(grouping));
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2015-12-11 20:59:55 +01:00
|
|
|
void LibraryFilterWidget::SaveGroupBy() {
|
|
|
|
QString text =
|
|
|
|
QInputDialog::getText(this, tr("Grouping Name"), tr("Grouping name:"));
|
|
|
|
if (!text.isEmpty() && model_) {
|
|
|
|
model_->SaveGrouping(text);
|
2015-12-12 00:58:06 +01:00
|
|
|
UpdateGroupByActions();
|
2015-12-11 20:59:55 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-12 04:49:51 +01:00
|
|
|
void LibraryFilterWidget::ShowGroupingManager() {
|
|
|
|
if (!groupings_manager_) {
|
|
|
|
groupings_manager_.reset(new SavedGroupingManager);
|
|
|
|
}
|
|
|
|
groupings_manager_->SetFilter(this);
|
|
|
|
groupings_manager_->UpdateModel();
|
|
|
|
groupings_manager_->show();
|
|
|
|
}
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
void LibraryFilterWidget::FocusOnFilter(QKeyEvent* event) {
|
2012-06-27 17:28:44 +02:00
|
|
|
ui_->filter->setFocus();
|
2011-03-13 15:14:16 +01:00
|
|
|
QApplication::sendEvent(ui_->filter, event);
|
|
|
|
}
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
void LibraryFilterWidget::SetLibraryModel(LibraryModel* model) {
|
2010-05-09 22:18:05 +02:00
|
|
|
if (model_) {
|
|
|
|
disconnect(model_, 0, this, 0);
|
|
|
|
disconnect(model_, 0, group_by_dialog_.get(), 0);
|
|
|
|
disconnect(group_by_dialog_.get(), 0, model_, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
model_ = model;
|
|
|
|
|
|
|
|
// Connect signals
|
|
|
|
connect(model_, SIGNAL(GroupingChanged(LibraryModel::Grouping)),
|
2014-02-07 16:34:20 +01:00
|
|
|
group_by_dialog_.get(),
|
|
|
|
SLOT(LibraryGroupingChanged(LibraryModel::Grouping)));
|
2010-05-09 22:18:05 +02:00
|
|
|
connect(model_, SIGNAL(GroupingChanged(LibraryModel::Grouping)),
|
|
|
|
SLOT(GroupingChanged(LibraryModel::Grouping)));
|
|
|
|
connect(group_by_dialog_.get(), SIGNAL(Accepted(LibraryModel::Grouping)),
|
|
|
|
model_, SLOT(SetGroupBy(LibraryModel::Grouping)));
|
2019-11-10 15:07:12 +01:00
|
|
|
|
2019-11-10 15:16:39 +01:00
|
|
|
for (QAction* action : filter_ages_.keys()) {
|
2019-11-10 15:07:12 +01:00
|
|
|
int age = filter_ages_[action];
|
2019-11-10 15:16:39 +01:00
|
|
|
connect(action, &QAction::triggered,
|
|
|
|
[this, age]() { model_->SetFilterAge(age); });
|
2019-11-10 15:07:12 +01:00
|
|
|
}
|
2010-05-09 22:18:05 +02:00
|
|
|
|
|
|
|
// Load settings
|
|
|
|
if (!settings_group_.isEmpty()) {
|
|
|
|
QSettings s;
|
|
|
|
s.beginGroup(settings_group_);
|
|
|
|
model_->SetGroupBy(LibraryModel::Grouping(
|
2014-02-07 16:34:20 +01:00
|
|
|
LibraryModel::GroupBy(
|
2019-01-21 22:39:39 +01:00
|
|
|
s.value("group_by1", int(LibraryModel::GroupBy_AlbumArtist))
|
|
|
|
.toInt()),
|
2014-02-07 16:34:20 +01:00
|
|
|
LibraryModel::GroupBy(
|
|
|
|
s.value("group_by2", int(LibraryModel::GroupBy_Album)).toInt()),
|
|
|
|
LibraryModel::GroupBy(
|
|
|
|
s.value("group_by3", int(LibraryModel::GroupBy_None)).toInt())));
|
2010-05-09 22:18:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void LibraryFilterWidget::GroupByClicked(QAction* action) {
|
|
|
|
if (action->property("group_by").isNull()) {
|
|
|
|
group_by_dialog_->show();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
LibraryModel::Grouping g =
|
|
|
|
action->property("group_by").value<LibraryModel::Grouping>();
|
2010-05-09 22:18:05 +02:00
|
|
|
model_->SetGroupBy(g);
|
|
|
|
}
|
|
|
|
|
|
|
|
void LibraryFilterWidget::GroupingChanged(const LibraryModel::Grouping& g) {
|
|
|
|
if (!settings_group_.isEmpty()) {
|
|
|
|
// Save the settings
|
|
|
|
QSettings s;
|
|
|
|
s.beginGroup(settings_group_);
|
|
|
|
s.setValue("group_by1", int(g[0]));
|
|
|
|
s.setValue("group_by2", int(g[1]));
|
|
|
|
s.setValue("group_by3", int(g[2]));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Now make sure the correct action is checked
|
2015-12-12 00:58:06 +01:00
|
|
|
CheckCurrentGrouping(g);
|
|
|
|
}
|
|
|
|
|
2015-12-12 04:49:51 +01:00
|
|
|
void LibraryFilterWidget::CheckCurrentGrouping(
|
|
|
|
const LibraryModel::Grouping& g) {
|
2014-02-10 14:29:07 +01:00
|
|
|
for (QAction* action : group_by_group_->actions()) {
|
2014-02-07 16:34:20 +01:00
|
|
|
if (action->property("group_by").isNull()) continue;
|
2010-05-09 22:18:05 +02:00
|
|
|
|
|
|
|
if (g == action->property("group_by").value<LibraryModel::Grouping>()) {
|
|
|
|
action->setChecked(true);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2012-06-17 17:20:40 +02:00
|
|
|
|
|
|
|
// Check the advanced action
|
|
|
|
group_by_group_->actions().last()->setChecked(true);
|
2010-05-09 22:18:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void LibraryFilterWidget::SetFilterHint(const QString& hint) {
|
2012-06-27 17:28:44 +02:00
|
|
|
ui_->filter->setPlaceholderText(hint);
|
2010-05-09 22:18:05 +02:00
|
|
|
}
|
|
|
|
|
2011-02-06 14:18:18 +01:00
|
|
|
void LibraryFilterWidget::SetQueryMode(QueryOptions::QueryMode query_mode) {
|
2012-06-27 17:28:44 +02:00
|
|
|
ui_->filter->clear();
|
|
|
|
ui_->filter->setEnabled(query_mode == QueryOptions::QueryMode_All);
|
2011-01-30 22:00:49 +01:00
|
|
|
|
2011-02-06 14:18:18 +01:00
|
|
|
model_->SetFilterQueryMode(query_mode);
|
2011-01-30 22:00:49 +01:00
|
|
|
}
|
|
|
|
|
2014-01-11 21:03:32 +01:00
|
|
|
void LibraryFilterWidget::ShowInLibrary(const QString& search) {
|
|
|
|
ui_->filter->setText(search);
|
|
|
|
}
|
|
|
|
|
2010-05-09 22:18:05 +02:00
|
|
|
void LibraryFilterWidget::SetAgeFilterEnabled(bool enabled) {
|
|
|
|
filter_age_menu_->setEnabled(enabled);
|
|
|
|
}
|
|
|
|
|
|
|
|
void LibraryFilterWidget::SetGroupByEnabled(bool enabled) {
|
|
|
|
group_by_menu_->setEnabled(enabled);
|
|
|
|
}
|
|
|
|
|
2010-06-09 17:38:00 +02:00
|
|
|
void LibraryFilterWidget::AddMenuAction(QAction* action) {
|
|
|
|
library_menu_->addAction(action);
|
2010-05-09 22:18:05 +02:00
|
|
|
}
|
2010-08-29 14:15:30 +02:00
|
|
|
|
|
|
|
void LibraryFilterWidget::keyReleaseEvent(QKeyEvent* e) {
|
|
|
|
switch (e->key()) {
|
|
|
|
case Qt::Key_Up:
|
|
|
|
emit UpPressed();
|
|
|
|
e->accept();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Qt::Key_Down:
|
|
|
|
emit DownPressed();
|
|
|
|
e->accept();
|
|
|
|
break;
|
2011-03-13 15:14:16 +01:00
|
|
|
|
|
|
|
case Qt::Key_Escape:
|
2012-06-27 17:28:44 +02:00
|
|
|
ui_->filter->clear();
|
2011-03-13 15:14:16 +01:00
|
|
|
e->accept();
|
|
|
|
break;
|
2010-08-29 14:15:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
QWidget::keyReleaseEvent(e);
|
|
|
|
}
|
2010-11-27 21:20:26 +01:00
|
|
|
|
|
|
|
void LibraryFilterWidget::FilterTextChanged(const QString& text) {
|
|
|
|
// Searching with one or two characters can be very expensive on the database
|
|
|
|
// even with FTS, so if there are a large number of songs in the database
|
|
|
|
// introduce a small delay before actually filtering the model, so if the
|
|
|
|
// user is typing the first few characters of something it will be quicker.
|
2014-02-07 16:34:20 +01:00
|
|
|
const bool delay =
|
|
|
|
(delay_behaviour_ == AlwaysDelayed) ||
|
|
|
|
(delay_behaviour_ == DelayedOnLargeLibraries && !text.isEmpty() &&
|
|
|
|
text.length() < 3 && model_->total_song_count() >= 100000);
|
2011-04-27 18:38:28 +02:00
|
|
|
|
|
|
|
if (delay) {
|
2010-11-27 21:20:26 +01:00
|
|
|
filter_delay_->start();
|
|
|
|
} else {
|
|
|
|
filter_delay_->stop();
|
2011-04-27 18:38:28 +02:00
|
|
|
FilterDelayTimeout();
|
2010-11-27 21:20:26 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void LibraryFilterWidget::FilterDelayTimeout() {
|
2012-06-27 17:28:44 +02:00
|
|
|
emit Filter(ui_->filter->text());
|
2011-04-27 18:38:28 +02:00
|
|
|
if (filter_applies_to_model_) {
|
2012-06-27 17:28:44 +02:00
|
|
|
model_->SetFilterText(ui_->filter->text());
|
2011-04-27 18:38:28 +02:00
|
|
|
}
|
2010-11-27 21:20:26 +01:00
|
|
|
}
|