| 52 | } |
| 53 | |
| 54 | bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const |
| 55 | { |
| 56 | const auto &filters = m_parent->filters(); |
| 57 | for (auto it = filters.begin(); it != filters.end(); ++it) |
| 58 | { |
| 59 | auto idx = sourceModel()->index(source_row, 0, source_parent); |
| 60 | auto data = sourceModel()->data(idx, it.key()); |
| 61 | auto match = data.toString(); |
| 62 | if(!it.value()->accepts(match)) |
| 63 | { |
| 64 | return false; |
| 65 | } |
| 66 | } |
| 67 | return true; |
| 68 | } |
| 69 | |
| 70 | void filterChanged() |
| 71 | { |