Medical Imaging Interaction Toolkit  2018.4.99-a28b433c
Medical Imaging Interaction Toolkit
berryContributionItemFactory.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 
14 #ifndef BERRYCONTRIBUTIONITEMFACTORY_H
15 #define BERRYCONTRIBUTIONITEMFACTORY_H
16 
17 #include <QString>
18 
19 #include <berrySmartPointer.h>
21 
22 namespace berry {
23 
24 struct IContributionItem;
25 struct IWorkbenchWindow;
26 
46 {
47 
48 private:
49 
53  const QString contributionItemId;
54 
55 protected:
56 
62  ContributionItemFactory(const QString& contributionItemId);
63 
64 public:
65 
81  virtual SmartPointer<IContributionItem> Create(IWorkbenchWindow* window) = 0;
82 
88  QString GetId() const;
89 
96  static const QScopedPointer<ContributionItemFactory> OPEN_WINDOWS;
97 
105  static const QScopedPointer<ContributionItemFactory> VIEWS_SHORTLIST;
106 
113  static const QScopedPointer<ContributionItemFactory> REOPEN_EDITORS;
114 
124  static const QScopedPointer<ContributionItemFactory> PERSPECTIVES_SHORTLIST;
125 
126  virtual ~ContributionItemFactory() = default;
127 
128 };
129 
130 }
131 
132 #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