#include <rulelistmodel.h>
|
| | RuleListModel (SWMMModelLayer *layer, QObject *parent=nullptr) |
| | Construct over the layer + its (lazily-created) registry. The model holds QPointers so a layer/registry swap during project switch falls through to an empty rowCount() rather than crashing.
|
| |
| | ~RuleListModel () override |
| |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| |
| bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
| |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| |
| int | indexOf (const QString &name) const |
| | Look up the row index of a rule by name, or -1 if not present. Used by RulesEditorDialog::openForRule to drive the list-view selection.
|
| |
| QString | nameAt (int row) const |
| | Read the rule name at a given row, or empty if out of bounds.
|
| |
◆ RuleListModel()
Construct over the layer + its (lazily-created) registry. The model holds QPointers so a layer/registry swap during project switch falls through to an empty rowCount() rather than crashing.
◆ ~RuleListModel()
| openswmmvis::ui::RuleListModel::~RuleListModel |
( |
| ) |
|
|
overridedefault |
◆ data()
| QVariant openswmmvis::ui::RuleListModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ flags()
| Qt::ItemFlags openswmmvis::ui::RuleListModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ headerData()
| QVariant openswmmvis::ui::RuleListModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ indexOf()
| int openswmmvis::ui::RuleListModel::indexOf |
( |
const QString & |
name | ) |
const |
◆ nameAt()
| QString openswmmvis::ui::RuleListModel::nameAt |
( |
int |
row | ) |
const |
Read the rule name at a given row, or empty if out of bounds.
◆ removeRows()
| bool openswmmvis::ui::RuleListModel::removeRows |
( |
int |
row, |
|
|
int |
count, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| |
|
override |
◆ rowCount()
| int openswmmvis::ui::RuleListModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ setData()
| bool openswmmvis::ui::RuleListModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
The documentation for this class was generated from the following files: