Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryContributionItemFactory.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 
18 #ifndef BERRYCONTRIBUTIONITEMFACTORY_H
19 #define BERRYCONTRIBUTIONITEMFACTORY_H
20 
21 #include <QString>
22 
23 #include <berrySmartPointer.h>
25 
26 namespace berry {
27 
28 struct IContributionItem;
29 struct IWorkbenchWindow;
30 
50 {
51 
52 private:
53 
57  const QString contributionItemId;
58 
59 protected:
60 
66  ContributionItemFactory(const QString& contributionItemId);
67 
68 public:
69 
85  virtual SmartPointer<IContributionItem> Create(IWorkbenchWindow* window) = 0;
86 
92  QString GetId() const;
93 
100  static const QScopedPointer<ContributionItemFactory> OPEN_WINDOWS;
101 
109  static const QScopedPointer<ContributionItemFactory> VIEWS_SHORTLIST;
110 
117  static const QScopedPointer<ContributionItemFactory> REOPEN_EDITORS;
118 
128  static const QScopedPointer<ContributionItemFactory> PERSPECTIVES_SHORTLIST;
129 
130 };
131 
132 }
133 
134 #endif // BERRYCONTRIBUTIONITEMFACTORY_H
Implements transparent reference counting.
static const QScopedPointer< ContributionItemFactory > REOPEN_EDITORS
static const QScopedPointer< ContributionItemFactory > PERSPECTIVES_SHORTLIST
static const QScopedPointer< ContributionItemFactory > VIEWS_SHORTLIST
static const QScopedPointer< ContributionItemFactory > OPEN_WINDOWS
#define BERRY_UI_QT