Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::PlatformUI Class Reference

#include <berryPlatformUI.h>

Static Public Member Functions

static QString PLUGIN_ID ()
 
static int CreateAndRunWorkbench (Display *display, WorkbenchAdvisor *advisor)
 
static DisplayCreateDisplay ()
 
static IWorkbenchGetWorkbench ()
 
static bool IsWorkbenchRunning ()
 
static TestableObject::Pointer GetTestableObject ()
 

Static Public Attributes

static const QString XP_WORKBENCH
 
static const QString XP_VIEWS
 
static const int RETURN_OK
 
static const int RETURN_RESTART
 
static const int RETURN_UNSTARTABLE
 
static const int RETURN_EMERGENCY_CLOSE
 

Detailed Description

The central class for access to the BlueBerry Platform User Interface. This class cannot be instantiated; all functionality is provided by static methods.

Features provided:

  • creation of the workbench.
  • access to the workbench.
See also
IWorkbench

Definition at line 44 of file berryPlatformUI.h.

Member Function Documentation

int berry::PlatformUI::CreateAndRunWorkbench ( Display display,
WorkbenchAdvisor advisor 
)
static

Creates the workbench and associates it with the given display and workbench advisor, and runs the workbench UI. This entails processing and dispatching events until the workbench is closed or restarted.

This method is intended to be called by the main class (the "application"). Fails if the workbench UI has already been created.

Use createDisplay to create the display to pass in.

Note that this method is intended to be called by the application (org.blueberry.core.boot.IPlatformRunnable). It must be called exactly once, and early on before anyone else asks getWorkbench() for the workbench.

Parameters
displaythe display to be used for all UI interactions with the workbench
advisorthe application-specific advisor that configures and specializes the workbench
Returns
return code RETURN_OK for normal exit; RETURN_RESTART if the workbench was terminated with a call to IWorkbench.restart; RETURN_UNSTARTABLE if the workbench could not be started; RETURN_EMERGENCY_CLOSE if the UI quit because of an emergency; other values reserved for future use

Definition at line 40 of file berryPlatformUI.cpp.

Referenced by QmitkDiffusionImagingAppApplication::Start().

Display * berry::PlatformUI::CreateDisplay ( )
static

Creates the Display to be used by the workbench. It is the caller's responsibility to dispose the resulting Display, not the workbench's.

Returns
the display

Definition at line 45 of file berryPlatformUI.cpp.

Referenced by QmitkDiffusionImagingAppApplication::Start().

TestableObject::Pointer berry::PlatformUI::GetTestableObject ( )
static

Returns the testable object facade, for use by the test harness.

IMPORTANT: This method is only for use by the test harness. Applications and regular plug-ins should not call this method.

Returns
the testable object facade
Since
3.0

Definition at line 69 of file berryPlatformUI.cpp.

bool berry::PlatformUI::IsWorkbenchRunning ( )
static

Returns whether createAndRunWorkbench has been called to create the workbench, and the workbench has yet to terminate.

Note that this method may return true while the workbench is still being initialized, so it may not be safe to call workbench API methods even if this method returns true. See bug 49316 for details.

Returns
true if the workbench has been created and is still running, and false if the workbench has not yet been created or has completed
Since
3.0

Definition at line 62 of file berryPlatformUI.cpp.

Referenced by QmitkFunctionalityCoordinator::Stop().

QString berry::PlatformUI::PLUGIN_ID ( )
static

Member Data Documentation

const int berry::PlatformUI::RETURN_EMERGENCY_CLOSE
static

Return code (value 3) indicating that the workbench was terminated with a call to IWorkbenchConfigurer::emergencyClose.

See also
CreateAndRunWorkbench
Since
3.0

Definition at line 86 of file berryPlatformUI.h.

const int berry::PlatformUI::RETURN_OK
static

Return code (value 0) indicating that the workbench terminated normally.

See also
CreateAndRunWorkbench
Since
3.0

Definition at line 58 of file berryPlatformUI.h.

const int berry::PlatformUI::RETURN_RESTART
static

Return code (value 1) indicating that the workbench was terminated with a call to IWorkbench.restart.

See also
CreateAndRunWorkbench
IWorkbench::Restart
Since
3.0

Definition at line 68 of file berryPlatformUI.h.

Referenced by QmitkDiffusionImagingAppApplication::Start().

const int berry::PlatformUI::RETURN_UNSTARTABLE
static

Return code (value 2) indicating that the workbench failed to start.

See also
CreateAndRunWorkbench
IWorkbench::Restart
Since
3.0

Definition at line 77 of file berryPlatformUI.h.

const QString berry::PlatformUI::XP_VIEWS
static

Definition at line 50 of file berryPlatformUI.h.

const QString berry::PlatformUI::XP_WORKBENCH
static

Definition at line 49 of file berryPlatformUI.h.


The documentation for this class was generated from the following files: