Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryIWorkbenchPage.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 #ifndef BERRYIWORKBENCHPAGE_H_
18 #define BERRYIWORKBENCHPAGE_H_
19 
20 #include <berryMacros.h>
21 
22 #include "berryIEditorReference.h"
23 #include "berryIViewReference.h"
25 #include "berryIEditorPart.h"
26 #include "berryIViewPart.h"
27 #include "berryIEditorInput.h"
28 #include "berryIPartService.h"
29 #include "berryISelectionService.h"
30 #include "berryIReusableEditor.h"
31 
32 #include "berryIWorkbenchWindow.h"
33 
34 
39 namespace berry {
40 
41 struct IExtensionTracker;
42 
70 {
71 
73 
74  ~IWorkbenchPage();
75 
87  static const QString EDITOR_ID_ATTR; // = "org.blueberry.ui.editorID";
88 
94  static const QString CHANGE_RESET; // = "reset";
95 
103  static const QString CHANGE_RESET_COMPLETE; // = "resetComplete";
104 
110  static const QString CHANGE_VIEW_SHOW; // = "viewShow";
111 
117  static const QString CHANGE_VIEW_HIDE; // = "viewHide";
118 
124  static const QString CHANGE_EDITOR_OPEN; // = "editorOpen";
125 
131  static const QString CHANGE_EDITOR_CLOSE; // = "editorClose";
132 
138  static const QString CHANGE_EDITOR_AREA_SHOW; // = "editorAreaShow";
139 
145  static const QString CHANGE_EDITOR_AREA_HIDE; // = "editorAreaHide";
146 
152  static const QString CHANGE_ACTION_SET_SHOW; // = "actionSetShow";
153 
159  static const QString CHANGE_ACTION_SET_HIDE; // = "actionSetHide";
160 
166  static const int VIEW_ACTIVATE; // = 1;
167 
173  static const int VIEW_VISIBLE; // = 2;
174 
181  static const int VIEW_CREATE; // = 3;
182 
187  static const int MATCH_NONE; // = 0;
188 
193  static const int MATCH_INPUT; // = 1;
194 
199  static const int MATCH_ID; // = 2;
200 
208  virtual void Activate(IWorkbenchPart::Pointer part) = 0;
209 
216  //virtual void addPropertyChangeListener(IPropertyChangeListener listener);
217 
226  virtual void BringToTop(IWorkbenchPart::Pointer part) = 0;
227 
239  virtual bool Close() = 0;
240 
254  virtual bool CloseAllEditors(bool save) = 0;
255 
274  virtual bool CloseEditors(const QList<IEditorReference::Pointer>& editorRefs, bool save) = 0;
275 
292  virtual bool CloseEditor(IEditorPart::Pointer editor, bool save) = 0;
293 
302  virtual IViewPart::Pointer FindView(const QString& viewId) = 0;
303 
311  virtual IViewReference::Pointer FindViewReference(const QString& viewId) = 0;
312 
323  virtual IViewReference::Pointer FindViewReference(const QString& viewId, const QString& secondaryId) = 0;
324 
334  virtual IEditorPart::Pointer GetActiveEditor() = 0;
335 
344  virtual IEditorPart::Pointer FindEditor(IEditorInput::Pointer input) = 0;
345 
366  virtual QList<IEditorReference::Pointer> FindEditors(IEditorInput::Pointer input, const QString& editorId,
367  int matchFlags) = 0;
368 
380  virtual QList<IEditorPart::Pointer> GetEditors() = 0;
381 
391  virtual QList<IEditorReference::Pointer> GetEditorReferences() = 0;
392 
398  virtual QList<IEditorPart::Pointer> GetDirtyEditors() = 0;
399 
405  virtual IAdaptable* GetInput() = 0;
406 
413  virtual QString GetLabel() = 0;
414 
423  virtual IPerspectiveDescriptor::Pointer GetPerspective() = 0;
424 
434  virtual QList<IViewReference::Pointer> GetViewReferences() = 0;
435 
447  virtual QList<IViewPart::Pointer> GetViews() = 0;
448 
454  virtual IWorkbenchWindow::Pointer GetWorkbenchWindow() const = 0;
455 
462  virtual void HideView(IViewPart::Pointer view) = 0;
463 
470  virtual void HideView(IViewReference::Pointer view) = 0;
471 
475  //virtual bool HasView(const QString& perspectiveId, const QString& viewId) = 0;
476 
484  virtual bool IsPartVisible(IWorkbenchPart::Pointer part) = 0;
485 
492  //virtual void RemovePerspective(IPerspectiveDescriptor::Pointer desc) = 0;
493 
502  virtual void ReuseEditor(IReusableEditor::Pointer editor, IEditorInput::Pointer input) = 0;
503 
533  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString& editorId) = 0;
534 
559  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input, const QString& editorId,
560  bool activate) = 0;
561 
592  virtual IEditorPart::Pointer OpenEditor(IEditorInput::Pointer input,
593  const QString& editorId, bool activate, int matchFlags) = 0;
594 
601  //virtual void removePropertyChangeListener(IPropertyChangeListener listener);
602 
613  virtual void ResetPerspective() = 0;
614 
634  virtual bool SaveAllEditors(bool confirm) = 0;
635 
656  virtual bool SaveEditor(IEditorPart::Pointer editor, bool confirm) = 0;
657 
663  virtual void SavePerspective() = 0;
664 
674  virtual void SavePerspectiveAs(IPerspectiveDescriptor::Pointer perspective) = 0;
675 
676 
710  virtual void SetPerspective(IPerspectiveDescriptor::Pointer perspective) = 0;
711 
723  virtual IViewPart::Pointer ShowView(const QString& viewId) = 0;
724 
754  virtual IViewPart::Pointer ShowView(const QString& viewId, const QString& secondaryId, int mode) = 0;
755 
764  virtual bool IsEditorPinned(IEditorPart::Pointer editor) = 0;
765 
773  virtual QList<QString> GetPerspectiveShortcuts() = 0;
774 
782  virtual QList<QString> GetShowViewShortcuts() = 0;
783 
790  virtual QList<IPerspectiveDescriptor::Pointer> GetOpenPerspectives() = 0;
791 
798  virtual QList<IPerspectiveDescriptor::Pointer> GetSortedPerspectives() = 0;
799 
809  //virtual void CloseCurrentPerspective(bool saveParts, bool closePage) = 0;
810 
826  virtual void ClosePerspective(IPerspectiveDescriptor::Pointer desc,
827  bool saveParts, bool closePage) = 0;
828 
840  virtual void CloseAllPerspectives(bool saveEditors, bool closePage) = 0;
841 
855  virtual IExtensionTracker* GetExtensionTracker() const = 0;
856 
866  virtual IWorkbenchPartReference::Pointer GetReference(IWorkbenchPart::Pointer part) = 0;
867 };
868 
869 } // namespace berry
870 
871 #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:78
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:37
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