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
EventExampleExtension Class Referencefinal

Small dock plugin demonstrating both supported typed subscription styles. More...

Inheritance diagram for EventExampleExtension:
Collaboration diagram for EventExampleExtension:

Public Member Functions

ExtensionInfo info () const override
 Describe the independently configured plugin identity.
 
bool initialize (ExtensionHost *host, QString *error) override
 Subscribe to scoped settings changes and contribute a small dock.
 
void shutdown () override
 Disconnect managed observations and delete the plugin-owned adapter.
 
QStringList contributions () const override
 Advertise the UI contributions demonstrated by this plugin.
 
QString id () const override
 Supply the extension-local dock identity.
 
QString title () const override
 Supply the dock caption.
 
QWidget * create (ExtensionHost *host) override
 Create the counter display and explicit settings command.
 
- Public Member Functions inherited from OpenSWMM::Sdk::IGuiExtension
virtual ~IGuiExtension ()=default
 Destroy the interface; the Qt loader owns the implementing QObject.
 
virtual QList< ExtensionInfo > children () const
 Enumerate extensions hosted by this plugin, such as Python-authored packages.
 
- Public Member Functions inherited from OpenSWMM::Sdk::IDockPanelFactory
virtual ~IDockPanelFactory ()=default
 Destroy an unregistered factory; registered factories remain borrowed by the host.
 
virtual Qt::DockWidgetArea defaultArea () const
 Choose initial placement before saved layout restore.
 
virtual QString tabifyWith () const
 Request tabification beside an existing dock.
 

Detailed Description

Small dock plugin demonstrating both supported typed subscription styles.

The plugin QObject exposes typedEvents, adapterEvents, lastSequence, lastKey and eventAdapter dynamic properties for a consumer conformance test. The dock's status label mirrors the counters so a test can inspect them through ordinary Qt widgets without accessing a private host object. Adapter callbacks use direct GUI-thread connections and must not throw.

Member Function Documentation

◆ contributions()

QStringList EventExampleExtension::contributions ( ) const
inlineoverridevirtual

Advertise the UI contributions demonstrated by this plugin.

Returns
Names of the registered command and dock contribution families.

Reimplemented from OpenSWMM::Sdk::IGuiExtension.

◆ create()

QWidget * EventExampleExtension::create ( ExtensionHost *  host)
inlineoverridevirtual

Create the counter display and explicit settings command.

Parameters
[in]hostBorrowed SDK host supplied by dock registration.
Returns
New widget transferred to host ownership.
Note
Widget callbacks issue public service commands; they do not write private GUI state.

Implements OpenSWMM::Sdk::IDockPanelFactory.

Here is the call graph for this function:

◆ id()

QString EventExampleExtension::id ( ) const
inlineoverridevirtual

Supply the extension-local dock identity.

Returns
Identity qualified by the host with this plugin's configured ID.

Implements OpenSWMM::Sdk::IDockPanelFactory.

◆ info()

ExtensionInfo EventExampleExtension::info ( ) const
inlineoverridevirtual

Describe the independently configured plugin identity.

Returns
Owning metadata matching this build's embedded plugin.json.

Implements OpenSWMM::Sdk::IGuiExtension.

Here is the caller graph for this function:

◆ initialize()

bool EventExampleExtension::initialize ( ExtensionHost *  host,
QString *  error 
)
inlineoverridevirtual

Subscribe to scoped settings changes and contribute a small dock.

Parameters
[in]hostBorrowed per-plugin SDK host, kept alive through shutdown().
[out]errorOptional missing-capability or contribution failure detail.
Returns
True after both subscriptions receive the initial demonstration event.
Note
Registration, callbacks and widget operations all use the GUI thread.

Implements OpenSWMM::Sdk::IGuiExtension.

Here is the call graph for this function:

◆ shutdown()

void EventExampleExtension::shutdown ( )
inlineoverridevirtual

Disconnect managed observations and delete the plugin-owned adapter.

Note
Idempotent; host-owned widgets/actions are removed by host cleanup.

Implements OpenSWMM::Sdk::IGuiExtension.

Here is the caller graph for this function:

◆ title()

QString EventExampleExtension::title ( ) const
inlineoverridevirtual

Supply the dock caption.

Returns
Translated title for the example panel.

Implements OpenSWMM::Sdk::IDockPanelFactory.


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