#include <meshattributetablemodel.h>
◆ Kind
Which family of mesh elements the rows represent.
| Enumerator |
|---|
| Vertex | |
| Edge | |
| Cell | |
◆ MeshAttributeTableModel()
| MeshAttributeTableModel::MeshAttributeTableModel |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ columnCount()
| int MeshAttributeTableModel::columnCount |
( |
const QModelIndex & |
parent = {} | ) |
const |
|
override |
◆ columnSpecs()
◆ data()
| QVariant MeshAttributeTableModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ elementExtent()
| QRectF MeshAttributeTableModel::elementExtent |
( |
int |
row, |
|
|
bool * |
ok = nullptr |
|
) |
| const |
Bounding box of row's element in the layer's own (map) coordinates — a degenerate point for a vertex, the segment for an edge, the triangle bbox for a cell. ok reports whether the row resolved; a vertex sitting exactly at the origin is a legitimate zero-size rect, so the rect alone cannot signal failure.
◆ flags()
| Qt::ItemFlags MeshAttributeTableModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ headerData()
| QVariant MeshAttributeTableModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ kind()
| Kind MeshAttributeTableModel::kind |
( |
| ) |
const |
|
inline |
◆ layer()
◆ objectEdited
| void MeshAttributeTableModel::objectEdited |
( |
const QString & |
refName | ) |
|
|
signal |
Emitted after a user-initiated cell edit commits, carrying the element's MeshObjectRef name. Distinct from dataChanged so listeners can tell a user edit from a synthetic refresh and avoid feedback loops — the same convention SWMMAttributeTableModel::objectEdited follows.
◆ refForRow()
| SWMMObjectRef MeshAttributeTableModel::refForRow |
( |
int |
row | ) |
const |
Selection-bus ref naming the element on row, or an invalid ref.
◆ reload
| void MeshAttributeTableModel::reload |
( |
| ) |
|
|
slot |
Full reload — rebuilds the edge row index and resets the model.
◆ rowCount()
| int MeshAttributeTableModel::rowCount |
( |
const QModelIndex & |
parent = {} | ) |
const |
|
override |
◆ rowForRef()
| int MeshAttributeTableModel::rowForRef |
( |
const SWMMObjectRef & |
ref | ) |
const |
Inverse of refForRow. For an interior edge, EITHER slot of the pair resolves to the single row that represents it. -1 when the ref names a different layer, a different kind, or an element that is gone.
◆ setCanvas()
| void MeshAttributeTableModel::setCanvas |
( |
MapCanvas * |
canvas | ) |
|
Canvas whose MapUndoStack the edits are pushed onto. Null ⇒ edits still apply, just unundoably (the push helpers' headless path). Out-of-line so this header does not have to pull in MapCanvas.
◆ setData()
| bool MeshAttributeTableModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
◆ setModelLayer()
The SWMM model this mesh is coupled to. Supplies the candidate lists behind the picker columns — coupled node, BC time series, BC rating curve — so those cells can only ever name an object that exists. Without it those columns fall back to plain text entry.
◆ setSource()
Bind the model to a (layer, kind) pair; rebuilds the column schema and the edge row index, then resets. Pass a null layer to clear.
The documentation for this class was generated from the following files: