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::ILayerStyleSubject Class Referenceabstract

One styleable thing the dialog can edit. More...

#include <ilayerstylesubject.h>

Inheritance diagram for openswmmvis::ui::ILayerStyleSubject:
Collaboration diagram for openswmmvis::ui::ILayerStyleSubject:

Public Member Functions

virtual ~ILayerStyleSubject ()=default
 
virtual QString title () const =0
 
virtual QString section () const
 
virtual QObject * propertyObject () const =0
 
virtual QString routingId () const
 
virtual QJsonObject snapshot () const
 
virtual void restore (const QJsonObject &snapshot)
 

Detailed Description

One styleable thing the dialog can edit.

   Subjects are owned by the dialog (unique_ptr) and outlive a
   single dialog session. The propertyObject() must outlive the
   subject; typically it's owned by the parent layer/sublayer.

Constructor & Destructor Documentation

◆ ~ILayerStyleSubject()

virtual openswmmvis::ui::ILayerStyleSubject::~ILayerStyleSubject ( )
virtualdefault

Member Function Documentation

◆ propertyObject()

virtual QObject * openswmmvis::ui::ILayerStyleSubject::propertyObject ( ) const
pure virtual

The QObject whose Q_PROPERTYs drive the editor.

Implemented in openswmmvis::ui::LayerStyleSubject, and openswmmvis::ui::RuleStyleSubject.

Here is the caller graph for this function:

◆ restore()

void openswmmvis::ui::ILayerStyleSubject::restore ( const QJsonObject &  snapshot)
virtual

Restore from a snapshot captured by snapshot.

Here is the call graph for this function:

◆ routingId()

virtual QString openswmmvis::ui::ILayerStyleSubject::routingId ( ) const
inlinevirtual

Stable id for routing (right-click → "focus this tab"). For sublayer subjects this should match the sublayer id; for layer- level subjects, use a fixed slug like "general" / "rendering".

Reimplemented in openswmmvis::ui::LayerStyleSubject, and openswmmvis::ui::RuleStyleSubject.

◆ section()

virtual QString openswmmvis::ui::ILayerStyleSubject::section ( ) const
inlinevirtual

Optional sub-section. When non-empty, subjects sharing a section get grouped into a single outer tab with sub-tabs inside.

Reimplemented in openswmmvis::ui::LayerStyleSubject, and openswmmvis::ui::RuleStyleSubject.

◆ snapshot()

QJsonObject openswmmvis::ui::ILayerStyleSubject::snapshot ( ) const
virtual

Capture all writable Q_PROPERTYs into a JSON object. The default implementation reads every Q_PROPERTY via QObject's metaobject; subjects whose propertyObject already has toJson()/fromJson() (i.e. SublayerStyle subclasses) can override to defer to that.

Here is the call graph for this function:

◆ title()

virtual QString openswmmvis::ui::ILayerStyleSubject::title ( ) const
pure virtual

Tab title displayed in the dialog.

Implemented in openswmmvis::ui::LayerStyleSubject, and openswmmvis::ui::RuleStyleSubject.


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