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
ProcessComponentsModel Class Reference

#include <processcomponentsmodel.h>

Inheritance diagram for ProcessComponentsModel:
Collaboration diagram for ProcessComponentsModel:

Classes

struct  KnownId
 

Public Types

enum  Column {
  ColId = 0 ,
  ColConfig = 1 ,
  ColStatus = 2 ,
  ColCount
}
 

Public Member Functions

 ProcessComponentsModel (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, const QString &modelDir)
 
int commit (SWMM_Engine engine)
 Apply staged edits to the engine. Returns the number of engine writes.
 
bool isDirty () const
 True when the rows differ from what load() read.
 
int appendRow (const QString &id, const QString &config)
 
QString idAt (int row) const
 
QString configAt (int row) const
 

Static Public Member Functions

static QList< KnownIdknownIds ()
 The engine's built-in catalogue (static for the process).
 

Member Enumeration Documentation

◆ Column

Enumerator
ColId 
ColConfig 
ColStatus 
ColCount 

Constructor & Destructor Documentation

◆ ProcessComponentsModel()

ProcessComponentsModel::ProcessComponentsModel ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ appendRow()

int ProcessComponentsModel::appendRow ( const QString &  id,
const QString &  config 
)

◆ columnCount()

int ProcessComponentsModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

◆ commit()

int ProcessComponentsModel::commit ( SWMM_Engine  engine)

Apply staged edits to the engine. Returns the number of engine writes.

Here is the call graph for this function:

◆ configAt()

QString ProcessComponentsModel::configAt ( int  row) const

◆ data()

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

◆ flags()

Qt::ItemFlags ProcessComponentsModel::flags ( const QModelIndex &  index) const
override

◆ headerData()

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

◆ idAt()

QString ProcessComponentsModel::idAt ( int  row) const

◆ isDirty()

bool ProcessComponentsModel::isDirty ( ) const

True when the rows differ from what load() read.

Here is the caller graph for this function:

◆ knownIds()

QList< ProcessComponentsModel::KnownId > ProcessComponentsModel::knownIds ( )
static

The engine's built-in catalogue (static for the process).

Here is the caller graph for this function:

◆ load()

void ProcessComponentsModel::load ( SWMM_Engine  engine,
const QString &  modelDir 
)

Replace the rows with the engine's registrations. modelDir resolves relative config paths for the Status column.

Here is the caller graph for this function:

◆ removeRows()

bool ProcessComponentsModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
override

◆ rowCount()

int ProcessComponentsModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

◆ setData()

bool ProcessComponentsModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

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