42 bool StepFilterProxyModel::filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const
44 QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
46 int step = sourceModel()->data(index).toInt(&ok);
48 assert(ok &&
"Couldn't get int from item in first column (of sourceModel)");
50 return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent) && m_step_selection.
Contains(step);
bool Contains(int step) const
Checks whether the selection contains a specified step.
Namespace for SimPT shell package.
Interface for StepFilterProxyModel.
void SetSelectionText(const std::string &ranges)
Sets the selected ranges of steps.
virtual ~StepFilterProxyModel()
Destructor.
see the online Qt documentation
StepFilterProxyModel(QObject *parent=nullptr)
Constructor.
see the online Qt documentation
static const QRegExp g_repeated_regex
Regex for a series of repeated ranges, separated by , of ;.
void SetStepRanges(const QString &ranges)
Sets the ranges of the accepted steps of the first column.