The plug-in activator for the StateMachine. More...
#include <QmitkCommonActivator.h>


Public Member Functions | |
| void | Start (berry::IBundleContext::Pointer context) |
The plug-in activator for the StateMachine.
When the plug-in is started by the framework, it initializes StateMachine specific things.
Definition at line 32 of file QmitkCommonActivator.h.
| void QmitkCommonActivator::Start | ( | berry::IBundleContext::Pointer | context ) |
Sets default StateMachine to EventMapper.
Reimplemented from berry::Plugin.
Definition at line 27 of file QmitkCommonActivator.cpp.
References mitk::GlobalInteraction::GetInstance(), and QmitkRegisterClasses().
{
QFile file(":/org.mitk.gui.qt.common/StateMachine.xml");
if(file.exists() && file.open(QIODevice::ReadOnly | QIODevice::Text) )
{
QByteArray contents = file.readAll();
QString string(contents);
file.close();
mitk::GlobalInteraction::GetInstance()->Initialize("global", string.toStdString());
}
else throw std::exception();
QmitkRegisterClasses();
}
1.7.2