| 32 | } |
| 33 | |
| 34 | bool VisibilityFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const |
| 35 | { |
| 36 | const QModelIndex source_index = sourceModel()->index(source_row, 0, source_parent); |
| 37 | if (!source_index.isValid()) { |
| 38 | return false; |
| 39 | } |
| 40 | |
| 41 | if (m_hideItems) { |
| 42 | int flags = source_index.data(m_flagRole).toInt(); |
| 43 | if (flags & m_invisibleMask) |
| 44 | return false; |
| 45 | } |
| 46 | |
| 47 | return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); |
| 48 | } |
| 49 | |
| 50 | void VisibilityFilterProxyModel::setHideItems(bool hideItems) |
| 51 | { |