Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berrySameShellProvider.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 
18 
19 #include "berrySameShellProvider.h"
20 
21 namespace berry
22 {
23 
25  targetControl(target)
26 {
27 
28 }
29 
31  targetControl(nullptr), shell(sh)
32 {
33 
34 }
35 
37 {
38  if (shell != 0)
39  {
40  return shell;
41  }
42 
43  return targetControl == nullptr ? Shell::Pointer(nullptr)
44  : Tweaklets::Get(GuiWidgetsTweaklet::KEY)->GetShell(targetControl);
45 }
46 
47 }
SameShellProvider(Shell::Pointer shell)
berry::SmartPointer< Self > Pointer
Definition: berryObject.h:88
Shell::Pointer GetShell() const override
static Tweaklets::TweakKey< GuiWidgetsTweaklet > KEY