Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berrySubContributionItem.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 namespace berry
20 {
21 
23 : visible(true), innerItem(item)
24 {
25 
26 }
27 
28 void SubContributionItem::Fill(QStatusBar* parent)
29 {
30  if (visible)
31  {
32  innerItem->Fill(parent);
33  }
34 }
35 
36 void SubContributionItem::Fill(QMenu *parent, QAction *before)
37 {
38  if (visible)
39  {
40  innerItem->Fill(parent, before);
41  }
42 }
43 
44 void SubContributionItem::Fill(QToolBar *parent, QAction *before)
45 {
46  if (visible)
47  {
48  innerItem->Fill(parent, before);
49  }
50 }
51 
53 {
54  return innerItem->GetId();
55 }
56 
58 {
59  return innerItem;
60 }
61 
63 {
64  return innerItem->IsEnabled();
65 }
66 
68 {
69  return innerItem->IsDirty();
70 }
71 
73 {
74  return innerItem->IsDynamic();
75 }
76 
78 {
79  return innerItem->IsGroupMarker();
80 }
81 
83 {
84  return innerItem->IsSeparator();
85 }
86 
88 {
89  return visible && innerItem->IsVisible();
90 }
91 
93 {
94  // do nothing, the parent of our inner item
95  // is its SubContributionManager
96 }
97 
99 {
100  this->visible = visible;
101 }
102 
104 {
105  innerItem->Update();
106 }
107 
108 void SubContributionItem::Update(const QString& id)
109 {
110  innerItem->Update(id);
111 }
112 
114 {
115 }
116 
117 }
IContributionItem::Pointer GetInnerItem() const
void Fill(QStatusBar *parent) override
berryObjectMacro(SubContributionItem) private IContributionItem::Pointer innerItem
SubContributionItem(IContributionItem::Pointer item)
void SetParent(IContributionManager *parent) override
void SetVisible(bool visible) override