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

#include <attributedelegates.h>

Inheritance diagram for openswmmvis::CompoundEditDelegate:
Collaboration diagram for openswmmvis::CompoundEditDelegate:

Public Member Functions

 CompoundEditDelegate (QObject *parent=nullptr)
 
QString displayText (const QVariant &value, const QLocale &locale) const override
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &opt, const QModelIndex &index) const override
 
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 

Detailed Description

Compound-attribute editor — renders a NodeCompoundEditButton in the cell. Used by the Attribute Table for per-node multi-row attributes (Inflows / DWF / RDII / Treatment); reuses the same dialog the Property Browser opens. The model returns a NodeCompoundEditRef QVariant for these cells; displayText() shows the ref's summary so the cell stays informative when not in edit mode.

The metatype + QString converter need to be registered once at startup via registerNodeCompoundEditRefConverter() — the Attribute Table Panel does this in its constructor.

Constructor & Destructor Documentation

◆ CompoundEditDelegate()

openswmmvis::CompoundEditDelegate::CompoundEditDelegate ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ createEditor()

QWidget * openswmmvis::CompoundEditDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  opt,
const QModelIndex &  index 
) const
override

◆ displayText()

QString openswmmvis::CompoundEditDelegate::displayText ( const QVariant &  value,
const QLocale &  locale 
) const
override

◆ setEditorData()

void openswmmvis::CompoundEditDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
override

◆ setModelData()

void openswmmvis::CompoundEditDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
override

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