CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Member Functions | List of all members
ctkPluginFrameworkEvent Class Reference

#include <Libs/PluginFramework/ctkPluginFrameworkEvent.h>

Public Types

enum  Type {
  FRAMEWORK_STARTED , PLUGIN_ERROR , PLUGIN_WARNING , PLUGIN_INFO ,
  FRAMEWORK_STOPPED , FRAMEWORK_STOPPED_UPDATE , FRAMEWORK_WAIT_TIMEDOUT
}
 

Public Member Functions

 ctkPluginFrameworkEvent ()
 
 ctkPluginFrameworkEvent (const ctkPluginFrameworkEvent &other)
 
 ctkPluginFrameworkEvent (Type type, QSharedPointer< ctkPlugin > plugin)
 
 ctkPluginFrameworkEvent (Type type, QSharedPointer< ctkPlugin > plugin, const ctkException &fwException)
 
QString getErrorString () const
 
QSharedPointer< ctkPlugingetPlugin () const
 
Type getType () const
 
bool isNull () const
 
ctkPluginFrameworkEventoperator= (const ctkPluginFrameworkEvent &other)
 
 ~ctkPluginFrameworkEvent ()
 

Detailed Description

A general event from the Framework.

ctkPluginFrameworkEvent objects are delivered to slots connected via ctkPluginContext::connectFrameworkListener when a general event occurs within the plugin environment. A type code is used to identify the event type for future extendability.

See also
ctkPluginContext::connectFrameworkListener
ctkEventBus

Definition at line 49 of file ctkPluginFrameworkEvent.h.

Member Enumeration Documentation

◆ Type

Enumerator
FRAMEWORK_STARTED 

The Framework has started.

This event is fired when the Framework has started after all installed plugins that are marked to be started have been started and the Framework has reached the initial start level. The source of this event is the System Plugin.

PLUGIN_ERROR 

An error has occurred.

There was an error associated with a plugin.

PLUGIN_WARNING 

A warning has occurred.

There was a warning associated with a plugin.

PLUGIN_INFO 

An informational event has occurred.

There was an informational event associated with a plugin.

FRAMEWORK_STOPPED 

The Framework has stopped.

This event is fired when the Framework has been stopped because of a stop operation on the system plugin. The source of this event is the System Plugin.

FRAMEWORK_STOPPED_UPDATE 

The Framework has stopped during update.

This event is fired when the Framework has been stopped because of an update operation on the system plugin. The Framework will be restarted after this event is fired. The source of this event is the System Plugin.

FRAMEWORK_WAIT_TIMEDOUT 

The Framework did not stop before the wait timeout expired.

This event is fired when the Framework did not stop before the wait timeout expired. The source of this event is the System Plugin.

Definition at line 56 of file ctkPluginFrameworkEvent.h.

Constructor & Destructor Documentation

◆ ctkPluginFrameworkEvent() [1/4]

ctkPluginFrameworkEvent::ctkPluginFrameworkEvent ( )

Default constructor for use with the Qt meta object system.

◆ ~ctkPluginFrameworkEvent()

ctkPluginFrameworkEvent::~ctkPluginFrameworkEvent ( )

◆ ctkPluginFrameworkEvent() [2/4]

ctkPluginFrameworkEvent::ctkPluginFrameworkEvent ( Type  type,
QSharedPointer< ctkPlugin plugin,
const ctkException fwException 
)

Creates a Framework event regarding the specified plugin and exception.

Parameters
typeThe event type.
pluginThe event source.
fwExceptionThe related exception.

◆ ctkPluginFrameworkEvent() [3/4]

ctkPluginFrameworkEvent::ctkPluginFrameworkEvent ( Type  type,
QSharedPointer< ctkPlugin plugin 
)

Creates a Framework event regarding the specified plugin.

Parameters
typeThe event type.
pluginThe event source.

◆ ctkPluginFrameworkEvent() [4/4]

ctkPluginFrameworkEvent::ctkPluginFrameworkEvent ( const ctkPluginFrameworkEvent other)

Member Function Documentation

◆ getErrorString()

QString ctkPluginFrameworkEvent::getErrorString ( ) const

Returns the exception error string related to this event.

Returns
The related error string.

◆ getPlugin()

QSharedPointer<ctkPlugin> ctkPluginFrameworkEvent::getPlugin ( ) const

Returns the plugin associated with the event. This plugin is also the source of the event.

Returns
The plugin associated with the event.

◆ getType()

Type ctkPluginFrameworkEvent::getType ( ) const

Returns the type of framework event.

The type values are:

Returns
The type of state change.

◆ isNull()

bool ctkPluginFrameworkEvent::isNull ( ) const

Can be used to check if this ctkPluginFrameworkEvent instance is valid, or if it has been constructed using the default constructor.

Returns
true if this event object is valid, false otherwise.

◆ operator=()

ctkPluginFrameworkEvent& ctkPluginFrameworkEvent::operator= ( const ctkPluginFrameworkEvent other)

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