Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
Medical Imaging Interaction Toolkit
berryIntroPart.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef BERRYINTROPART_H_
14 #define BERRYINTROPART_H_
15 
16 #include "berryIIntroPart.h"
17 
18 #include "berryIIntroSite.h"
19 
23 
24 #include <QIcon>
25 
26 namespace berry
27 {
28 
52 class BERRY_UI_QT IntroPart: public QObject, public IIntroPart, public IExecutableExtension
53 {
54 
55  Q_OBJECT
57 
58 private:
59 
60  IConfigurationElement::Pointer configElement;
61 
62  QIcon imageDescriptor;
63 
64  IIntroSite::Pointer partSite;
65 
66  QString titleLabel;
67 
68  IPropertyChangeListener::Events propChangeEvents;
69 
75  QString GetDefaultTitle() const;
76 
77 protected:
78 
85  void FirePropertyChange(int propertyId);
86 
94  IConfigurationElement::Pointer GetConfigurationElement();
95 
101  QIcon GetDefaultImage() const;
102 
111  void SetSite(IIntroSite::Pointer site);
112 
119  void SetTitleImage(const QIcon& titleImage);
120 
127  void SetTitle(const QString& titleLabel);
128 
129 public:
130 
131  /* (non-Javadoc)
132  * @see org.eclipse.ui.intro.IIntroPart#addPropertyListener(org.eclipse.ui.IPropertyListener)
133  */
134  void AddPropertyListener(IPropertyChangeListener* l) override;
135 
141  ~IntroPart() override;
142 
143  /*
144  * (non-Javadoc)
145  *
146  * @see org.eclipse.ui.intro.IIntroPart#getIntroSite()
147  */
148  IIntroSite::Pointer GetIntroSite() const override;
149 
150  /* (non-Javadoc)
151  * @see org.eclipse.ui.intro.IIntroPart#getTitleImage()
152  */
153  QIcon GetTitleImage() const override;
154 
155  /* (non-Javadoc)
156  * @see org.eclipse.ui.intro.IIntroPart#getTitle()
157  */
158  QString GetPartName() const override;
159 
173  void Init(IIntroSite::Pointer site, IMemento::Pointer memento) override;
174 
175  /* (non-Javadoc)
176  * @see IIntroPart#RemovePropertyListener
177  */
178  void RemovePropertyListener(IPropertyChangeListener* l) override;
179 
187  void SaveState(IMemento::Pointer memento) override;
188 
199  void SetInitializationData(const IConfigurationElement::Pointer& cfig,
200  const QString& propertyName, const Object::Pointer& data) override;
201 
202 };
203 
204 }
205 
206 #endif /* BERRYINTROPART_H_ */
berry::SmartPointer< Self > Pointer
Definition: berryObject.h:82
#define BERRY_UI_QT