mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
TagFilter -> MultiFilter
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
19ac1dfa09
commit
c68a94da6a
4 changed files with 13 additions and 13 deletions
|
@ -2351,17 +2351,17 @@ bool TagFilterModel::filterRow(int source_row, const QModelIndex &source_parent,
|
|||
return false;
|
||||
}
|
||||
|
||||
TagFilterSortModel *TagFilterSortModel::instance()
|
||||
MultiFilterSortModel *MultiFilterSortModel::instance()
|
||||
{
|
||||
static TagFilterSortModel *self = new TagFilterSortModel();
|
||||
static MultiFilterSortModel *self = new MultiFilterSortModel();
|
||||
return self;
|
||||
}
|
||||
|
||||
TagFilterSortModel::TagFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||
MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent)
|
||||
{
|
||||
}
|
||||
|
||||
bool TagFilterSortModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
|
||||
bool MultiFilterSortModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
|
||||
{
|
||||
if (models.isEmpty()) {
|
||||
return true;
|
||||
|
@ -2376,12 +2376,12 @@ bool TagFilterSortModel::filterAcceptsRow(int source_row, const QModelIndex &sou
|
|||
return false;
|
||||
}
|
||||
|
||||
void TagFilterSortModel::myInvalidate()
|
||||
void MultiFilterSortModel::myInvalidate()
|
||||
{
|
||||
invalidate();
|
||||
}
|
||||
|
||||
void TagFilterSortModel::addFilterModel(MultiFilterInterface *model)
|
||||
void MultiFilterSortModel::addFilterModel(MultiFilterInterface *model)
|
||||
{
|
||||
QAbstractItemModel *itemModel = dynamic_cast<QAbstractItemModel *>(model);
|
||||
Q_ASSERT(itemModel);
|
||||
|
@ -2389,7 +2389,7 @@ void TagFilterSortModel::addFilterModel(MultiFilterInterface *model)
|
|||
connect(itemModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(myInvalidate()));
|
||||
}
|
||||
|
||||
void TagFilterSortModel::removeFilterModel(MultiFilterInterface *model)
|
||||
void MultiFilterSortModel::removeFilterModel(MultiFilterInterface *model)
|
||||
{
|
||||
QAbstractItemModel *itemModel = dynamic_cast<QAbstractItemModel *>(model);
|
||||
Q_ASSERT(itemModel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue