![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <guiextensionhost.h>
Classes | |
| struct | Job |
| Host-owned job state shared between its worker and queued GUI continuations. More... | |
Signals | |
| void | aboutToShutdown () |
| Release model contributions before the loader calls plugin shutdown. | |
| void | eventOccurred (const QString &event, const QVariantMap &data) |
| Notify observers on the GUI thread. | |
| void | typedEventOccurred (const OpenSWMM::Sdk::Event &event) |
| Publish one canonical typed notification before its legacy projection. | |
Public Member Functions | |
| GuiExtensionHost (QString id, OpenSWMM::Sdk::CompatibilityManifest manifest, QMainWindow *window, QMdiArea *mdi, ExtensionUiBridge bridge, QSettings *settings, QObject *parent=nullptr, ExtensionStateRegistry *stateRegistry=nullptr) | |
| Construct one extension's namespaced implementation of host services. | |
| ~GuiExtensionHost () override | |
| Join workers, remove preferences/views/docks/tabs/actions, and release output widgets. | |
| OpenSWMM::Sdk::CompatibilityManifest | manifest () const override |
| Inspect the running host build identity. | |
| QString | pluginId () const override |
| Identify the extension owning this facade. | |
| QObject * | lifetime () const override |
| Obtain a safe QObject context for actions and signal connections. | |
| QList< OpenSWMM::Sdk::IProject * > | projects () const override |
| Enumerate open projects. | |
| OpenSWMM::Sdk::IProject * | activeProject () const override |
| Resolve the active model project. | |
| QList< OpenSWMM::Sdk::IModelInstance * > | instances () const override |
| Enumerate loaded models across projects. | |
| OpenSWMM::Sdk::IModelInstance * | activeInstance () const override |
| Resolve the active loaded model. | |
| OpenSWMM::Sdk::IUiHost * | ui () override |
| Access namespaced widget/action registration. | |
| OpenSWMM::Sdk::ISettings * | settings () override |
| Access this extension user settings. | |
| OpenSWMM::Sdk::IConsole * | console () override |
| Access this extension output channel. | |
| QUuid | beginProgress (const QString &title, QObject *context) override |
| Begin an operation and immediately publish indeterminate shared progress. | |
| bool | updateProgress (const QUuid &operationId, double fraction, const QString &stage) override |
| Update progress and its current human-readable stage. | |
| bool | finishProgress (const QUuid &operationId, OpenSWMM::Sdk::ProgressOutcome outcome, const QString &detail={}) override |
| Remove an operation from shared progress and record its terminal outcome once. | |
| OpenSWMM::Sdk::INetworkPolicy * | network () override |
| Access the host offline/HTTPS destination policy and shared client. | |
| OpenSWMM::Sdk::IRunRegistry * | runRegistry () override |
| Access Simulation Status enumeration/start/cancel operations. | |
| OpenSWMM::Sdk::IPlotService * | plots () override |
| Access the application's existing plot panels. | |
| OpenSWMM::Sdk::IDialogs * | dialogs () override |
| Access registered built-in dialog commands. | |
| QList< QVariantMap > | runs () const override |
| Copy current Simulation Status rows. | |
| int | start (OpenSWMM::Sdk::IModelInstance *instance, QString *error=nullptr) override |
| Save and run an existing model using its configured engine/options. | |
| void | cancel (int id) override |
| Request cancellation of one active run. | |
| QList< QVariantMap > | variables (OpenSWMM::Sdk::IModelInstance *instance, const QString &category) const override |
| Enumerate plottable variables from the model's active 1D results. | |
| bool | timeSeries (OpenSWMM::Sdk::IModelInstance *instance, const QString &category, const QString &name, const QString &variableKey) override |
| Add a result series to the shared time-series plot panel. | |
| bool | profile (OpenSWMM::Sdk::IModelInstance *instance, const QStringList &nodes) override |
| Open the standard profile panel along connected named nodes. | |
| QStringList | ids () const override |
| Enumerate currently registered built-in commands that open dialogs. | |
| bool | open (const QString &id) override |
| Trigger a built-in dialog in the current application context. | |
| bool | isDark () const override |
| Inspect resolved palette contrast. | |
| QColor | themeColor (QPalette::ColorRole role) const override |
| Read an active host palette token. | |
| QMetaObject::Connection | observe (QObject *context, std::function< void(const QString &, const QVariantMap &)> callback) override |
| Connect a synchronous GUI-thread listener to this extension's scoped event stream. | |
| QMetaObject::Connection | subscribe (QObject *context, const OpenSWMM::Sdk::EventFilter &filter, std::function< void(const OpenSWMM::Sdk::Event &)> callback) override |
| Subscribe to typed SDK 1.2 notifications using a frozen optional interface. | |
| OpenSWMM::Sdk::StateSnapshot | stateSnapshot () const override |
| Copy live session metadata and its atomic registry watermark. | |
| OpenSWMM::Sdk::IJob * | importTimeSeries (const OpenSWMM::Sdk::TimeSeriesImportRequest &request, QObject *context, std::function< void(const OpenSWMM::Sdk::TimeSeriesImportResult &)> finished, QString *error=nullptr) override |
| Start a guarded native observation import through the installed application bridge. | |
| QList< OpenSWMM::Sdk::TimeSeriesLayerInfo > | timeSeriesLayers (const QUuid &sessionId) const override |
| Query bounded native observation-layer metadata for one Ready session. | |
| void | setTimeSeriesControls (std::function< OpenSWMM::Sdk::IJob *(const OpenSWMM::Sdk::TimeSeriesImportRequest &, QObject *, std::function< void(const OpenSWMM::Sdk::TimeSeriesImportResult &)>, QString *)> importer, std::function< QList< OpenSWMM::Sdk::TimeSeriesLayerInfo >(const QUuid &)> layers) |
| Install private native dataset routes before extension initialization. | |
| QUuid | previewLayer (const QUuid &sessionId, QList< qint64 > *featureIds=nullptr) const override |
| Identify this extension's native preview layer in one Ready session. | |
| void | setPreviewLayers (std::function< QUuid(const QUuid &, QList< qint64 > *)> lookup) |
| Install the private native preview-layer lookup before extension initialization. | |
| void | setJobCancellationHook (OpenSWMM::Sdk::IJob *job, std::function< void()> hook) |
| Install a host-internal publication cancellation hook on a retained job. | |
| bool | isStopping () const |
| Report shutdown or wrong-thread access before private bridges read GUI state. | |
| OpenSWMM::Sdk::IModelInstance * | resolveSession (const QUuid &sessionId) const override |
| Resolve a ready session without creating a facade or emitting events. | |
| QMetaObject::Connection | observeState (QObject *context, const OpenSWMM::Sdk::StateEventFilter &filter, std::function< void(const OpenSWMM::Sdk::StateEvent &)> callback) override |
| Observe queued lifecycle/state changes after this registration's watermark. | |
| QMetaObject::Connection | observeBeforeSave (QObject *context, std::function< void(const OpenSWMM::Sdk::SaveRequest &)> callback) override |
| Collect plugin state synchronously before an accepted save writes it. | |
| OpenSWMM::Sdk::ViewSnapshot | viewSnapshot (const QUuid &sessionId) const override |
| Copy tracked native view metadata without creating trackers or facades. | |
| QMetaObject::Connection | observeViews (QObject *context, const OpenSWMM::Sdk::ViewEventFilter &filter, std::function< void(const OpenSWMM::Sdk::ViewEvent &)> callback) override |
| Observe future IViewEvents domain invalidations on the ordered shared dispatcher. | |
| bool | executeViewCommand (const OpenSWMM::Sdk::ViewCommand &command, QString *error=nullptr) override |
| Apply a validated view controller command. | |
| QList< qint64 > | selectedLayerFeatures (const QUuid &sessionId, const QUuid &layerSessionId, int offset=0, int limit=500) const override |
| Copy a bounded sorted page of selected vector FIDs. | |
| OpenSWMM::Sdk::ActivitySnapshot | activitySnapshot () const override |
| Copy retained process and scoped UI state without native mutation. | |
| QMetaObject::Connection | observeActivity (QObject *context, const OpenSWMM::Sdk::ActivityEventFilter &filter, std::function< void(const OpenSWMM::Sdk::ActivityEvent &)> callback) override |
| Subscribe to future scoped activity metadata on the shared ordered dispatcher. | |
| QUuid | startRunAttempt (const QUuid &sessionId, quint64 loadGeneration, QString *error=nullptr) override |
| Start an exact Ready model generation via the native run controller. | |
| QUuid | jobOperationId (OpenSWMM::Sdk::IJob *job) const override |
| Resolve an own retained IJob handle without dereferencing foreign pointers. | |
| bool | cancelOperation (const QUuid &operationId, QString *error=nullptr) override |
| Cancel an exact shared run or this host's own worker. | |
| bool | executeActivityUiCommand (const OpenSWMM::Sdk::UiActivityCommand &command, QString *error=nullptr) override |
| Validate current runtime UI identities and use scoped native routes. | |
| QUuid | activityOwnerId () const |
| Read the stable per-host lifetime used for private activity scope. | |
| QUuid | activityWindowId () const |
| Read the main-window lifetime established at host construction. | |
| OpenSWMM::Sdk::IJob * | runJob (const QString &title, std::function< void(OpenSWMM::Sdk::IJobContext &)> work, std::function< void(bool, const QString &)> finished={}) override |
| Start one worker, retaining its handle and progress UI until host cleanup. | |
| void | prepareShutdown () override |
| Cancel and join extension workers before plugin-owned resources are released. | |
| QVariant | value (const QString &key, const QVariant &fallback={}) const override |
| Read a key beneath extensions/<pluginId>/. | |
| void | setValue (const QString &key, const QVariant &value) override |
| Persist a nonempty relative key and announce settingsChanged. | |
| void | remove (const QString &key) override |
| Remove a relative key or subgroup within this extension's settings. | |
| QStringList | keys () const override |
| List this extension's stored settings without the host prefix. | |
| void | append (const QString &level, const QString &text) override |
| Append literal text to this extension's bounded Output and native timestamped Logs. | |
| void | clear () override |
| Clear only this extension's Output history; native Logs history is retained. | |
| void | appendLocation (const QString &level, const QString &text, const QString &path, int line) override |
| Append literal output associated with a source file location. | |
| void | setLocationHandler (QObject *context, std::function< void(const QString &, int)> handler) override |
| Register a guarded source-location callback for this output channel. | |
| bool | registerAction (const QString &id, QAction *action) override |
| Register an extension command in the host command palette and shortcut context. | |
| void | unregisterAction (const QString &id) override |
| Remove a command without deleting its QAction. | |
| bool | registerRibbonTab (const OpenSWMM::Sdk::RibbonTabSpec &tab) override |
| Register an independent, dynamically removable extension-owned ribbon tab. | |
| void | unregisterRibbonTab (const QString &id) override |
| Remove only this contribution and its host-owned toolbars. | |
| bool | registerDockPanelFactory (OpenSWMM::Sdk::IDockPanelFactory *factory) override |
| Instantiate and mount a dock with View-menu and layout persistence. | |
| void | unregisterDockPanelFactory (const QString &id) override |
| Destroy a registered dock and its widget. | |
| bool | registerDocumentViewFactory (OpenSWMM::Sdk::IDocumentViewFactory *factory) override |
| Register a borrowed document factory and materialize pending project views. | |
| void | unregisterDocumentViewFactory (const QString &kind) override |
| Close all views of this kind before releasing its factory. | |
| QWidget * | openDocumentView (const QString &kind, OpenSWMM::Sdk::IModelInstance *instance) override |
| Create and show one host-owned MDI document. | |
| bool | registerPreferencesPage (OpenSWMM::Sdk::IPreferencesPageFactory *factory) override |
| Add a preferences factory to the Extensions section of future Preferences dialogs. | |
| void | unregisterPreferencesPage (const QString &id) override |
| Remove a preferences factory and its live page before resource teardown. | |
| void | showDock (const QString &id) override |
| Reveal and raise a registered dock. | |
| void | statusMessage (const QString &text, int milliseconds=5000) override |
| Display transient status-bar text. | |
| void | message (const QString &title, const QString &text) override |
| Present an informational dialog on the GUI thread. | |
| void | postToMainThread (std::function< void()> callback) override |
| Queue a callback onto the GUI thread from any worker. | |
| QWidget * | mainWindow () const override |
| Obtain the main window for widget parenting. | |
| void | setModelAccess (std::function< QList< OpenSWMM::Sdk::IProject * >()> projects, std::function< OpenSWMM::Sdk::IModelInstance *()> active) |
| Install GUI-thread model enumeration adapters before initialize() runs. | |
| void | setSessionResolver (std::function< OpenSWMM::Sdk::IModelInstance *(const QUuid &)> resolver) |
| Install a lookup-only per-session facade resolver during host setup. | |
| ExtensionStateRegistry * | stateRegistry () const |
| Access the application registry used by this host's private model bridge. | |
| void | setViewControls (std::function< bool(const OpenSWMM::Sdk::ViewCommand &, QString *)> execute, std::function< QList< qint64 >(const QUuid &, const QUuid &, int, int)> selection) |
| Install private native view-controller routes during host setup. | |
| void | notify (const QString &event, const QVariantMap &data={}) |
| Deliver an owning metadata notification to extension observers. | |
| void | restoreViews (OpenSWMM::Sdk::IModelInstance *instance, const QJsonArray &views) |
| Restore this plugin's known views and retain unavailable kinds as pending. | |
| QJsonArray | saveViews (OpenSWMM::Sdk::IModelInstance *instance) const |
| Capture live and pending view state for one model. | |
Public Member Functions inherited from OpenSWMM::Sdk::ExtensionHost | |
| virtual | ~ExtensionHost ()=default |
| Join outstanding jobs and destroy host-owned contributions during teardown. | |
| virtual QMetaObject::Connection | observe (QObject *context, std::function< void(const QString &event, const QVariantMap &data)> callback)=0 |
| Subscribe to scoped host notifications. | |
| virtual IJob * | runJob (const QString &title, std::function< void(IJobContext &)> work, std::function< void(bool ok, const QString &error)> finished={})=0 |
| Run cancellable extension work on the extension's bounded thread pool. | |
Public Member Functions inherited from OpenSWMM::Sdk::IUiHost | |
| virtual | ~IUiHost ()=default |
| Destroy UI service implementation; extensions borrow this facade. | |
Public Member Functions inherited from OpenSWMM::Sdk::ISettings | |
| virtual | ~ISettings ()=default |
| Release an implementation; extensions borrow and never delete the host facade. | |
Public Member Functions inherited from OpenSWMM::Sdk::IConsole | |
| virtual | ~IConsole ()=default |
| Destroy a console implementation; the host owns the public facade. | |
Public Member Functions inherited from OpenSWMM::Sdk::IRunRegistry | |
| virtual | ~IRunRegistry ()=default |
| Destroy an implementation; extensions borrow this host-owned service. | |
Public Member Functions inherited from OpenSWMM::Sdk::IPlotService | |
| virtual | ~IPlotService ()=default |
| Destroy an implementation; extensions borrow this host-owned service. | |
Public Member Functions inherited from OpenSWMM::Sdk::IDialogs | |
| virtual | ~IDialogs ()=default |
| Destroy an implementation; extensions borrow this host-owned service. | |
Public Member Functions inherited from OpenSWMM::Sdk::IModelEvents | |
| virtual | ~IModelEvents ()=default |
| Destroy an implementation; plugins borrow the host-owned service. | |
| virtual QMetaObject::Connection | subscribe (QObject *context, const EventFilter &filter, std::function< void(const Event &)> callback)=0 |
| Subscribe to filtered typed observations on the GUI thread. | |
Public Member Functions inherited from OpenSWMM::Sdk::ISessionEvents | |
| virtual | ~ISessionEvents ()=default |
| Destroy an implementation; callers borrow the host-owned capability. | |
| virtual QMetaObject::Connection | observeState (QObject *context, const StateEventFilter &filter, std::function< void(const StateEvent &)> callback)=0 |
| Observe future queued state transitions with GUI-thread lifetime guards. | |
| virtual QMetaObject::Connection | observeBeforeSave (QObject *context, std::function< void(const SaveRequest &)> callback)=0 |
| Register a short synchronous pre-save state collector. | |
Public Member Functions inherited from OpenSWMM::Sdk::IViewEvents | |
| virtual | ~IViewEvents ()=default |
| Destroy an implementation; consumers borrow the host-owned capability. | |
| virtual QMetaObject::Connection | observeViews (QObject *context, const ViewEventFilter &filter, std::function< void(const ViewEvent &)> callback)=0 |
| Observe future queued invalidations on the GUI thread. | |
Public Member Functions inherited from OpenSWMM::Sdk::IViewControls | |
| virtual | ~IViewControls ()=default |
| Destroy an implementation; consumers borrow the host-owned service. | |
Public Member Functions inherited from OpenSWMM::Sdk::IActivityEvents | |
| virtual | ~IActivityEvents ()=default |
| Destroy an implementation; consumers borrow the host-owned capability. | |
| virtual QMetaObject::Connection | observeActivity (QObject *context, const ActivityEventFilter &filter, std::function< void(const ActivityEvent &)> callback)=0 |
| Observe future queued scoped transitions with managed lifetime/thread guards. | |
Public Member Functions inherited from OpenSWMM::Sdk::IActivityControls | |
| virtual | ~IActivityControls ()=default |
| Destroy an implementation; consumers borrow the host-owned capability. | |
Public Member Functions inherited from OpenSWMM::Sdk::ITimeSeriesLayers | |
| virtual | ~ITimeSeriesLayers ()=default |
| Destroy an implementation; plugins only borrow this capability. | |
| virtual IJob * | importTimeSeries (const TimeSeriesImportRequest &request, QObject *context, std::function< void(const TimeSeriesImportResult &)> finished, QString *error=nullptr)=0 |
| Prepare and attach a native dataset through a cancellable host job. | |
Public Member Functions inherited from OpenSWMM::Sdk::IProgress | |
| virtual | ~IProgress ()=default |
| Destroy an implementation; plugins only borrow the host capability. | |
Public Member Functions inherited from OpenSWMM::Sdk::IPreviewLayers | |
| virtual | ~IPreviewLayers ()=default |
| Destroy an implementation; plugins only borrow the host capability. | |
Protected Member Functions | |
| bool | eventFilter (QObject *object, QEvent *event) override |
| Publish theme changes and activate output source locations. | |
Per-extension facade: ownership and IDs cannot cross another extension's namespace.
| openswmmvis::GuiExtensionHost::GuiExtensionHost | ( | QString | id, |
| OpenSWMM::Sdk::CompatibilityManifest | manifest, | ||
| QMainWindow * | window, | ||
| QMdiArea * | mdi, | ||
| ExtensionUiBridge | bridge, | ||
| QSettings * | settings, | ||
| QObject * | parent = nullptr, |
||
| ExtensionStateRegistry * | stateRegistry = nullptr |
||
| ) |
Construct one extension's namespaced implementation of host services.
| [in] | id | Validated extension identity. |
| [in] | manifest | Host build compatibility identity. |
| [in] | window | Borrowed main window, kept alive through host shutdown. |
| [in] | mdi | Borrowed MDI area for extension document widgets. |
| [in] | bridge | Application action/ribbon callbacks; values captured by ownership. |
| [in] | settings | Required borrowed host settings, outliving this host. |
| [in] | parent | Optional QObject owner; the manager normally owns the host by unique_ptr. |
| [in] | stateRegistry | Borrowed authoritative registry, or null for the application registry. |
|
override |
Join workers, remove preferences/views/docks/tabs/actions, and release output widgets.
|
signal |
Release model contributions before the loader calls plugin shutdown.
|
overridevirtual |
Resolve the active loaded model.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Resolve the active model project.
Implements OpenSWMM::Sdk::ExtensionHost.
|
inline |
Read the stable per-host lifetime used for private activity scope.
|
overridevirtual |
Copy retained process and scoped UI state without native mutation.
Implements OpenSWMM::Sdk::IActivityEvents.
|
inline |
Read the main-window lifetime established at host construction.
|
overridevirtual |
Append literal text to this extension's bounded Output and native timestamped Logs.
| [in] | level | Case-insensitive severity: warning/warn, error, or information for all other values, including info. |
| [in] | text | Plain text; never interpreted as HTML or executable content. |
Implements OpenSWMM::Sdk::IConsole.
|
overridevirtual |
Append literal output associated with a source file location.
| [in] | level | Display severity, as for append(). |
| [in] | text | Literal output; every appended line receives the location. |
| [in] | path | Source path passed verbatim to the location handler, without opening a file. |
| [in] | line | One-based source line; nonpositive lines or empty paths produce ordinary text. |
Implements OpenSWMM::Sdk::IConsole.
|
overridevirtual |
Begin an operation and immediately publish indeterminate shared progress.
| [in] | title | Nonempty user-facing title; the host adds the plugin identity. |
| [in] | context | Required GUI-thread lifetime guard, kept on the GUI thread. |
Implements OpenSWMM::Sdk::IProgress.
|
overridevirtual |
Request cancellation of one active run.
| [in] | id | Stable Simulation Status job ID; unknown/finished IDs are ignored. |
Implements OpenSWMM::Sdk::IRunRegistry.
|
overridevirtual |
Cancel an exact shared run or this host's own worker.
| [in] | operationId | Unique retained attempt. |
| [out] | error | Optional refusal detail. |
Implements OpenSWMM::Sdk::IActivityControls.
|
overridevirtual |
Clear only this extension's Output history; native Logs history is retained.
Implements OpenSWMM::Sdk::IConsole.
|
inlineoverridevirtual |
Access this extension output channel.
Implements OpenSWMM::Sdk::ExtensionHost.
|
inlineoverridevirtual |
Access registered built-in dialog commands.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overrideprotected |
Publish theme changes and activate output source locations.
| [in] | object | Watched window or output viewport. |
| [in] | event | Borrowed Qt event; located output double-clicks invoke the guarded handler. |
|
signal |
Notify observers on the GUI thread.
| [in] | event | SDK event name. |
| [in] | data | Owning metadata map. |
|
overridevirtual |
Validate current runtime UI identities and use scoped native routes.
| [in] | command | Copied window/target/action request. |
| [out] | error | Optional refusal detail. |
Implements OpenSWMM::Sdk::IActivityControls.
|
overridevirtual |
Apply a validated view controller command.
| [in] | command | Owning request targeting a Ready session and current attachment. |
| [out] | error | Optional refusal detail, cleared on success. |
Implements OpenSWMM::Sdk::IViewControls.
|
overridevirtual |
Remove an operation from shared progress and record its terminal outcome once.
| [in] | operationId | Active UUID issued by this exact host. |
| [in] | outcome | Successful, failed or cancelled; invalid enum values are rejected. |
| [in] | detail | Optional literal terminal explanation, appended to the log entry. |
Implements OpenSWMM::Sdk::IProgress.
|
overridevirtual |
Enumerate currently registered built-in commands that open dialogs.
Implements OpenSWMM::Sdk::IDialogs.
|
override |
Start a guarded native observation import through the installed application bridge.
| [in] | request | Exact session/generation and completed local asset paths. |
| [in] | context | Required GUI-thread receiver lifetime. |
| [in] | finished | Managed terminal receiver suppressed during shutdown. |
| [out] | error | Immediate refusal detail, cleared on acceptance. |
|
overridevirtual |
Enumerate loaded models across projects.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Inspect resolved palette contrast.
Implements OpenSWMM::Sdk::ExtensionHost.
| bool openswmmvis::GuiExtensionHost::isStopping | ( | ) | const |
Report shutdown or wrong-thread access before private bridges read GUI state.
|
overridevirtual |
Resolve an own retained IJob handle without dereferencing foreign pointers.
| [in] | job | Borrowed handle from this host's runJob(). |
Implements OpenSWMM::Sdk::IActivityControls.
|
overridevirtual |
List this extension's stored settings without the host prefix.
Implements OpenSWMM::Sdk::ISettings.
|
inlineoverridevirtual |
Obtain a safe QObject context for actions and signal connections.
Implements OpenSWMM::Sdk::ExtensionHost.
|
inlineoverridevirtual |
Obtain the main window for widget parenting.
Implements OpenSWMM::Sdk::IUiHost.
|
inlineoverridevirtual |
Inspect the running host build identity.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Present an informational dialog on the GUI thread.
| [in] | title | Dialog caption. |
| [in] | text | User-facing message; avoid invoking nested dialogs during an edit scope. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Access the host offline/HTTPS destination policy and shared client.
Implements OpenSWMM::Sdk::ExtensionHost.
| void openswmmvis::GuiExtensionHost::notify | ( | const QString & | event, |
| const QVariantMap & | data = {} |
||
| ) |
Deliver an owning metadata notification to extension observers.
| [in] | event | SDK event name. |
| [in] | data | Copied metadata; model events contain a persistent id. |
|
override |
Connect a synchronous GUI-thread listener to this extension's scoped event stream.
| [in] | context | Required GUI-thread QObject lifetime guard, automatically disconnecting on destruction. |
| [in] | callback | Owning receiver of the event name and copied metadata. |
|
override |
Subscribe to future scoped activity metadata on the shared ordered dispatcher.
| [in] | context | Required GUI-thread receiver lifetime. |
| [in] | filter | Copied reason/attempt/session filter. |
| [in] | callback | Short managed exception-isolated observer. |
|
override |
Collect plugin state synchronously before an accepted save writes it.
| [in] | context | Required GUI-thread lifetime guard. |
| [in] | callback | Short non-vetoing collector; must not start writes/runs or nested event loops. |
|
override |
Observe queued lifecycle/state changes after this registration's watermark.
| [in] | context | Required GUI-thread lifetime guard. |
| [in] | filter | Copied kind/session selection. |
| [in] | callback | GUI-thread observer; each delivery rechecks session generation/lifetime. |
|
override |
Observe future IViewEvents domain invalidations on the ordered shared dispatcher.
| [in] | context | Required GUI-thread lifetime guard. |
| [in] | filter | Copied reason/session/attachment filter. |
| [in] | callback | Managed exception-isolated observer. |
|
overridevirtual |
Trigger a built-in dialog in the current application context.
| [in] | id | Identity returned by ids(); extension commands are excluded. |
Implements OpenSWMM::Sdk::IDialogs.
|
overridevirtual |
Create and show one host-owned MDI document.
| [in] | kind | Previously registered extension-local document kind. |
| [in] | instance | Borrowed live model, or null if the factory supports model-independent views. |
Implements OpenSWMM::Sdk::IUiHost.
|
inlineoverridevirtual |
Access the application's existing plot panels.
Implements OpenSWMM::Sdk::ExtensionHost.
|
inlineoverridevirtual |
Identify the extension owning this facade.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Queue a callback onto the GUI thread from any worker.
| [in] | callback | Owning function, suppressed if host shutdown has started. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Cancel and join extension workers before plugin-owned resources are released.
Cancel and join jobs before shutdown destroys extension-owned resources.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Identify this extension's native preview layer in one Ready session.
| [in] | sessionId | Ready per-open identity. |
| [out] | featureIds | Optional destination, replaced with native FIDs in the feature order of the accepted showPreview() collection; empty when unavailable. |
Implements OpenSWMM::Sdk::IPreviewLayers.
|
overridevirtual |
Open the standard profile panel along connected named nodes.
| [in] | instance | Borrowed live model; result overlays follow its active results. |
| [in] | nodeNames | At least two ordered connected node IDs; each adjacent pair must have a link. |
Implements OpenSWMM::Sdk::IPlotService.
|
overridevirtual |
Enumerate open projects.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Register an extension command in the host command palette and shortcut context.
| [in] | id | Nonempty extension-local command ID. |
| [in] | action | Borrowed QAction; parent it to ExtensionHost::lifetime() for host ownership. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Instantiate and mount a dock with View-menu and layout persistence.
| [in] | factory | Borrowed factory during this call; returned widget becomes host-owned. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Register a borrowed document factory and materialize pending project views.
| [in] | factory | Must remain alive until unregistered. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Add a preferences factory to the Extensions section of future Preferences dialogs.
| [in] | factory | Borrowed until unregistered. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Register an independent, dynamically removable extension-owned ribbon tab.
| [in] | tab | Data-described tab; every action ID must already be registered by this extension. Register multiple distinct local tab IDs to create multiple tabs; the host scopes each ID to this extension. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Remove a relative key or subgroup within this extension's settings.
| [in] | key | Nonempty relative key; invalid and empty values are ignored. |
Implements OpenSWMM::Sdk::ISettings.
|
overridevirtual |
Resolve a ready session without creating a facade or emitting events.
| [in] | sessionId | Per-open session identity, independent of the saved instance UUID. |
Implements OpenSWMM::Sdk::ISessionEvents.
| void openswmmvis::GuiExtensionHost::restoreViews | ( | OpenSWMM::Sdk::IModelInstance * | instance, |
| const QJsonArray & | views | ||
| ) |
Restore this plugin's known views and retain unavailable kinds as pending.
| [in] | instance | Borrowed stable model facade. |
| [in] | views | Saved project view entries from every extension; foreign prefixes are ignored. |
|
override |
Start one worker, retaining its handle and progress UI until host cleanup.
| [in] | title | User-visible stage caption and durable operation-marker description. |
| [in] | work | Worker-only operation; it must cooperate with cancellation. |
| [in] | finished | Optional GUI-thread receiver of worker status and exception text. |
|
inlineoverridevirtual |
Access Simulation Status enumeration/start/cancel operations.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Copy current Simulation Status rows.
Implements OpenSWMM::Sdk::IRunRegistry.
| QJsonArray openswmmvis::GuiExtensionHost::saveViews | ( | OpenSWMM::Sdk::IModelInstance * | instance | ) | const |
Capture live and pending view state for one model.
| [in] | instance | Borrowed model facade whose views should be saved. |
|
overridevirtual |
Copy a bounded sorted page of selected vector FIDs.
| [in] | sessionId | Ready model lifetime. |
| [in] | layerSessionId | Current runtime attachment UUID. |
| [in] | offset | Nonnegative sorted-result offset. |
| [in] | limit | Positive requested count, capped at 5000. |
Implements OpenSWMM::Sdk::IViewControls.
| void openswmmvis::GuiExtensionHost::setJobCancellationHook | ( | OpenSWMM::Sdk::IJob * | job, |
| std::function< void()> | hook | ||
| ) |
Install a host-internal publication cancellation hook on a retained job.
| [in] | job | Borrowed job issued by this host. |
| [in] | hook | Thread-safe callback invoked by IJob::cancel(), including after worker settlement. Use only copied atomic state, never GUI objects. Empty clears the hook. |
|
overridevirtual |
Register a guarded source-location callback for this output channel.
| [in] | context | Borrowed GUI-thread receiver lifetime; null disables navigation. |
| [in] | handler | Owning callback receiving the source path and one-based line. |
Implements OpenSWMM::Sdk::IConsole.
| void openswmmvis::GuiExtensionHost::setModelAccess | ( | std::function< QList< OpenSWMM::Sdk::IProject * >()> | projects, |
| std::function< OpenSWMM::Sdk::IModelInstance *()> | active | ||
| ) |
Install GUI-thread model enumeration adapters before initialize() runs.
| [in] | projects | Owning callback returning borrowed guarded project facades. |
| [in] | active | Owning callback resolving the active model facade, or null. |
| void openswmmvis::GuiExtensionHost::setPreviewLayers | ( | std::function< QUuid(const QUuid &, QList< qint64 > *)> | lookup | ) |
Install the private native preview-layer lookup before extension initialization.
| [in] | lookup | Session-scoped resolver for this host's own preview facade. |
| void openswmmvis::GuiExtensionHost::setSessionResolver | ( | std::function< OpenSWMM::Sdk::IModelInstance *(const QUuid &)> | resolver | ) |
Install a lookup-only per-session facade resolver during host setup.
| [in] | resolver | Borrowed-facade lookup, confined to the GUI thread. |
| void openswmmvis::GuiExtensionHost::setTimeSeriesControls | ( | std::function< OpenSWMM::Sdk::IJob *(const OpenSWMM::Sdk::TimeSeriesImportRequest &, QObject *, std::function< void(const OpenSWMM::Sdk::TimeSeriesImportResult &)>, QString *)> | importer, |
| std::function< QList< OpenSWMM::Sdk::TimeSeriesLayerInfo >(const QUuid &)> | layers | ||
| ) |
Install private native dataset routes before extension initialization.
| [in] | importer | Cancellable application import/controller bridge. |
| [in] | layers | Lookup-only attached collection metadata query. |
|
inlineoverridevirtual |
Access this extension user settings.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Persist a nonempty relative key and announce settingsChanged.
| [in] | key | Relative setting name; empty and traversal keys are ignored. |
| [in] | value | Owning value copied into QSettings. |
Implements OpenSWMM::Sdk::ISettings.
| void openswmmvis::GuiExtensionHost::setViewControls | ( | std::function< bool(const OpenSWMM::Sdk::ViewCommand &, QString *)> | execute, |
| std::function< QList< qint64 >(const QUuid &, const QUuid &, int, int)> | selection | ||
| ) |
Install private native view-controller routes during host setup.
| [in] | execute | Validated native command callback. |
| [in] | selection | Lookup-only paged vector-selection callback. |
|
overridevirtual |
Reveal and raise a registered dock.
| [in] | id | Extension-local dock identity; unknown IDs are ignored. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Save and run an existing model using its configured engine/options.
| [in] | instance | Borrowed live, previously saved model facade. |
| [out] | error | Optional save, lease or startup refusal detail. |
Implements OpenSWMM::Sdk::IRunRegistry.
|
overridevirtual |
Start an exact Ready model generation via the native run controller.
| [in] | sessionId | Per-open native model identity. |
| [in] | loadGeneration | Exact accepted model generation. |
| [out] | error | Optional refusal detail. |
Implements OpenSWMM::Sdk::IActivityControls.
| ExtensionStateRegistry * openswmmvis::GuiExtensionHost::stateRegistry | ( | ) | const |
Access the application registry used by this host's private model bridge.
|
overridevirtual |
Copy live session metadata and its atomic registry watermark.
Implements OpenSWMM::Sdk::ISessionEvents.
|
overridevirtual |
Display transient status-bar text.
| [in] | text | User-facing message. |
| [in] | milliseconds | Visibility duration; zero keeps the message until replaced. |
Implements OpenSWMM::Sdk::IUiHost.
|
override |
Subscribe to typed SDK 1.2 notifications using a frozen optional interface.
| [in] | context | Required GUI-thread receiver whose destruction disconnects delivery. |
| [in] | filter | Copied event-kind and model-identity filter; empty fields match all. |
| [in] | callback | Synchronous observer receiving a borrowed typed value during the call. |
|
overridevirtual |
Read an active host palette token.
| [in] | role | Qt semantic palette role. |
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Add a result series to the shared time-series plot panel.
| [in] | instance | Borrowed live model with active 1D results. |
| [in] | category | Node, link, subcatchment or system. |
| [in] | name | Object ID, or empty for system results. |
| [in] | variableKey | Key returned by variables(); no GUI enum values are required. |
Implements OpenSWMM::Sdk::IPlotService.
|
overridevirtual |
Query bounded native observation-layer metadata for one Ready session.
| [in] | sessionId | Exact open lifetime; persistent UUIDs are not accepted. |
Implements OpenSWMM::Sdk::ITimeSeriesLayers.
|
signal |
Publish one canonical typed notification before its legacy projection.
| [in] | event | Owning domain value with per-host publication sequence. |
|
inlineoverridevirtual |
Access namespaced widget/action registration.
Implements OpenSWMM::Sdk::ExtensionHost.
|
overridevirtual |
Remove a command without deleting its QAction.
| [in] | id | Extension-local command identity. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Destroy a registered dock and its widget.
| [in] | id | Extension-local dock identity. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Close all views of this kind before releasing its factory.
| [in] | kind | Extension-local document kind. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Remove a preferences factory and its live page before resource teardown.
| [in] | id | Extension-local page identity. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Remove only this contribution and its host-owned toolbars.
| [in] | id | Extension-local contribution identity; other plugins remain available. |
Implements OpenSWMM::Sdk::IUiHost.
|
overridevirtual |
Update progress and its current human-readable stage.
| [in] | operationId | Active UUID issued by this exact host. |
| [in] | fraction | Finite negative values mean indeterminate; nonnegative values clamp to [0,1]. NaN and infinity are rejected without altering progress. |
| [in] | stage | Current stage; use stable wording so byte/count updates do not flood Logs. |
Implements OpenSWMM::Sdk::IProgress.
|
overridevirtual |
Read a key beneath extensions/<pluginId>/.
| [in] | key | Relative key; absolute paths and traversal components are refused. |
| [in] | fallback | Value returned for an absent or refused key. |
Implements OpenSWMM::Sdk::ISettings.
|
overridevirtual |
Enumerate plottable variables from the model's active 1D results.
| [in] | instance | Borrowed live model. |
| [in] | category | One of node, link, subcatchment or system. |
Implements OpenSWMM::Sdk::IPlotService.
|
overridevirtual |
Copy tracked native view metadata without creating trackers or facades.
| [in] | sessionId | Per-open model identity. |
Implements OpenSWMM::Sdk::IViewEvents.