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

#include <tabulardatatablemodel.h>

Inheritance diagram for TabularDataTableModel:
Collaboration diagram for TabularDataTableModel:

Public Slots

void reload ()
 

Public Member Functions

 TabularDataTableModel (QObject *parent=nullptr)
 
void setLayer (TabularDataLayer *layer)
 
TabularDataLayerlayer () const noexcept
 
QStringList columnHeaders () 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
 

Constructor & Destructor Documentation

◆ TabularDataTableModel()

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

Member Function Documentation

◆ columnCount()

int TabularDataTableModel::columnCount ( const QModelIndex &  parent = {}) const
override

◆ columnHeaders()

QStringList TabularDataTableModel::columnHeaders ( ) const
inline

Convenience — returns the column header at col, or empty string when out of range. Lets the proxy's query evaluator build a key→value map per row.

◆ data()

QVariant TabularDataTableModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

◆ headerData()

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

◆ layer()

TabularDataLayer * TabularDataTableModel::layer ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ reload

void TabularDataTableModel::reload ( )
slot

Refresh from the bound layer. Hooked to dataLoaded() so reloads pick up automatically.

Here is the caller graph for this function:

◆ rowCount()

int TabularDataTableModel::rowCount ( const QModelIndex &  parent = {}) const
override

◆ setLayer()

void TabularDataTableModel::setLayer ( TabularDataLayer layer)

Bind to a tabular layer. Pass nullptr to clear. The model emits modelReset so any attached view rebuilds its layout.

Here is the call graph for this function:
Here is the caller graph for this function:

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