Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryIWorkbench.h>
Public Member Functions | |
berryObjectMacro (berry::IWorkbench) virtual ~IWorkbench() | |
virtual Display * | GetDisplay () const =0 |
virtual void | AddWorkbenchListener (IWorkbenchListener *listener)=0 |
virtual void | RemoveWorkbenchListener (IWorkbenchListener *listener)=0 |
virtual IWorkbenchListener::Events & | GetWorkbenchEvents ()=0 |
virtual void | AddWindowListener (IWindowListener *listener)=0 |
virtual void | RemoveWindowListener (IWindowListener *listener)=0 |
virtual IWindowListener::Events & | GetWindowEvents ()=0 |
virtual bool | Close ()=0 |
virtual IWorkbenchWindow::Pointer | GetActiveWorkbenchWindow () const =0 |
virtual IExtensionTracker * | GetExtensionTracker () const =0 |
virtual IPerspectiveRegistry * | GetPerspectiveRegistry () const =0 |
virtual IViewRegistry * | GetViewRegistry () const =0 |
virtual IEditorRegistry * | GetEditorRegistry () const =0 |
virtual std::vcl_size_t | GetWorkbenchWindowCount () const =0 |
virtual QList< IWorkbenchWindow::Pointer > | GetWorkbenchWindows () const =0 |
virtual IWorkbenchWindow::Pointer | OpenWorkbenchWindow (const QString &perspectiveId, IAdaptable *input)=0 |
virtual IWorkbenchWindow::Pointer | OpenWorkbenchWindow (IAdaptable *input)=0 |
virtual SmartPointer< IWorkbenchPage > | ShowPerspective (const QString &perspectiveId, IWorkbenchWindow::Pointer window)=0 |
virtual SmartPointer< IWorkbenchPage > | ShowPerspective (const QString &perspectiveId, IWorkbenchWindow::Pointer window, IAdaptable *input)=0 |
virtual bool | SaveAllEditors (bool confirm)=0 |
virtual IElementFactory * | GetElementFactory (const QString &factoryId) const =0 |
virtual IIntroManager * | GetIntroManager () const =0 |
virtual bool | IsClosing () const =0 |
virtual void | UpdateTheme ()=0 |
Public Member Functions inherited from berry::IServiceLocator | |
berryObjectMacro (berry::IServiceLocator, Object)~IServiceLocator() | |
template<class S > | |
S * | GetService () |
template<class S > | |
bool | HasService () const |
virtual Object * | GetService (const QString &api)=0 |
virtual bool | HasService (const QString &api) const =0 |
Public Member Functions inherited from berry::Object | |
virtual QString | GetClassName () const |
virtual Reflection::TypeInfo | GetTypeInfo () const |
virtual QList< Reflection::TypeInfo > | GetSuperclasses () const |
virtual void | Delete () |
QDebug | Print (QDebug os, Indent Indent=0) const |
virtual QString | ToString () const |
virtual uint | HashCode () const |
virtual bool | operator< (const Object *) const |
void | Register () const |
void | UnRegister (bool del=true) const |
int | GetReferenceCount () const |
void | SetReferenceCount (int) |
void | AddDestroyListener (const MessageAbstractDelegate<> &delegate) const |
void | RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const |
virtual bool | operator== (const Object *) const |
Additional Inherited Members | |
Public Types inherited from berry::Object | |
typedef Object | Self |
typedef berry::SmartPointer< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Static Public Member Functions inherited from berry::Object | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
Protected Member Functions inherited from berry::Object | |
Object () | |
virtual | ~Object () |
virtual QDebug | PrintSelf (QDebug os, Indent indent) const |
virtual QDebug | PrintHeader (QDebug os, Indent indent) const |
virtual QDebug | PrintTrailer (QDebug os, Indent indent) const |
Protected Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
A workbench is the root object for the BlueBerry Platform user interface.
A workbench has one or more main windows which present to the end user information based on some underlying model, typically on resources in an underlying workspace. A workbench usually starts with a single open window, and automatically closes when its last window closes.
Each workbench window has a collection of pages; the active page is the one that is being presented to the end user; at most one page is active in a window at a time.
Each workbench page has a collection of workbench parts, of which there are two kinds: views and editors. A page's parts are arranged (tiled or stacked) for presentation on the screen. The arrangement is not fixed; the user can arrange the parts as they see fit. A perspective is a template for a page, capturing a collection of parts and their arrangement.
The platform creates a workbench when the workbench plug-in is activated; since this happens at most once during the life of the running platform, there is only one workbench instance. Due to its singular nature, it is commonly referred to as <it>the</it> workbench.
The workbench supports a few services by default. If these services are used to allocate resources, it is important to remember to clean up those resources after you are done with them. Otherwise, the resources will exist until the workbench shuts down. The supported services are:
This interface is not intended to be implemented by clients.
Definition at line 86 of file berryIWorkbench.h.
|
pure virtual |
Adds a window listener.
listener | the window listener to add |
Referenced by QmitkFunctionalityCoordinator::Start().
|
pure virtual |
Adds a workbench listener.
listener | the workbench listener to add |
berry::IWorkbench::berryObjectMacro | ( | berry::IWorkbench | ) |
|
pure virtual |
Closes this workbench and all its open windows.
If the workbench has an open editor with unsaved content, the user will be given the opportunity to save it.
true
if the workbench was successfully closed, and false
if it is still open Referenced by QmitkFileExitAction::Run().
|
pure virtual |
Returns the currently active window for this workbench (if any). Returns null
if there is no active workbench window. Returns null
if called from a non-UI thread.
null
if there is no active workbench window or if called from a non-UI thread Referenced by QmitkViewNavigatorWidget::CloseAllPerspectives(), QmitkViewNavigatorWidget::ItemClicked(), QmitkViewNavigatorWidget::ResetCurrentPerspective(), and SafeHandleNavigatorView().
|
pure virtual |
Returns the display for this workbench.
Code should always ask the workbench for the display rather than rely on Display.getDefault().
Referenced by berry::UITestApplication::Stop().
|
pure virtual |
Returns the editor registry for the workbench.
Referenced by QmitkDataManagerView::CreateQtPartControl(), mitk::WorkbenchUtil::GetDefaultEditor(), and mitk::WorkbenchUtil::GetEditorDescriptor().
|
pure virtual |
Returns the element factory with the given id. The calles takes ownership of the returned pointer.
factoryId | the id of the element factory |
null
if none
|
pure virtual |
Return the extension tracker for the workbench. This tracker may be used by plug-ins to ensure responsiveness to changes to the plug-in registry.
The tracker at this level of the workbench is typically used to track elements that persist for the life of the workbench. For example, IEditorDescriptor
objects fall into this category.
|
pure virtual |
Return the intro manager for this workbench.
null
.
|
pure virtual |
Returns the perspective registry for the workbench.
Referenced by QmitkViewNavigatorWidget::FillTreeList().
|
pure virtual |
Returns the view registry for the workbench.
Referenced by QmitkViewNavigatorWidget::FillTreeList(), and QmitkExtWorkbenchWindowAdvisor::PostWindowCreate().
|
pure virtual |
Returns the window events object
|
pure virtual |
Returns the workbench events object
|
pure virtual |
Returns the number of open main windows associated with this workbench. Note that wizards and dialogs are not included in this list since they are not considered main windows.
|
pure virtual |
Returns a list of the open main windows associated with this workbench. Note that wizards and dialogs are not included in this list since they are not considered main windows.
|
pure virtual |
Returns a boolean indicating whether the workbench is in the process of closing.
true
if the workbench is in the process of closing, false
otherwise
|
pure virtual |
Creates and opens a new workbench window with one page. The perspective of the new page is defined by the specified perspective ID. The new window and new page become active.
Note: The caller is responsible to ensure the action using this method will explicitly inform the user a new window will be opened. Otherwise, callers are strongly recommended to use the openPerspective
APIs to programmatically show a perspective to avoid confusing the user.
In most cases where this method is used the caller is tightly coupled to a particular perspective. They define it in the registry and contribute some user interface action to open or activate it. In situations like this a static variable is often used to identify the perspective ID.
perspectiveId | the perspective id for the window's initial page, or null for no initial page |
input | the page input, or null if there is no current input. This is used to seed the input for the new page's views. |
WorkbenchException | if a new window and page could not be opened |
Referenced by berry::UITestCase::OpenTestWindow().
|
pure virtual |
Creates and opens a new workbench window with one page. The perspective of the new page is defined by the default perspective ID. The new window and new page become active.
Note: The caller is responsible to ensure the action using this method will explicitly inform the user a new window will be opened. Otherwise, callers are strongly recommended to use the openPerspective
APIs to programmatically show a perspective to avoid confusing the user.
input | the page input, or null if there is no current input. This is used to seed the input for the new page's views. |
WorkbenchException | if a new window and page could not be opened |
|
pure virtual |
Removes a window listener.
listener | the window listener to remove |
Referenced by QmitkViewNavigatorWidget::FillTreeList(), and QmitkFunctionalityCoordinator::Stop().
|
pure virtual |
Removes a workbench listener.
listener | the workbench listener to remove |
|
pure virtual |
Save all dirty editors in the workbench. Opens a dialog to prompt the user if confirm
is true. Return true if successful. Return false if the user has canceled the command.
confirm | true to ask the user before saving unsaved changes (recommended), and false to save unsaved changes without asking |
true
if the command succeeded, and false
if the operation was canceled by the user or an error occurred while saving
|
pure virtual |
Shows the specified perspective to the user. The caller should use this method when the perspective to be shown is not dependent on the page's input. That is, the perspective can open in any page depending on user preferences.
The perspective may be shown in the specified window, in another existing window, or in a new window depending on user preferences. The exact policy is controlled by the workbench to ensure consistency to the user. The policy is subject to change. The current policy is as follows:
The workbench also defines a number of menu items to activate or open each registered perspective. A complete list of these perspectives is available from the perspective registry found on IWorkbench
.
perspectiveId | the perspective ID to show |
window | the workbench window of the action calling this method. |
WorkbenchException | if the perspective could not be shown |
Referenced by QmitkViewNavigatorWidget::ItemClicked().
|
pure virtual |
Shows the specified perspective to the user. The caller should use this method when the perspective to be shown is dependent on the page's input. That is, the perspective can only open in any page with the specified input.
The perspective may be shown in the specified window, in another existing window, or in a new window depending on user preferences. The exact policy is controlled by the workbench to ensure consistency to the user. The policy is subject to change. The current policy is as follows:
The workbench also defines a number of menu items to activate or open each registered perspective. A complete list of these perspectives is available from the perspective registry found on IWorkbench
.
perspectiveId | the perspective ID to show |
window | the workbench window of the action calling this method. |
input | the page input, or null if there is no current input. This is used to seed the input for the page's views |
WorkbenchException | if the perspective could not be shown |
|
pure virtual |
Applies changes of the current theme to the user interface.