Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryActionBarAdvisor.h>
Public Member Functions | |
berryObjectMacro (berry::ActionBarAdvisor) enum FillType | |
~ActionBarAdvisor () | |
ActionBarAdvisor (const SmartPointer< IActionBarConfigurer > &configurer) | |
virtual void | FillActionBars (FillFlags flags) |
virtual bool | SaveState (SmartPointer< IMemento > memento) |
virtual bool | RestoreState (SmartPointer< IMemento > memento) |
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 |
Protected Member Functions | |
virtual SmartPointer< IActionBarConfigurer > | GetActionBarConfigurer () const |
virtual void | MakeActions (IWorkbenchWindow *window) |
virtual void | Register (QAction *action, const QString &id) |
virtual QAction * | GetAction (const QString &id) const |
virtual void | FillMenuBar (IMenuManager *menuBar) |
virtual void | FillToolBar (IToolBarManager *toolBar) |
virtual void | FillStatusLine (IStatusLineManager *statusLine) |
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 |
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 Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
Public base class for configuring the action bars of a workbench window.
An application should declare a subclass of ActionBarAdvisor
and override methods to configure a window's action bars to suit the needs of the particular application.
The following advisor methods are called at strategic points in the workbench's lifecycle (all occur within the dynamic scope of the call to PlatformUI.createAndRunWorkbench):
fillActionBars
- called after WorkbenchWindowAdvisor.preWindowOpen
to configure a window's action bars Definition at line 55 of file berryActionBarAdvisor.h.
berry::ActionBarAdvisor::~ActionBarAdvisor | ( | ) |
Definition at line 29 of file berryActionBarAdvisor.cpp.
berry::ActionBarAdvisor::ActionBarAdvisor | ( | const SmartPointer< IActionBarConfigurer > & | configurer | ) |
Creates a new action bar advisor to configure a workbench window's action bars via the given action bar configurer.
configurer | the action bar configurer |
Definition at line 34 of file berryActionBarAdvisor.cpp.
References berry::SmartPointer< TObjectType >::IsNotNull().
|
inline |
Bit flag for fillActionBars indicating that the operation is not filling the action bars of an actual workbench window, but rather a proxy (used for perspective customization).
Bit flag for fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's menu bar.
Bit flag for fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's cool bar.
Bit flag for fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's status line.
Definition at line 60 of file berryActionBarAdvisor.h.
|
virtual |
Configures the action bars using the given action bar configurer. Under normal circumstances, flags
does not include FILL_PROXY
, meaning this is a request to fill the action bars of the corresponding workbench window; the remaining flags indicate which combination of the menu bar (FILL_MENU_BAR
), the tool bar (FILL_TOOL_BAR
), and the status line (FILL_STATUS_LINE
) are to be filled.
If flags
does include FILL_PROXY
, then this is a request to describe the actions bars of the given workbench window (which will already have been filled); again, the remaining flags indicate which combination of the menu bar, the tool bar, and the status line are to be described. The actions included in the proxy action bars can be the same instances as in the actual window's action bars.
This method is called just after WorkbenchWindowAdvisor#PreWindowOpen(). Clients must not call this method directly (although super calls are okay). The default implementation calls MakeActions
if FILL_PROXY
is specified, then calls FillMenuBar
, FillToolBar
, and FillStatusLine
if the corresponding flags are specified.
Subclasses may override, but it is recommended that they override the methods mentioned above instead.
flags | bit mask composed from the constants FILL_MENU_BAR, FILL_TOOL_BAR, FILL_STATUS_LINE, and FILL_PROXY |
Definition at line 45 of file berryActionBarAdvisor.cpp.
References FillMenuBar(), FillToolBar(), and MakeActions().
|
protectedvirtual |
Fills the menu bar with the main menus for the window.
The default implementation does nothing. Subclasses may override.
menuBar | the menu manager for the menu bar |
Reimplemented in QmitkExtActionBarAdvisor.
Definition at line 82 of file berryActionBarAdvisor.cpp.
Referenced by FillActionBars().
|
protectedvirtual |
Fills the status line with the main status line contributions for the window.
The default implementation does nothing. Subclasses may override.
statusLine | the status line manager |
Definition at line 92 of file berryActionBarAdvisor.cpp.
|
protectedvirtual |
Fills the tool bar with the main toolbars for the window.
The default implementation does nothing. Subclasses may override.
toolBar | the bar manager |
Definition at line 87 of file berryActionBarAdvisor.cpp.
Referenced by FillActionBars().
|
protectedvirtual |
Returns the action with the given id, or null
if not found.
id | the action id |
null
if not found Definition at line 76 of file berryActionBarAdvisor.cpp.
|
protectedvirtual |
Returns the action bar configurer.
Definition at line 40 of file berryActionBarAdvisor.cpp.
|
protectedvirtual |
Instantiates the actions used in the fill methods. Use Register(QAction*) to add it to the list of actions to be disposed when the window is closed.
window | the window containing the action bars |
Reimplemented in QmitkExtActionBarAdvisor.
Definition at line 65 of file berryActionBarAdvisor.cpp.
Referenced by FillActionBars().
|
protectedvirtual |
Adds the given action to the list of actions to be disposed when the window is closed.
action | the action to register, this cannot be null |
id | the unique action id |
Definition at line 70 of file berryActionBarAdvisor.cpp.
|
virtual |
Restores arbitrary application-specific state information for this action bar advisor.
The default implementation simply returns an OK status. Subclasses may extend or override.
memento | the memento from which to restore the advisor's state |
Definition at line 102 of file berryActionBarAdvisor.cpp.
|
virtual |
Saves arbitrary application-specific state information for this action bar advisor.
The default implementation simply returns an OK status. Subclasses may extend or override.
memento | the memento in which to save the advisor's state |
Definition at line 97 of file berryActionBarAdvisor.cpp.