![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Maps a property-object class name to an editor-widget factory. More...
#include <istyleeditorwidget.h>
Public Types | |
| using | Factory = std::function< IStyleEditorWidget *(QObject *propertyObject, QWidget *parent)> |
Public Member Functions | |
| void | registerFactory (const QString &className, Factory factory) |
| IStyleEditorWidget * | createEditorFor (QObject *propertyObject, QWidget *parent=nullptr) const |
Static Public Member Functions | |
| static StyleEditorRegistry & | instance () |
Maps a property-object class name to an editor-widget factory.
The registry is a singleton populated at static-init time by editor source files. Lookup is by QObject::metaObject->className. Editors can choose to match the most-derived class first; if no match, the LayerStyleDialog falls back to the QPropertyModel generic tree.
| using openswmmvis::ui::StyleEditorRegistry::Factory = std::function<IStyleEditorWidget *(QObject *propertyObject, QWidget *parent)> |
| IStyleEditorWidget * openswmmvis::ui::StyleEditorRegistry::createEditorFor | ( | QObject * | propertyObject, |
| QWidget * | parent = nullptr |
||
| ) | const |
Walk the className then its super-classes looking for a match. Returns a newly-constructed editor (caller owns) or nullptr when no factory matches.
|
static |
| void openswmmvis::ui::StyleEditorRegistry::registerFactory | ( | const QString & | className, |
| StyleEditorRegistry::Factory | factory | ||
| ) |
Register an editor factory for the given className (e.g. "OpenSWMM::Render::PointFeatureSublayerStyle").