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
ctkPluginEvent Class Reference

#include <Libs/PluginFramework/ctkPluginEvent.h>

Public Types

enum  Type {
  INSTALLED , STARTED , STOPPED , UPDATED ,
  UNINSTALLED , RESOLVED , UNRESOLVED , STARTING ,
  STOPPING , LAZY_ACTIVATION
}
 

Public Member Functions

 ctkPluginEvent ()
 
 ctkPluginEvent (const ctkPluginEvent &other)
 
 ctkPluginEvent (Type type, QSharedPointer< ctkPlugin > plugin)
 
QSharedPointer< ctkPlugingetPlugin () const
 
Type getType () const
 
bool isNull () const
 
ctkPluginEventoperator= (const ctkPluginEvent &other)
 
 ~ctkPluginEvent ()
 

Detailed Description

An event from the Framework describing a plugin lifecycle change.

ctkPluginEvent objects are delivered to slots connected via ctkPluginContext::connectPluginListener() when a change occurs in a plugins's lifecycle. A type code is used to identify the event type for future extendability.

See also
ctkPluginContext::connectPluginListener

Definition at line 47 of file ctkPluginEvent.h.

Member Enumeration Documentation

◆ Type

Enumerator
INSTALLED 

The plugin has been installed.

See also
ctkPluginContext::installBundle(const QString&)
STARTED 

The plugin has been started.

The plugin's ctkPluginActivator start method has been executed.

See also
ctkPlugin::start()
STOPPED 

The plugin has been stopped.

The plugin's ctkPluginActivator stop method has been executed.

See also
ctkPlugin::stop()
UPDATED 

The plugin has been updated.

See also
ctkPlugin::update()
UNINSTALLED 

The plugin has been uninstalled.

See also
ctkPlugin::uninstall()
RESOLVED 

The plugin has been resolved.

See also
ctkPlugin::RESOLVED
UNRESOLVED 

The plugin has been unresolved.

See also
ctkPlugin::INSTALLED
STARTING 

The plugin is about to be activated.

The plugin's ctkPluginActivator start method is about to be called. This event is only delivered to synchronuous slots, which have been registered with Qt::DirectConnection or Qt::BlockingQueuedConnection in ctkPluginContext::connectPluginListener().

See also
ctkPlugin::start()
STOPPING 

The plugin is about to deactivated.

The plugin's ctkPluginActivator stop method is about to be called. This event is only delivered to synchronuous slots, which have been registered with Qt::DirectConnection or Qt::BlockingQueuedConnection in ctkPluginContext::connectPluginListener().

See also
ctkPlugin::stop()
LAZY_ACTIVATION 

The plugin will be lazily activated.

The plugin has a lazy activation policy and is waiting to be activated. It is now in the STARTING state and has a valid ctkPluginContext. This event is only delivered to synchronuous slots, which have been registered with Qt::DirectConnection or Qt::BlockingQueuedConnection in ctkPluginContext::connectPluginListener().

Definition at line 54 of file ctkPluginEvent.h.

Constructor & Destructor Documentation

◆ ctkPluginEvent() [1/3]

ctkPluginEvent::ctkPluginEvent ( )

Default constructor for use with the Qt meta object system.

◆ ~ctkPluginEvent()

ctkPluginEvent::~ctkPluginEvent ( )

◆ ctkPluginEvent() [2/3]

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

Creates a plugin event of the specified type.

Parameters
typeThe event type.
pluginThe plugin which had a lifecycle change.

◆ ctkPluginEvent() [3/3]

ctkPluginEvent::ctkPluginEvent ( const ctkPluginEvent other)

Member Function Documentation

◆ getPlugin()

QSharedPointer<ctkPlugin> ctkPluginEvent::getPlugin ( ) const

Returns the plugin which had a lifecycle change.

Returns
The plugin that had a change occur in its lifecycle.

◆ getType()

Type ctkPluginEvent::getType ( ) const

Returns the type of lifecyle event. The type values are:

Returns
The type of lifecycle event.

◆ isNull()

bool ctkPluginEvent::isNull ( ) const

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

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

◆ operator=()

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

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