SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
An interface by which applications can configure SMTK UI components. More...
#include <ApplicationConfiguration.h>
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. | |
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.
|
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.
|
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.