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
GISVectorAttributeTableModel Class Reference
Inheritance diagram for GISVectorAttributeTableModel:
Collaboration diagram for GISVectorAttributeTableModel:

Public Member Functions

 GISVectorAttributeTableModel (QObject *parent=nullptr)
 
void setLayer (GISVectorLayer *layer)
 
GISVectorLayerlayer () const
 
void reload ()
 
QStringList columnHeaders () const
 
long long fidForRow (int row) const
 
int rowForFid (long long fid) const
 
int rowCount (const QModelIndex &parent={}) const override
 
int columnCount (const QModelIndex &parent={}) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
FeatureLayereditableFeatureLayer () const
 
void setCanvas (MapCanvas *canvas)
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 

Constructor & Destructor Documentation

◆ GISVectorAttributeTableModel()

GISVectorAttributeTableModel::GISVectorAttributeTableModel ( QObject *  parent = nullptr)
inlineexplicit

Member Function Documentation

◆ columnCount()

int GISVectorAttributeTableModel::columnCount ( const QModelIndex &  parent = {}) const
inlineoverride

◆ columnHeaders()

QStringList GISVectorAttributeTableModel::columnHeaders ( ) const
inline

◆ data()

QVariant GISVectorAttributeTableModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
inlineoverride

◆ editableFeatureLayer()

FeatureLayer * GISVectorAttributeTableModel::editableFeatureLayer ( ) const
inline

The bound layer as a FeatureLayer with an OPEN edit session, or nullptr — the single predicate the flags/setData pair agree on.

◆ fidForRow()

long long GISVectorAttributeTableModel::fidForRow ( int  row) const
inline

Row↔fid mapping for the selection bridge (MeshAttributeTableModel's refForRow/rowForRef idiom). -1 on either miss.

Here is the caller graph for this function:

◆ flags()

Qt::ItemFlags GISVectorAttributeTableModel::flags ( const QModelIndex &  index) const
inlineoverride

◆ headerData()

QVariant GISVectorAttributeTableModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
inlineoverride

◆ layer()

GISVectorLayer * GISVectorAttributeTableModel::layer ( ) const
inline
Here is the caller graph for this function:

◆ reload()

void GISVectorAttributeTableModel::reload ( )
inline

Re-read the field schema and every feature from the bound OGR layer.

◆ rowCount()

int GISVectorAttributeTableModel::rowCount ( const QModelIndex &  parent = {}) const
inlineoverride

◆ rowForFid()

int GISVectorAttributeTableModel::rowForFid ( long long  fid) const
inline

◆ setCanvas()

void GISVectorAttributeTableModel::setCanvas ( MapCanvas canvas)
inline

The undo stack edits are pushed onto. Without it the model stays read-only rather than writing behind the undo history's back.

Here is the caller graph for this function:

◆ setData()

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

◆ setLayer()

void GISVectorAttributeTableModel::setLayer ( GISVectorLayer layer)
inline

Bind to a feature layer (nullptr clears). Reads columns + rows now.


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