![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/PluginFramework/ctkPluginTrackerCustomizer.h>
Public Member Functions | |
virtual T | addingPlugin (QSharedPointer< ctkPlugin > plugin, const ctkPluginEvent &event)=0 |
virtual void | modifiedPlugin (QSharedPointer< ctkPlugin > plugin, const ctkPluginEvent &event, T object)=0 |
virtual void | removedPlugin (QSharedPointer< ctkPlugin > plugin, const ctkPluginEvent &event, T object)=0 |
virtual | ~ctkPluginTrackerCustomizer () |
The ctkPluginTrackerCustomizer
interface allows a ctkPluginTracker
to customize the ctkPlugin
s that are tracked. A ctkPluginTrackerCustomizer
is called when a plugin is being added to a ctkPluginTracker
. The ctkPluginTrackerCustomizer
can then return an object for the tracked plugin. A ctkPluginTrackerCustomizer
is also called when a tracked plugin is modified or has been removed from a ctkPluginTracker
.
The methods in this interface may be called as the result of a ctkPluginEvent
being received by a ctkPluginTracker
. Since ctkPluginEvent
s are received synchronously by the ctkPluginTracker
, it is highly recommended that implementations of these methods do not alter plugin states while being synchronized on any object.
The ctkPluginTracker
class is thread-safe. It does not call a ctkPluginTrackerCustomizer
while holding any locks. ctkPluginTrackerCustomizer
implementations must also be thread-safe.
T | The type of the tracked object. |
Definition at line 63 of file ctkPluginTrackerCustomizer.h.
|
inlinevirtual |
Definition at line 65 of file ctkPluginTrackerCustomizer.h.
|
pure virtual |
A plugin is being added to the ctkPluginTracker
.
This method is called before a plugin which matched the search parameters of the ctkPluginTracker
is added to the ctkPluginTracker
. This method should return the object to be tracked for the specified ctkPlugin
. The returned object is stored in the ctkPluginTracker
and is available from the ctkPluginTracker::getObject(ctkPlugin*) method.
plugin | The ctkPlugin being added to the ctkPluginTracker . |
event | The plugin event which caused this customizer method to be called or an invalid event (ctkPluginEvent::isNull() returns true ) if there is no plugin event associated with the call to this method. |
ctkPlugin
object or null
if the specified ctkPlugin
object should not be tracked. Implemented in ctkPluginTracker< T >.
|
pure virtual |
A plugin tracked by the ctkPluginTracker
has been modified.
This method is called when a plugin being tracked by the ctkPluginTracker
has had its state modified.
plugin | The ctkPlugin whose state has been modified. |
event | The plugin event which caused this customizer method to be called or an invalid event (ctkPluginEvent::isNull() returns true ) if there is no plugin event associated with the call to this method. |
object | The tracked object for the specified plugin. |
|
pure virtual |
A plugin tracked by the ctkPluginTracker
has been removed.
This method is called after a plugin is no longer being tracked by the ctkPluginTracker
.
plugin | The ctkPlugin that has been removed. |
event | The plugin event which caused this customizer method to be called or an invalid event (ctkPluginEvent::isNull() returns true ) if there is no plugin event associated with the call to this method. |
object | The tracked object for the specified plugin. |