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
profilesourcestyleadapter.h File Reference

Tiny QObject adapter exposing the profile-style Q_PROPERTYs of a SWMMResultsLayer in isolation, so a QPropertyModel-backed editor can edit them without surfacing the layer's unrelated properties. More...

#include <QBrush>
#include <QColor>
#include <QObject>
#include <QPen>
#include <QPointer>
Include dependency graph for profilesourcestyleadapter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ProfileSourceStyleAdapter
 

Detailed Description

Tiny QObject adapter exposing the profile-style Q_PROPERTYs of a SWMMResultsLayer in isolation, so a QPropertyModel-backed editor can edit them without surfacing the layer's unrelated properties.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

All getters / setters proxy through to the bound layer via QPointer. When the layer is null the getters return defaults and setters are no-ops — the model still renders, just inert. Each setter triggers the bound layer's existing per-property setter, which fires profileStyleChanged() / profileLineColorChanged() signals; the adapter forwards those as Q_PROPERTY NotifySignals so QPropertyModel refreshes immediately.

Usage: auto *adapter = new ProfileSourceStyleAdapter(parent); adapter->setLayer(layer); propertyModel->setData(QVariant::fromValue<QObject *>(adapter));