Medical Imaging Interaction Toolkit  2026.06.00
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 
77  static const QString CHANGE_RESET; // = "reset";
78 
86  static const QString CHANGE_RESET_COMPLETE; // = "resetComplete";
87 
93  static const QString CHANGE_VIEW_SHOW; // = "viewShow";
94 
100  static const QString CHANGE_VIEW_HIDE; // = "viewHide";
101 
107  static const QString CHANGE_EDITOR_OPEN; // = "editorOpen";
108 
114  static const QString CHANGE_EDITOR_CLOSE; // = "editorClose";
115 
121  static const QString CHANGE_EDITOR_AREA_SHOW; // = "editorAreaShow";
122 
128  static const QString CHANGE_EDITOR_AREA_HIDE; // = "editorAreaHide";
129 
135  static const QString CHANGE_ACTION_SET_SHOW; // = "actionSetShow";
136 
142  static const QString CHANGE_ACTION_SET_HIDE; // = "actionSetHide";
143 
149  static const int VIEW_ACTIVATE; // = 1;
150 
156  static const int VIEW_VISIBLE; // = 2;
157 
164  static const int VIEW_CREATE; // = 3;
165 
170  static const int MATCH_NONE; // = 0;
171 
176  static const int MATCH_INPUT; // = 1;
177 
182  static const int MATCH_ID; // = 2;
183 
191  virtual void Activate(IWorkbenchPart::Pointer part) = 0;
192 
201  virtual void BringToTop(IWorkbenchPart::Pointer part) = 0;
202 
214  virtual bool Close() = 0;
215 
229  virtual bool CloseAllEditors(bool save) = 0;
230 
249  virtual bool CloseEditors(const QList<IEditorReference::Pointer>& editorRefs, bool save) = 0;
250 
267  virtual bool CloseEditor(IEditorPart::Pointer editor, bool save) = 0;
268 
277  virtual IViewPart::Pointer FindView(const QString& viewId) = 0;
278 
286  virtual IViewReference::Pointer FindViewReference(const QString& viewId) = 0;
287 
298  virtual IViewReference::Pointer FindViewReference(const QString& viewId, const QString& secondaryId) = 0;
299 
310 
320 
341  virtual QList<IEditorReference::Pointer> FindEditors(IEditorInput::Pointer input, const QString& editorId,
342  int matchFlags) = 0;
343 
353  virtual QList<IEditorReference::Pointer> GetEditorReferences() = 0;
354 
360  virtual QList<IEditorPart::Pointer> GetDirtyEditors() = 0;
361 
367  virtual IAdaptable* GetInput() = 0;
368 
375  virtual QString GetLabel() = 0;
376 
386 
396  virtual QList<IViewReference::Pointer> GetViewReferences() = 0;
397 
404 
411  virtual void HideView(IViewPart::Pointer view) = 0;
412 
419  virtual void HideView(IViewReference::Pointer view) = 0;
420 
424  //virtual bool HasView(const QString& perspectiveId, const QString& viewId) = 0;
425 
433  virtual bool IsPartVisible(IWorkbenchPart::Pointer part) = 0;
434 
444 
474  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString& editorId) = 0;
475 
500  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString& editorId,
501  bool activate) = 0;
502 
534  const QString& editorId, bool activate, int matchFlags) = 0;
535 
546  virtual void ResetPerspective() = 0;
547 
567  virtual bool SaveAllEditors(bool confirm) = 0;
568 
589  virtual bool SaveEditor(IEditorPart::Pointer editor, bool confirm) = 0;
590 
596  virtual void SavePerspective() = 0;
597 
608 
609 
644 
656  virtual IViewPart::Pointer ShowView(const QString& viewId) = 0;
657 
687  virtual IViewPart::Pointer ShowView(const QString& viewId, const QString& secondaryId, int mode) = 0;
688 
697  virtual bool IsEditorPinned(IEditorPart::Pointer editor) = 0;
698 
706  virtual QList<QString> GetPerspectiveShortcuts() = 0;
707 
715  virtual QList<QString> GetShowViewShortcuts() = 0;
716 
723  virtual QList<IPerspectiveDescriptor::Pointer> GetOpenPerspectives() = 0;
724 
731  virtual QList<IPerspectiveDescriptor::Pointer> GetSortedPerspectives() = 0;
732 
749  bool saveParts, bool closePage) = 0;
750 
762  virtual void CloseAllPerspectives(bool saveEditors, bool closePage) = 0;
763 
778 
789 };
790 
791 } // namespace berry
792 
793 #endif /*BERRYIWORKBENCHPAGE_H_*/
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
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:68
Implements transparent reference counting.
#define BERRY_UI_QT
virtual void Activate(IWorkbenchPart::Pointer part)=0
virtual QList< QString > GetShowViewShortcuts()=0
virtual bool CloseAllEditors(bool save)=0
static const int MATCH_INPUT
virtual IEditorPart::Pointer FindEditor(IEditorInput::Pointer input)=0
virtual IViewPart::Pointer ShowView(const QString &viewId)=0
virtual IViewPart::Pointer ShowView(const QString &viewId, const QString &secondaryId, int mode)=0
~IWorkbenchPage() override
static const QString CHANGE_ACTION_SET_HIDE
virtual void ClosePerspective(IPerspectiveDescriptor::Pointer desc, bool saveParts, bool closePage)=0
virtual QList< IViewReference::Pointer > GetViewReferences()=0
virtual bool Close()=0
virtual QList< IEditorPart::Pointer > GetDirtyEditors()=0
virtual IAdaptable * GetInput()=0
static const QString CHANGE_VIEW_SHOW
virtual bool IsEditorPinned(IEditorPart::Pointer editor)=0
virtual void CloseAllPerspectives(bool saveEditors, bool closePage)=0
static const QString CHANGE_ACTION_SET_SHOW
static const QString CHANGE_RESET
virtual QList< IPerspectiveDescriptor::Pointer > GetSortedPerspectives()=0
virtual bool SaveAllEditors(bool confirm)=0
virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString &editorId, bool activate, int matchFlags)=0
virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString &editorId)=0
virtual IEditorPart::Pointer GetActiveEditor()=0
virtual void SetPerspective(IPerspectiveDescriptor::Pointer perspective)=0
virtual void HideView(IViewPart::Pointer view)=0
virtual void SavePerspective()=0
static const int VIEW_CREATE
virtual bool CloseEditor(IEditorPart::Pointer editor, bool save)=0
virtual bool CloseEditors(const QList< IEditorReference::Pointer > &editorRefs, bool save)=0
berryObjectMacro(berry::IWorkbenchPage)
virtual IWorkbenchWindow::Pointer GetWorkbenchWindow() const =0
static const QString CHANGE_VIEW_HIDE
virtual QList< IEditorReference::Pointer > FindEditors(IEditorInput::Pointer input, const QString &editorId, int matchFlags)=0
virtual void HideView(IViewReference::Pointer view)=0
virtual IViewReference::Pointer FindViewReference(const QString &viewId, const QString &secondaryId)=0
virtual void SavePerspectiveAs(IPerspectiveDescriptor::Pointer perspective)=0
virtual QList< QString > GetPerspectiveShortcuts()=0
virtual void ReuseEditor(IReusableEditor::Pointer editor, IEditorInput::Pointer input)=0
static const QString CHANGE_EDITOR_OPEN
static const QString CHANGE_EDITOR_AREA_HIDE
static const int VIEW_ACTIVATE
virtual IPerspectiveDescriptor::Pointer GetPerspective()=0
virtual QList< IEditorReference::Pointer > GetEditorReferences()=0
virtual bool IsPartVisible(IWorkbenchPart::Pointer part)=0
virtual IViewPart::Pointer FindView(const QString &viewId)=0
virtual void BringToTop(IWorkbenchPart::Pointer part)=0
virtual QList< IPerspectiveDescriptor::Pointer > GetOpenPerspectives()=0
static const QString CHANGE_EDITOR_CLOSE
virtual IExtensionTracker * GetExtensionTracker() const =0
static const QString CHANGE_EDITOR_AREA_SHOW
virtual IViewReference::Pointer FindViewReference(const QString &viewId)=0
static const int VIEW_VISIBLE
static const int MATCH_NONE
static const QString CHANGE_RESET_COMPLETE
virtual IWorkbenchPartReference::Pointer GetReference(IWorkbenchPart::Pointer part)=0
virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString &editorId, bool activate)=0
virtual QString GetLabel()=0
virtual void ResetPerspective()=0
virtual bool SaveEditor(IEditorPart::Pointer editor, bool confirm)=0