SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::ui::Mesh2DAquiferModel Class Reference

The [2D_AQUIFER] rows: scope, the five positional columns, and the law/closure selections. More...

#include <mesh2daquifermodel.h>

Inheritance diagram for openswmmvis::ui::Mesh2DAquiferModel:
Collaboration diagram for openswmmvis::ui::Mesh2DAquiferModel:

Public Types

enum  Column {
  ColScope = 0 ,
  ColTarget ,
  ColKs ,
  ColZs ,
  ColThetaS ,
  ColThetaR ,
  ColAlpha ,
  ColSoil ,
  ColClosure ,
  ColHg0 ,
  ColCLoss ,
  ColCount
}
 

Public Member Functions

 Mesh2DAquiferModel (QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
void load (SWMM_Engine engine)
 Replace the staged rows with the engine's.
 
QString commit (SWMM_Engine engine)
 
bool isDirty () const
 
int appendRow ()
 Append a row seeded with the defaults the parser uses.
 
void setUnitLabels (const QString &lengthLabel, const QString &rateLabel)
 Column labels want the project's length/rate words.
 

Static Public Member Functions

static QStringList soilTokens ()
 
static QStringList closureTokens ()
 
static int closureCodeAt (int index)
 
static int closureIndexOf (int code)
 

Detailed Description

The [2D_AQUIFER] rows: scope, the five positional columns, and the law/closure selections.

Member Enumeration Documentation

◆ Column

Enumerator
ColScope 

"*", "TAG <t>" or "CELL <n>"

ColTarget 

the tag name or the 1-based cell index

ColKs 
ColZs 
ColThetaS 
ColThetaR 
ColAlpha 
ColSoil 
ColClosure 
ColHg0 
ColCLoss 
ColCount 

Constructor & Destructor Documentation

◆ Mesh2DAquiferModel()

openswmmvis::ui::Mesh2DAquiferModel::Mesh2DAquiferModel ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ appendRow()

int openswmmvis::ui::Mesh2DAquiferModel::appendRow ( )

Append a row seeded with the defaults the parser uses.

◆ closureCodeAt()

int openswmmvis::ui::Mesh2DAquiferModel::closureCodeAt ( int  index)
static
Here is the caller graph for this function:

◆ closureIndexOf()

int openswmmvis::ui::Mesh2DAquiferModel::closureIndexOf ( int  code)
static
Here is the caller graph for this function:

◆ closureTokens()

QStringList openswmmvis::ui::Mesh2DAquiferModel::closureTokens ( )
static

Closure tokens. Index 0 is AUTO (code −1); the rest are 0..2 — see closureCodeAt().

Here is the caller graph for this function:

◆ columnCount()

int openswmmvis::ui::Mesh2DAquiferModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

◆ commit()

QString openswmmvis::ui::Mesh2DAquiferModel::commit ( SWMM_Engine  engine)

Apply the staged rows to the engine. Every row is rewritten (the C API has no "set row"), which is also what makes a reorder work.

Returns
an empty string on success, else the first engine complaint.
Here is the call graph for this function:

◆ data()

QVariant openswmmvis::ui::Mesh2DAquiferModel::data ( const QModelIndex &  index,
int  role 
) const
override
Here is the call graph for this function:

◆ flags()

Qt::ItemFlags openswmmvis::ui::Mesh2DAquiferModel::flags ( const QModelIndex &  index) const
override

◆ headerData()

QVariant openswmmvis::ui::Mesh2DAquiferModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

◆ isDirty()

bool openswmmvis::ui::Mesh2DAquiferModel::isDirty ( ) const
Here is the caller graph for this function:

◆ load()

void openswmmvis::ui::Mesh2DAquiferModel::load ( SWMM_Engine  engine)

Replace the staged rows with the engine's.

◆ removeRows()

bool openswmmvis::ui::Mesh2DAquiferModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
override

◆ rowCount()

int openswmmvis::ui::Mesh2DAquiferModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

◆ setData()

bool openswmmvis::ui::Mesh2DAquiferModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override
Here is the call graph for this function:

◆ setUnitLabels()

void openswmmvis::ui::Mesh2DAquiferModel::setUnitLabels ( const QString &  lengthLabel,
const QString &  rateLabel 
)

Column labels want the project's length/rate words.

◆ soilTokens()

QStringList openswmmvis::ui::Mesh2DAquiferModel::soilTokens ( )
static

Soil-law tokens in the engine's enum order, so the row index IS the SWMM_GW2D_SOIL_* code. Do not reorder.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: