![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
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>Go to the source code of this file.
Classes | |
| class | ProfileSourceStyleAdapter |
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.
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));