Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryPlugin.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "berryPlugin.h"
18 #include "internal/berryInternalPlatform.h"
19 
20 namespace berry {
21 
23  : m_Context(nullptr)
24 {
25 }
26 
27 void Plugin::start(ctkPluginContext* context)
28 {
29  m_Context = context;
30 }
31 
32 void Plugin::stop(ctkPluginContext* /*context*/)
33 {
34  m_Context = nullptr;
35 }
36 
38 {
39  return m_Context->getPlugin();
40 }
41 
43 {
44  return InternalPlatform::GetInstance()->GetLog(m_Context->getPlugin());
45 }
46 
47 QString Plugin::GetStateLocation() const
48 {
49  return InternalPlatform::GetInstance()->GetStateLocation(GetPlugin()).absolutePath();
50 }
51 
52 }
QSharedPointer< ctkPlugin > GetPlugin() const
Definition: berryPlugin.cpp:37
void stop(ctkPluginContext *context) override
Definition: berryPlugin.cpp:32
void start(ctkPluginContext *context) override
Definition: berryPlugin.cpp:27
ILog * GetLog() const
Definition: berryPlugin.cpp:42
QString GetStateLocation() const
Definition: berryPlugin.cpp:47
ctkPluginContext * m_Context
Definition: berryPlugin.h:71