30 #include <QStringList>
39 : QSortFilterProxyModel (parent)
48 Separator_ = separator;
50 if (dynamicSortFilter ())
58 if (dynamicSortFilter ())
66 if (dynamicSortFilter ())
83 return (index.isValid () && index.model ()->rowCount (index)) ?
85 QSortFilterProxyModel::filterAcceptsRow (source_row, index);
88 QStringList filterTags;
89 const auto& pattern = filterRegExp ().pattern ();
90 for (
const auto& s : pattern.split (Separator_, QString::SkipEmptyParts))
91 filterTags << s.trimmed ();
93 if (!filterTags.size ())
97 for (
int i = 0; i < filterTags.size (); ++i)
100 for (
int j = 0; j < itemTags.size (); ++j)
101 if (itemTags.at (j).contains (filterTags.at (i)))