Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryIntroPart.h
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 #ifndef BERRYINTROPART_H_
18 #define BERRYINTROPART_H_
19 
20 #include "berryIIntroPart.h"
21 
22 #include "berryIIntroSite.h"
23 
27 
28 #include <QIcon>
29 
30 namespace berry
31 {
32 
56 class BERRY_UI_QT IntroPart: public QObject, public IIntroPart, public IExecutableExtension
57 {
58 
59  Q_OBJECT
61 
62 private:
63 
64  IConfigurationElement::Pointer configElement;
65 
66  QIcon imageDescriptor;
67 
68  IIntroSite::Pointer partSite;
69 
70  QString titleLabel;
71 
72  IPropertyChangeListener::Events propChangeEvents;
73 
79  QString GetDefaultTitle() const;
80 
81 protected:
82 
89  void FirePropertyChange(int propertyId);
90 
98  IConfigurationElement::Pointer GetConfigurationElement();
99 
105  QIcon GetDefaultImage() const;
106 
115  void SetSite(IIntroSite::Pointer site);
116 
123  void SetTitleImage(const QIcon& titleImage);
124 
131  void SetTitle(const QString& titleLabel);
132 
133 public:
134 
135  /* (non-Javadoc)
136  * @see org.eclipse.ui.intro.IIntroPart#addPropertyListener(org.eclipse.ui.IPropertyListener)
137  */
138  void AddPropertyListener(IPropertyChangeListener* l) override;
139 
145  ~IntroPart();
146 
155  // Object getAdapter(Class adapter) {
156  // return Platform.getAdapterManager().getAdapter(this, adapter);
157  // }
158 
159 
160  /*
161  * (non-Javadoc)
162  *
163  * @see org.eclipse.ui.intro.IIntroPart#getIntroSite()
164  */
165  IIntroSite::Pointer GetIntroSite() const override;
166 
167  /* (non-Javadoc)
168  * @see org.eclipse.ui.intro.IIntroPart#getTitleImage()
169  */
170  QIcon GetTitleImage() const override;
171 
172  /* (non-Javadoc)
173  * @see org.eclipse.ui.intro.IIntroPart#getTitle()
174  */
175  QString GetPartName() const override;
176 
190  void Init(IIntroSite::Pointer site, IMemento::Pointer memento)
191  throw (PartInitException) override;
192 
193  /* (non-Javadoc)
194  * @see org.eclipse.ui.intro.IIntroPart#removePropertyListener(org.eclipse.ui.IPropertyListener)
195  */
196  void RemovePropertyListener(IPropertyChangeListener* l) override;
197 
205  void SaveState(IMemento::Pointer memento) override;
206 
217  void SetInitializationData(const IConfigurationElement::Pointer& cfig,
218  const QString& propertyName, const Object::Pointer& data) override;
219 
220 };
221 
222 }
223 
224 #endif /* BERRYINTROPART_H_ */
berry::SmartPointer< Self > Pointer
Definition: berryObject.h:88
#define BERRY_UI_QT