Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryContributionItem.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 
18 #include "berryContributionItem.h"
19 
21 
22 namespace berry {
23 
24 void ContributionItem::Fill(QStatusBar* /*parent*/)
25 {
26 }
27 
28 void ContributionItem::Fill(QMenu* /*menu*/, QAction * /*before*/)
29 {
30 }
31 
32 void ContributionItem::Fill(QMenuBar* /*menu*/, QAction* /*before*/)
33 {
34 }
35 
36 void ContributionItem::Fill(QToolBar* /*parent*/, QAction * /*before*/)
37 {
38 }
39 
41 {
42 }
43 
44 QString ContributionItem::GetId() const
45 {
46  return id;
47 }
48 
50 {
51  return parent;
52 }
53 
55 {
56  // @issue should this be false instead of calling isDynamic()?
57  return IsDynamic();
58 }
59 
61 {
62  return true;
63 }
64 
66 {
67  return false;
68 }
69 
71 {
72  return false;
73 }
74 
76 {
77  return false;
78 }
79 
81 {
82  return visible;
83 }
84 
85 void ContributionItem::SetVisible(bool visible)
86 {
87  this->visible = visible;
88 }
89 
91 {
92  return QString(GetClassName()) + "(id=" + this->GetId() + ")";
93 }
94 
96 {
97 }
98 
100 {
101  this->parent = parent;
102 }
103 
104 void ContributionItem::Update(const QString& /*id*/)
105 {
106 }
107 
108 void ContributionItem::SetId(const QString& itemId)
109 {
110  id = itemId;
111 }
112 
114  : visible(true), parent(nullptr)
115 {
116 }
117 
119  : id(id), visible(true), parent(nullptr)
120 {
121 }
122 
123 }
bool IsVisible() const override
bool IsGroupMarker() const override
bool IsSeparator() const override
bool IsEnabled() const override
QString ToString() const override
bool IsDirty() const override
void SetParent(IContributionManager *parent) override
IContributionManager * GetParent() const
void SetId(const QString &itemId)
virtual QString GetClassName() const
Definition: berryObject.cpp:75
void Fill(QStatusBar *parent) override
bool IsDynamic() const override
void SetVisible(bool visible) override
QString GetId() const override