SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
smtk::paraview::ApplicationConfiguration Class Referenceabstract

An interface by which applications can configure SMTK UI components. More...

#include <ApplicationConfiguration.h>

Inheritance diagram for smtk::paraview::ApplicationConfiguration:
[legend]
Collaboration diagram for smtk::paraview::ApplicationConfiguration:
[legend]

Public Types

using ConfigurationObserver = std::function< void(ApplicationConfiguration &)>
 

Public Member Functions

virtual smtk::view::Information panelConfiguration (const QWidget *panel)=0
 Method for applications to provide configuration information for panels. More...
 

Static Public Member Functions

static bool notify (ConfigurationObserver observer)
 Wait until a configuration provider is registered and invoke an observer. More...
 

Static Protected Member Functions

static bool found (QObject *iface)
 A "slot" to be invoked when an interface implementation is available.
 

Static Protected Attributes

static std::vector< ConfigurationObserver > s_uiComponents
 Observers waiting for an interface to be invoked.
 

Detailed Description

An interface by which applications can configure SMTK UI components.

SMTK UI components (not resource::Component, but panels, toolbars, etc.) should use the ApplicationConfiguration::notify() function to provide an Observer that will be invoked either immediately or when a plugin is loaded that provides an instance of ApplicationConfiguration.

Currently this interface only supports panels, but API may be added for other components as needed.

Member Function Documentation

◆ notify()

bool smtk::paraview::ApplicationConfiguration::notify ( ConfigurationObserver  observer)
static

Wait until a configuration provider is registered and invoke an observer.

This monitors the pqApplicationCore::instance()'s interface tracker until an instance of ApplicationConfiguration becomes available. (It may be available immediately via pqInterfaceTracker::interfaces() or later upon the pqInterfaceTracker::interfaceRegistered() signal.) Once found, the observer is invoked so it can configure components as needed by calling methods on the interface.

This method returns true if the configuration instance was invoked immediately and false if a signal is queued to fire should a configuration instance be registered later.

◆ panelConfiguration()

virtual smtk::view::Information smtk::paraview::ApplicationConfiguration::panelConfiguration ( const QWidget *  panel)
pure virtual

Method for applications to provide configuration information for panels.

Applications should dynamic-cast the panel to each of the panel types that it supports and return view information.

Implemented in DefaultConfiguration.


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