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

Common base for non-spatial Data Object property adapters. More...

#include <swmmdataobjectpropertyadapter.h>

Inheritance diagram for SWMMDataObjectPropertyAdapter:
Collaboration diagram for SWMMDataObjectPropertyAdapter:

Public Slots

void setName (const QString &newName)
 
void updateStoredName (const QString &newName)
 
void refresh ()
 

Signals

void changed ()
 
void renameRequested (const QString &oldName, const QString &newName)
 
void displayLabelsChanged ()
 

Public Member Functions

 SWMMDataObjectPropertyAdapter (SWMM_Engine engine, QString name, QObject *parent=nullptr)
 
 ~SWMMDataObjectPropertyAdapter () override=default
 
QString name () const
 
SWMM_Engine engine () const
 
void setModelLayer (SWMMModelLayer *layer)
 
SWMMModelLayermodelLayer () const
 

Protected Attributes

SWMM_Engine m_engine
 
QString m_name
 
SWMMModelLayerm_layer = nullptr
 Bound via setModelLayer.
 

Properties

QString name
 

Detailed Description

Common base for non-spatial Data Object property adapters.

Stores the engine handle + stored name + emits the renameRequested / changed / displayLabelsChanged signals. Concrete subclasses add the type-specific Q_PROPERTYs, override index() to resolve their engine index, and call emit changed() on successful field writes.

Constructor & Destructor Documentation

◆ SWMMDataObjectPropertyAdapter()

SWMMDataObjectPropertyAdapter::SWMMDataObjectPropertyAdapter ( SWMM_Engine  engine,
QString  name,
QObject *  parent = nullptr 
)
Here is the call graph for this function:

◆ ~SWMMDataObjectPropertyAdapter()

SWMMDataObjectPropertyAdapter::~SWMMDataObjectPropertyAdapter ( )
overridedefault

Member Function Documentation

◆ changed

void SWMMDataObjectPropertyAdapter::changed ( )
signal

Emitted when any field's underlying engine value changes.

Here is the caller graph for this function:

◆ displayLabelsChanged

void SWMMDataObjectPropertyAdapter::displayLabelsChanged ( )
signal

Emitted when the active unit system changes — the bound Property Browser re-reads display labels (e.g. "Area (ft²)" vs "Area (m²)").

Here is the caller graph for this function:

◆ engine()

SWMM_Engine SWMMDataObjectPropertyAdapter::engine ( ) const
inline

◆ modelLayer()

SWMMModelLayer * SWMMDataObjectPropertyAdapter::modelLayer ( ) const
inline
Here is the caller graph for this function:

◆ name()

QString SWMMDataObjectPropertyAdapter::name ( ) const
inline

◆ refresh

void SWMMDataObjectPropertyAdapter::refresh ( )
inlineslot

Causes the bound Property Browser model to re-read every Q_PROPERTY. Used when the underlying engine state changes via a side channel (e.g. another panel's edit).

Here is the call graph for this function:

◆ renameRequested

void SWMMDataObjectPropertyAdapter::renameRequested ( const QString &  oldName,
const QString &  newName 
)
signal

Emitted when the user types a new name in the panel. The receiver (SWMMModelLayer) decides whether to accept and then calls updateStoredName() back.

Here is the caller graph for this function:

◆ setModelLayer()

void SWMMDataObjectPropertyAdapter::setModelLayer ( SWMMModelLayer layer)
inline

Slice BM.0-Browse-Edit — bind the active project's model layer so subclasses that surface DataObjectRef properties can construct refs with the right layer pointer (used by DataObjectPickerEditor to enumerate combo items + dispatch the "…" browse button). Optional — adapters that don't surface refs ignore it.

Here is the caller graph for this function:

◆ setName

void SWMMDataObjectPropertyAdapter::setName ( const QString &  newName)
slot

Emits renameRequested(oldName, newName); the layer-side handler decides whether the rename can be applied (uniqueness check) and calls back via updateStoredName(). Mirrors the spatial adapter pattern.

Here is the call graph for this function:

◆ updateStoredName

void SWMMDataObjectPropertyAdapter::updateStoredName ( const QString &  newName)
inlineslot

After a successful layer-side rename, the layer notifies the adapter via this slot so subsequent engine calls hit the new index.

Member Data Documentation

◆ m_engine

SWMM_Engine SWMMDataObjectPropertyAdapter::m_engine
protected

◆ m_layer

SWMMModelLayer* SWMMDataObjectPropertyAdapter::m_layer = nullptr
protected

Bound via setModelLayer.

◆ m_name

QString SWMMDataObjectPropertyAdapter::m_name
protected

Property Documentation

◆ name

QString SWMMDataObjectPropertyAdapter::name
readwrite

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