Medical Imaging Interaction Toolkit  2018.4.99-9a29ffc6
Medical Imaging Interaction Toolkit
berryIWorkbenchPage.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 BERRYIWORKBENCHPAGE_H_
14 #define BERRYIWORKBENCHPAGE_H_
15 
16 #include <berryMacros.h>
17 
18 #include "berryIEditorReference.h"
19 #include "berryIViewReference.h"
21 #include "berryIEditorPart.h"
22 #include "berryIViewPart.h"
23 #include "berryIEditorInput.h"
24 #include "berryIPartService.h"
25 #include "berryISelectionService.h"
26 #include "berryIReusableEditor.h"
27 
28 #include "berryIWorkbenchWindow.h"
29 
30 
35 namespace berry {
36 
37 struct IExtensionTracker;
38 
66 {
67 
69 
70  ~IWorkbenchPage() override;
71 
83  static const QString EDITOR_ID_ATTR; // = "org.blueberry.ui.editorID";
84 
90  static const QString CHANGE_RESET; // = "reset";
91 
99  static const QString CHANGE_RESET_COMPLETE; // = "resetComplete";
100 
106  static const QString CHANGE_VIEW_SHOW; // = "viewShow";
107 
113  static const QString CHANGE_VIEW_HIDE; // = "viewHide";
114 
120  static const QString CHANGE_EDITOR_OPEN; // = "editorOpen";
121 
127  static const QString CHANGE_EDITOR_CLOSE; // = "editorClose";
128 
134  static const QString CHANGE_EDITOR_AREA_SHOW; // = "editorAreaShow";
135 
141  static const QString CHANGE_EDITOR_AREA_HIDE; // = "editorAreaHide";
142 
148  static const QString CHANGE_ACTION_SET_SHOW; // = "actionSetShow";
149 
155  static const QString CHANGE_ACTION_SET_HIDE; // = "actionSetHide";
156 
162  static const int VIEW_ACTIVATE; // = 1;
163 
169  static const int VIEW_VISIBLE; // = 2;
170 
177  static const int VIEW_CREATE; // = 3;
178 
183  static const int MATCH_NONE; // = 0;
184 
189  static const int MATCH_INPUT; // = 1;
190 
195  static const int MATCH_ID; // = 2;
196 
204  virtual void Activate(IWorkbenchPart::Pointer part) = 0;
205 
212  //virtual void addPropertyChangeListener(IPropertyChangeListener listener);
213 
222  virtual void BringToTop(IWorkbenchPart::Pointer part) = 0;
223 
235  virtual bool Close() = 0;
236 
250  virtual bool CloseAllEditors(bool save) = 0;
251 
270  virtual bool CloseEditors(const QList<IEditorReference::Pointer>& editorRefs, bool save) = 0;
271 
288  virtual bool CloseEditor(IEditorPart::Pointer editor, bool save) = 0;
289 
298  virtual IViewPart::Pointer FindView(const QString& viewId) = 0;
299 
307  virtual IViewReference::Pointer FindViewReference(const QString& viewId) = 0;
308 
319  virtual IViewReference::Pointer FindViewReference(const QString& viewId, const QString& secondaryId) = 0;
320 
330  virtual IEditorPart::Pointer GetActiveEditor() = 0;
331 
340  virtual IEditorPart::Pointer FindEditor(IEditorInput::Pointer input) = 0;
341 
362  virtual QList<IEditorReference::Pointer> FindEditors(IEditorInput::Pointer input, const QString& editorId,
363  int matchFlags) = 0;
364 
376  virtual QList<IEditorPart::Pointer> GetEditors() = 0;
377 
387  virtual QList<IEditorReference::Pointer> GetEditorReferences() = 0;
388 
394  virtual QList<IEditorPart::Pointer> GetDirtyEditors() = 0;
395 
401  virtual IAdaptable* GetInput() = 0;
402 
409  virtual QString GetLabel() = 0;
410 
419  virtual IPerspectiveDescriptor::Pointer GetPerspective() = 0;
420 
430  virtual QList<IViewReference::Pointer> GetViewReferences() = 0;
431 
443  virtual QList<IViewPart::Pointer> GetViews() = 0;
444 
450  virtual IWorkbenchWindow::Pointer GetWorkbenchWindow() const = 0;
451 
458  virtual void HideView(IViewPart::Pointer view) = 0;
459 
466  virtual void HideView(IViewReference::Pointer view) = 0;
467 
471  //virtual bool HasView(const QString& perspectiveId, const QString& viewId) = 0;
472 
480  virtual bool IsPartVisible(IWorkbenchPart::Pointer part) = 0;
481 
488  //virtual void RemovePerspective(IPerspectiveDescriptor::Pointer desc) = 0;
489 
498  virtual void ReuseEditor(IReusableEditor::Pointer editor, IEditorInput::Pointer input) = 0;
499 
529  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString& editorId) = 0;
530 
555  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString& editorId,
556  bool activate) = 0;
557 
588  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input,
589  const QString& editorId, bool activate, int matchFlags) = 0;
590 
597  //virtual void removePropertyChangeListener(IPropertyChangeListener listener);
598 
609  virtual void ResetPerspective() = 0;
610 
630  virtual bool SaveAllEditors(bool confirm) = 0;
631 
652  virtual bool SaveEditor(IEditorPart::Pointer editor, bool confirm) = 0;
653 
659  virtual void SavePerspective() = 0;
660 
670  virtual void SavePerspectiveAs(IPerspectiveDescriptor::Pointer perspective) = 0;
671 
672 
706  virtual void SetPerspective(IPerspectiveDescriptor::Pointer perspective) = 0;
707 
719  virtual IViewPart::Pointer ShowView(const QString& viewId) = 0;
720 
750  virtual IViewPart::Pointer ShowView(const QString& viewId, const QString& secondaryId, int mode) = 0;
751 
760  virtual bool IsEditorPinned(IEditorPart::Pointer editor) = 0;
761 
769  virtual QList<QString> GetPerspectiveShortcuts() = 0;
770 
778  virtual QList<QString> GetShowViewShortcuts() = 0;
779 
786  virtual QList<IPerspectiveDescriptor::Pointer> GetOpenPerspectives() = 0;
787 
794  virtual QList<IPerspectiveDescriptor::Pointer> GetSortedPerspectives() = 0;
795 
805  //virtual void CloseCurrentPerspective(bool saveParts, bool closePage) = 0;
806 
822  virtual void ClosePerspective(IPerspectiveDescriptor::Pointer desc,
823  bool saveParts, bool closePage) = 0;
824 
836  virtual void CloseAllPerspectives(bool saveEditors, bool closePage) = 0;
837 
851  virtual IExtensionTracker* GetExtensionTracker() const = 0;
852 
862  virtual IWorkbenchPartReference::Pointer GetReference(IWorkbenchPart::Pointer part) = 0;
863 };
864 
865 } // namespace berry
866 
867 #endif /*BERRYIWORKBENCHPAGE_H_*/
static const QString CHANGE_EDITOR_CLOSE
static const QString CHANGE_VIEW_HIDE
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
static const int VIEW_VISIBLE
static const int MATCH_INPUT
static const QString CHANGE_RESET
static const QString EDITOR_ID_ATTR
static const QString CHANGE_EDITOR_AREA_SHOW
static const QString CHANGE_RESET_COMPLETE
#define berryObjectMacro(...)
Definition: berryMacros.h:33
static const QString CHANGE_EDITOR_OPEN
static const QString CHANGE_ACTION_SET_SHOW
The custom viewer plugin implements simple viewer functionality presented in a customized look and feel It was developed to demonstrate extensibility and customizability of the blueberry application framework As an example for the GUI customization capabilities provided by the BlueBerry application the custom viewer plugin was developed It features simple viewer functionality presented in a customized look and feel The custom viewer consists of two i e a viewer perspective and a DICOM perspective As part of the viewer perspective
static const int VIEW_CREATE
static const QString CHANGE_ACTION_SET_HIDE
static const int VIEW_ACTIVATE
static const int MATCH_NONE
static const QString CHANGE_EDITOR_AREA_HIDE
static const QString CHANGE_VIEW_SHOW
#define BERRY_UI_QT