Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
berry::IWorkbenchConfigurer Struct Referenceabstract

#include <berryIWorkbenchConfigurer.h>

Inheritance diagram for berry::IWorkbenchConfigurer:
Collaboration diagram for berry::IWorkbenchConfigurer:

Public Member Functions

 berryObjectMacro (berry::IWorkbenchConfigurer)
 
 ~IWorkbenchConfigurer () override
 
virtual IWorkbenchGetWorkbench ()=0
 
virtual bool GetSaveAndRestore ()=0
 
virtual void SetSaveAndRestore (bool enabled)=0
 
virtual IWorkbenchWindowConfigurer::Pointer RestoreWorkbenchWindow (IMemento::Pointer memento)=0
 
virtual void EmergencyClose ()=0
 
virtual bool EmergencyClosing ()=0
 
virtual IWorkbenchWindowConfigurer::Pointer GetWindowConfigurer (IWorkbenchWindow::Pointer window)=0
 
virtual Object::Pointer GetData (const QString &key) const =0
 
virtual void SetData (const QString &key, Object::Pointer data)=0
 
virtual bool RestoreState ()=0
 
virtual void OpenFirstTimeWindow ()=0
 
virtual bool GetExitOnLastWindowClose ()=0
 
virtual void SetExitOnLastWindowClose (bool enabled)=0
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () 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
 

Static Public Attributes

static const int RESTORE_CODE_RESET
 
static const int RESTORE_CODE_EXIT
 

Additional Inherited Members

- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- 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
 

Detailed Description

Interface providing special access for configuring the workbench.

Note that these objects are only available to the main application (the plug-in that creates and owns the workbench).

This interface is not intended to be implemented by clients.

See also
WorkbenchAdvisor::Initialize()
Note
This interface is not intended to be implemented by clients.

Definition at line 38 of file berryIWorkbenchConfigurer.h.

Constructor & Destructor Documentation

◆ ~IWorkbenchConfigurer()

berry::IWorkbenchConfigurer::~IWorkbenchConfigurer ( )
override

Member Function Documentation

◆ berryObjectMacro()

berry::IWorkbenchConfigurer::berryObjectMacro ( berry::IWorkbenchConfigurer  )

◆ EmergencyClose()

virtual void berry::IWorkbenchConfigurer::EmergencyClose ( )
pure virtual

Forces the workbench to close due to an emergency. This method should only be called when the workbench is in dire straights and cannot continue, and cannot even risk a normal workbench close (think "out of memory" or "unable to create shell"). When this method is called, an abbreviated workbench shutdown sequence is performed (less critical steps may be skipped). The workbench advisor is still called; however, it must not attempt to communicate with the user. While an emergency close is in progress, EmergencyClosing() returns true. Workbench advisor methods should always check this flag before communicating with the user.

See also
EmergencyClosing()

◆ EmergencyClosing()

virtual bool berry::IWorkbenchConfigurer::EmergencyClosing ( )
pure virtual

Returns whether the workbench is being closed due to an emergency. When this method returns true, the workbench is in dire straights and cannot continue. Indeed, things are so bad that we cannot even risk a normal workbench close. Workbench advisor methods should always check this flag before attempting to communicate with the user.

Returns
true if the workbench is in the process of being closed under emergency conditions, and false otherwise

◆ GetData()

virtual Object::Pointer berry::IWorkbenchConfigurer::GetData ( const QString &  key) const
pure virtual

Returns the data associated with the workbench at the given key.

Parameters
keythe key
Returns
the data, or null if there is no data at the given key

◆ GetExitOnLastWindowClose()

virtual bool berry::IWorkbenchConfigurer::GetExitOnLastWindowClose ( )
pure virtual

Returns true if the workbench should exit when the last window is closed, false if the window should just be closed, leaving the workbench (and its event loop) running.

If true, the last window's state is saved before closing, so that it will be restored in the next session. This applies only if GetSaveAndRestore() returns true).

If false, the window is simply closed, losing its state.

If the workbench is left running, it can be closed using IWorkbench::Close(), or a new window can be opened using IWorkbench::OpenWorkbenchWindow(const QString&, IAdaptable*).

The initial value is true.

Returns
true if the workbench will exit when the last window is closed, false if the window should just be closed

◆ GetSaveAndRestore()

virtual bool berry::IWorkbenchConfigurer::GetSaveAndRestore ( )
pure virtual

Returns whether the workbench state should be saved on close and restored on subsequent open.

The initial value is false.

Returns
true to save and restore workbench state, or false to forget current workbench state on close.

◆ GetWindowConfigurer()

virtual IWorkbenchWindowConfigurer::Pointer berry::IWorkbenchConfigurer::GetWindowConfigurer ( IWorkbenchWindow::Pointer  window)
pure virtual

Returns an object that can be used to configure the given window.

Parameters
windowa workbench window
Returns
a workbench window configurer

◆ GetWorkbench()

virtual IWorkbench* berry::IWorkbenchConfigurer::GetWorkbench ( )
pure virtual

Returns the underlying workbench.

Returns
the workbench

◆ OpenFirstTimeWindow()

virtual void berry::IWorkbenchConfigurer::OpenFirstTimeWindow ( )
pure virtual

Opens the first time window, using the default perspective and default page input.

This is typically called from the advisor's WorkbenchAdvisor::OpenWindows() method.

See also
WorkbenchAdvisor::OpenWindows()

◆ RestoreState()

virtual bool berry::IWorkbenchConfigurer::RestoreState ( )
pure virtual

Restores the workbench state saved from the previous session, if any. This includes any open windows and their open perspectives, open views and editors, layout information, and any customizations to the open perspectives.

This is typically called from the advisor's WorkbenchAdvisor::OpenWindows() method.

Returns
a status object indicating whether the restore was successful
See also
RESTORE_CODE_RESET
RESTORE_CODE_EXIT
WorkbenchAdvisor::OpenWindows()

◆ RestoreWorkbenchWindow()

virtual IWorkbenchWindowConfigurer::Pointer berry::IWorkbenchConfigurer::RestoreWorkbenchWindow ( IMemento::Pointer  memento)
pure virtual

Restores a workbench window from the given memento.

Parameters
mementothe memento from which to restore the window's state
Returns
the configurer for the restored window
Exceptions
WorkbenchExceptionif an error occurred during the restore
See also
IWorkbenchWindowConfigurer::SaveState(IMemento::Pointer)

◆ SetData()

virtual void berry::IWorkbenchConfigurer::SetData ( const QString &  key,
Object::Pointer  data 
)
pure virtual

Sets the data associated with the workbench at the given key.

Parameters
keythe key
datathe data, or null to delete existing data

◆ SetExitOnLastWindowClose()

virtual void berry::IWorkbenchConfigurer::SetExitOnLastWindowClose ( bool  enabled)
pure virtual

Sets whether the workbench should exit when the last window is closed, or whether the window should just be closed, leaving the workbench (and its event loop) running.

For more details, see GetExitOnLastWindowClose().

Parameters
enabledtrue if the workbench should exit when the last window is closed, false if the window should just be closed

◆ SetSaveAndRestore()

virtual void berry::IWorkbenchConfigurer::SetSaveAndRestore ( bool  enabled)
pure virtual

Sets whether the workbench state should be saved on close and restored on subsequent open.

Parameters
enabledtrue to save and restore workbench state, or false to forget current workbench state on close.

Member Data Documentation

◆ RESTORE_CODE_EXIT

const int berry::IWorkbenchConfigurer::RESTORE_CODE_EXIT
static

Restore status code indicating that the saved state could not be restored, and that the application must exit immediately without modifying any previously saved workbench state.

Definition at line 60 of file berryIWorkbenchConfigurer.h.

◆ RESTORE_CODE_RESET

const int berry::IWorkbenchConfigurer::RESTORE_CODE_RESET
static

Restore status code indicating that the saved state could not be restored, but that startup should continue with a reset state.

See also
RestoreState()

Definition at line 52 of file berryIWorkbenchConfigurer.h.


The documentation for this struct was generated from the following file: