Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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 
82  static const QString EDITOR_ID_ATTR; // = "org.blueberry.ui.editorID";
83 
89  static const QString CHANGE_RESET; // = "reset";
90 
98  static const QString CHANGE_RESET_COMPLETE; // = "resetComplete";
99 
105  static const QString CHANGE_VIEW_SHOW; // = "viewShow";
106 
112  static const QString CHANGE_VIEW_HIDE; // = "viewHide";
113 
119  static const QString CHANGE_EDITOR_OPEN; // = "editorOpen";
120 
126  static const QString CHANGE_EDITOR_CLOSE; // = "editorClose";
127 
133  static const QString CHANGE_EDITOR_AREA_SHOW; // = "editorAreaShow";
134 
140  static const QString CHANGE_EDITOR_AREA_HIDE; // = "editorAreaHide";
141 
147  static const QString CHANGE_ACTION_SET_SHOW; // = "actionSetShow";
148 
154  static const QString CHANGE_ACTION_SET_HIDE; // = "actionSetHide";
155 
161  static const int VIEW_ACTIVATE; // = 1;
162 
168  static const int VIEW_VISIBLE; // = 2;
169 
176  static const int VIEW_CREATE; // = 3;
177 
182  static const int MATCH_NONE; // = 0;
183 
188  static const int MATCH_INPUT; // = 1;
189 
194  static const int MATCH_ID; // = 2;
195 
203  virtual void Activate(IWorkbenchPart::Pointer part) = 0;
204 
213  virtual void BringToTop(IWorkbenchPart::Pointer part) = 0;
214 
226  virtual bool Close() = 0;
227 
241  virtual bool CloseAllEditors(bool save) = 0;
242 
261  virtual bool CloseEditors(const QList<IEditorReference::Pointer>& editorRefs, bool save) = 0;
262 
279  virtual bool CloseEditor(IEditorPart::Pointer editor, bool save) = 0;
280 
289  virtual IViewPart::Pointer FindView(const QString& viewId) = 0;
290 
298  virtual IViewReference::Pointer FindViewReference(const QString& viewId) = 0;
299 
310  virtual IViewReference::Pointer FindViewReference(const QString& viewId, const QString& secondaryId) = 0;
311 
321  virtual IEditorPart::Pointer GetActiveEditor() = 0;
322 
331  virtual IEditorPart::Pointer FindEditor(IEditorInput::Pointer input) = 0;
332 
353  virtual QList<IEditorReference::Pointer> FindEditors(IEditorInput::Pointer input, const QString& editorId,
354  int matchFlags) = 0;
355 
367  virtual QList<IEditorPart::Pointer> GetEditors() = 0;
368 
378  virtual QList<IEditorReference::Pointer> GetEditorReferences() = 0;
379 
385  virtual QList<IEditorPart::Pointer> GetDirtyEditors() = 0;
386 
392  virtual IAdaptable* GetInput() = 0;
393 
400  virtual QString GetLabel() = 0;
401 
410  virtual IPerspectiveDescriptor::Pointer GetPerspective() = 0;
411 
421  virtual QList<IViewReference::Pointer> GetViewReferences() = 0;
422 
434  virtual QList<IViewPart::Pointer> GetViews() = 0;
435 
441  virtual IWorkbenchWindow::Pointer GetWorkbenchWindow() const = 0;
442 
449  virtual void HideView(IViewPart::Pointer view) = 0;
450 
457  virtual void HideView(IViewReference::Pointer view) = 0;
458 
462  //virtual bool HasView(const QString& perspectiveId, const QString& viewId) = 0;
463 
471  virtual bool IsPartVisible(IWorkbenchPart::Pointer part) = 0;
472 
481  virtual void ReuseEditor(IReusableEditor::Pointer editor, IEditorInput::Pointer input) = 0;
482 
512  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString& editorId) = 0;
513 
538  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString& editorId,
539  bool activate) = 0;
540 
571  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input,
572  const QString& editorId, bool activate, int matchFlags) = 0;
573 
584  virtual void ResetPerspective() = 0;
585 
605  virtual bool SaveAllEditors(bool confirm) = 0;
606 
627  virtual bool SaveEditor(IEditorPart::Pointer editor, bool confirm) = 0;
628 
634  virtual void SavePerspective() = 0;
635 
645  virtual void SavePerspectiveAs(IPerspectiveDescriptor::Pointer perspective) = 0;
646 
647 
681  virtual void SetPerspective(IPerspectiveDescriptor::Pointer perspective) = 0;
682 
694  virtual IViewPart::Pointer ShowView(const QString& viewId) = 0;
695 
725  virtual IViewPart::Pointer ShowView(const QString& viewId, const QString& secondaryId, int mode) = 0;
726 
735  virtual bool IsEditorPinned(IEditorPart::Pointer editor) = 0;
736 
744  virtual QList<QString> GetPerspectiveShortcuts() = 0;
745 
753  virtual QList<QString> GetShowViewShortcuts() = 0;
754 
761  virtual QList<IPerspectiveDescriptor::Pointer> GetOpenPerspectives() = 0;
762 
769  virtual QList<IPerspectiveDescriptor::Pointer> GetSortedPerspectives() = 0;
770 
786  virtual void ClosePerspective(IPerspectiveDescriptor::Pointer desc,
787  bool saveParts, bool closePage) = 0;
788 
800  virtual void CloseAllPerspectives(bool saveEditors, bool closePage) = 0;
801 
815  virtual IExtensionTracker* GetExtensionTracker() const = 0;
816 
826  virtual IWorkbenchPartReference::Pointer GetReference(IWorkbenchPart::Pointer part) = 0;
827 };
828 
829 } // namespace berry
830 
831 #endif /*BERRYIWORKBENCHPAGE_H_*/
berryIViewReference.h
berry::IWorkbenchPage::CHANGE_RESET
static const QString CHANGE_RESET
Definition: berryIWorkbenchPage.h:89
berry::IWorkbenchPage::CHANGE_EDITOR_CLOSE
static const QString CHANGE_EDITOR_CLOSE
Definition: berryIWorkbenchPage.h:126
berry::IWorkbenchPage::VIEW_CREATE
static const int VIEW_CREATE
Definition: berryIWorkbenchPage.h:176
berry::IWorkbenchPage::CHANGE_VIEW_HIDE
static const QString CHANGE_VIEW_HIDE
Definition: berryIWorkbenchPage.h:112
berry::IExtensionTracker
Definition: berryIExtensionTracker.h:50
berryIEditorReference.h
berryISelectionService.h
berry::IWorkbenchPage::MATCH_ID
static const int MATCH_ID
Definition: berryIWorkbenchPage.h:194
berry::IWorkbenchPage::CHANGE_ACTION_SET_SHOW
static const QString CHANGE_ACTION_SET_SHOW
Definition: berryIWorkbenchPage.h:147
berry::IWorkbenchPage::CHANGE_RESET_COMPLETE
static const QString CHANGE_RESET_COMPLETE
Definition: berryIWorkbenchPage.h:98
berryMacros.h
berry::SmartPointer
Implements transparent reference counting.
Definition: berryICommandCategoryListener.h:21
berry::IWorkbenchPage::CHANGE_ACTION_SET_HIDE
static const QString CHANGE_ACTION_SET_HIDE
Definition: berryIWorkbenchPage.h:154
berry::Object
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
berryIWorkbenchWindow.h
perspective
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
Definition: CustomViewerExample.dox:312
berry::ISelectionService
Definition: berryISelectionService.h:41
berry::IWorkbenchPage::MATCH_INPUT
static const int MATCH_INPUT
Definition: berryIWorkbenchPage.h:188
berryIEditorPart.h
berry::IWorkbenchPage::CHANGE_VIEW_SHOW
static const QString CHANGE_VIEW_SHOW
Definition: berryIWorkbenchPage.h:105
berry::IWorkbenchPage::CHANGE_EDITOR_AREA_HIDE
static const QString CHANGE_EDITOR_AREA_HIDE
Definition: berryIWorkbenchPage.h:140
berry::IWorkbenchPage::MATCH_NONE
static const int MATCH_NONE
Definition: berryIWorkbenchPage.h:182
berryIEditorInput.h
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berryIReusableEditor.h
berry::IPartService
Definition: berryIPartService.h:35
berry::IWorkbenchPage::CHANGE_EDITOR_OPEN
static const QString CHANGE_EDITOR_OPEN
Definition: berryIWorkbenchPage.h:119
berry::IWorkbenchPage::VIEW_ACTIVATE
static const int VIEW_ACTIVATE
Definition: berryIWorkbenchPage.h:161
berry::IAdaptable
Definition: berryIAdaptable.h:50
berry::IWorkbenchPage::CHANGE_EDITOR_AREA_SHOW
static const QString CHANGE_EDITOR_AREA_SHOW
Definition: berryIWorkbenchPage.h:133
berry::IWorkbenchPage::VIEW_VISIBLE
static const int VIEW_VISIBLE
Definition: berryIWorkbenchPage.h:168
berryIPartService.h
berry::IWorkbenchPage::EDITOR_ID_ATTR
static const QString EDITOR_ID_ATTR
Definition: berryIWorkbenchPage.h:82
berryIPerspectiveDescriptor.h
berryObjectMacro
#define berryObjectMacro(...)
Definition: berryMacros.h:31
berryIViewPart.h
berry::IWorkbenchPage
Definition: berryIWorkbenchPage.h:65
berry
Definition: QmitkPropertyItemModel.h:24