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::LegendLayerTreeModel Class Reference

#include <legendlayertreemodel.h>

Inheritance diagram for openswmmvis::ui::LegendLayerTreeModel:
Collaboration diagram for openswmmvis::ui::LegendLayerTreeModel:

Public Types

enum  Column {
  ColItem = 0 ,
  ColColor = 1 ,
  ColSize = 2 ,
  ColCount
}
 
enum  CustomRole {
  ClassKeyRole = Qt::UserRole + 1 ,
  LayerPtrRole ,
  EditableRole ,
  SublayerIdRole
}
 Roles used by LegendColorDelegate for direct access to the classKey and the layer pointer without going through internalPointer(). More...
 

Public Member Functions

 LegendLayerTreeModel (MapCanvas *canvas, QObject *parent=nullptr)
 
 ~LegendLayerTreeModel () override
 
void setOverlayStyle (OpenSWMM::Render::LegendOverlayStyle *style)
 Optional per-item override store. When set, the model reads visible / userLabel from the style and routes setData (CheckStateRole / EditRole) back through it.
 
int columnCount (const QModelIndex &parent={}) const override
 
int rowCount (const QModelIndex &parent={}) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent={}) const override
 
QModelIndex parent (const QModelIndex &child) const override
 
QVariant data (const QModelIndex &idx, int role=Qt::DisplayRole) const override
 
bool setData (const QModelIndex &idx, const QVariant &value, int role=Qt::EditRole) override
 
Qt::ItemFlags flags (const QModelIndex &idx) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 

Member Enumeration Documentation

◆ Column

Enumerator
ColItem 
ColColor 
ColSize 

Slice BB Phase 8.6.16 — per-class marker / line size.

ColCount 

◆ CustomRole

Roles used by LegendColorDelegate for direct access to the classKey and the layer pointer without going through internalPointer().

Enumerator
ClassKeyRole 
LayerPtrRole 

OpenSWMMVisLayer*

EditableRole 

bool — true iff renderer supports class-edit Color.

SublayerIdRole 

Slice S4 P5 — QString; non-empty iff this row was contributed by a sublayer (LegendSymbolItem::sublayerId). Used by the LegendDock right- click handler to route to the originating sublayer's style dialog.

Constructor & Destructor Documentation

◆ LegendLayerTreeModel()

openswmmvis::ui::LegendLayerTreeModel::LegendLayerTreeModel ( MapCanvas canvas,
QObject *  parent = nullptr 
)
explicit
Here is the call graph for this function:

◆ ~LegendLayerTreeModel()

openswmmvis::ui::LegendLayerTreeModel::~LegendLayerTreeModel ( )
override

Member Function Documentation

◆ columnCount()

int openswmmvis::ui::LegendLayerTreeModel::columnCount ( const QModelIndex &  parent = {}) const
override

◆ data()

QVariant openswmmvis::ui::LegendLayerTreeModel::data ( const QModelIndex &  idx,
int  role = Qt::DisplayRole 
) const
override

◆ flags()

Qt::ItemFlags openswmmvis::ui::LegendLayerTreeModel::flags ( const QModelIndex &  idx) const
override

◆ headerData()

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

◆ index()

QModelIndex openswmmvis::ui::LegendLayerTreeModel::index ( int  row,
int  column,
const QModelIndex &  parent = {} 
) const
override

◆ parent()

QModelIndex openswmmvis::ui::LegendLayerTreeModel::parent ( const QModelIndex &  child) const
override

◆ rowCount()

int openswmmvis::ui::LegendLayerTreeModel::rowCount ( const QModelIndex &  parent = {}) const
override

◆ setData()

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

◆ setOverlayStyle()

void openswmmvis::ui::LegendLayerTreeModel::setOverlayStyle ( OpenSWMM::Render::LegendOverlayStyle style)

Optional per-item override store. When set, the model reads visible / userLabel from the style and routes setData (CheckStateRole / EditRole) back through it.

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: