Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
berry::IMenuManager Struct Referenceabstract

#include <berryIMenuManager.h>

Inheritance diagram for berry::IMenuManager:
Collaboration diagram for berry::IMenuManager:

Public Member Functions

 berryObjectMacro (berry::IMenuManager)
 
virtual void AddMenuListener (QObject *listener)=0
 
virtual IMenuManager::Pointer FindMenuUsingPath (const QString &path) const =0
 
virtual IContributionItem::Pointer FindUsingPath (const QString &path) const =0
 
virtual bool GetRemoveAllWhenShown () const =0
 
bool IsEnabled () const override=0
 
virtual void RemoveMenuListener (QObject *listener)=0
 
virtual void SetRemoveAllWhenShown (bool removeAll)=0
 
virtual void UpdateAll (bool force)=0
 
- Public Member Functions inherited from berry::IContributionManager
 berryObjectMacro (berry::IContributionManager)
 
virtual void Add (QAction *action, const QString &id)=0
 
virtual void Add (const SmartPointer< IContributionItem > &item)=0
 
virtual void AppendToGroup (const QString &groupName, QAction *action, const QString &id)=0
 
virtual void AppendToGroup (const QString &groupName, const SmartPointer< IContributionItem > &item)=0
 
virtual SmartPointer< IContributionItemFind (const QString &id) const =0
 
virtual QList< SmartPointer< IContributionItem > > GetItems () const =0
 
virtual SmartPointer< IContributionManagerOverridesGetOverrides ()=0
 
virtual void InsertAfter (const QString &id, const SmartPointer< IContributionItem > &item)=0
 
virtual void InsertBefore (const QString &id, const SmartPointer< IContributionItem > &item)=0
 
virtual bool IsDirty () const =0
 
virtual bool IsEmpty () const =0
 
virtual void MarkDirty ()=0
 
virtual void PrependToGroup (const QString &groupName, const SmartPointer< IContributionItem > &item)=0
 
virtual SmartPointer< IContributionItemRemove (const QString &id)=0
 
virtual SmartPointer< IContributionItemRemove (const SmartPointer< IContributionItem > &item)=0
 
virtual void RemoveAll ()=0
 
virtual void Update (bool force)=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
 
- Public Member Functions inherited from berry::IContributionItem
 berryObjectMacro (berry::IContributionItem)
 
virtual void Fill (QStatusBar *parent)=0
 
virtual void Fill (QMenuBar *parent, QAction *before)=0
 
virtual void Fill (QMenu *parent, QAction *before)=0
 
virtual void Fill (QToolBar *parent, QAction *before)=0
 
virtual QString GetId () const =0
 
virtual bool IsDirty () const =0
 
virtual bool IsDynamic () const =0
 
virtual bool IsGroupMarker () const =0
 
virtual bool IsSeparator () const =0
 
virtual bool IsVisible () const =0
 
virtual void SaveWidgetState ()=0
 
virtual void SetParent (IContributionManager *parent)=0
 
virtual void SetVisible (bool visible)=0
 
virtual void Update ()=0
 
virtual void Update (const QString &id)=0
 

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

The IMenuManager interface provides protocol for managing contributions to a menu bar and its sub menus. An IMenuManager is also an IContributionItem, allowing sub-menus to be nested in parent menus.

This interface is internal to the framework; it should not be implemented outside the framework.

This package provides a concrete menu manager implementation, MenuManager.

Definition at line 36 of file berryIMenuManager.h.

Member Function Documentation

◆ AddMenuListener()

virtual void berry::IMenuManager::AddMenuListener ( QObject *  listener)
pure virtual

Adds a menu listener to this menu. Has no effect if an identical listener is already registered.

Parameters
listenera menu listener

Implemented in berry::MenuManager.

◆ berryObjectMacro()

berry::IMenuManager::berryObjectMacro ( berry::IMenuManager  )

◆ FindMenuUsingPath()

virtual IMenuManager::Pointer berry::IMenuManager::FindMenuUsingPath ( const QString &  path) const
pure virtual

Finds the manager for the menu at the given path. A path consists of contribution item ids separated by the separator character. The path separator character is '/'.

Convenience for findUsingPath(path) which extracts an IMenuManager if possible.

Parameters
paththe path string
Returns
the menu contribution item, or null if there is no such contribution item or if the item does not have an associated menu manager

Implemented in berry::MenuManager.

◆ FindUsingPath()

virtual IContributionItem::Pointer berry::IMenuManager::FindUsingPath ( const QString &  path) const
pure virtual

Finds the contribution item at the given path. A path consists of contribution item ids separated by the separator character. The path separator character is '/'.

Parameters
paththe path string
Returns
the contribution item, or null if there is no such contribution item

Implemented in berry::MenuManager.

◆ GetRemoveAllWhenShown()

virtual bool berry::IMenuManager::GetRemoveAllWhenShown ( ) const
pure virtual

Returns whether all items should be removed when the menu is about to show, but before notifying menu listeners. The default is false.

Returns
true if all items should be removed when shown, false if not

Implemented in berry::MenuManager.

◆ IsEnabled()

bool berry::IMenuManager::IsEnabled ( ) const
overridepure virtual

Returns whether this menu should be enabled or not.

Returns
true if enabled, and false if disabled

Implements berry::IContributionItem.

Implemented in berry::MenuManager.

◆ RemoveMenuListener()

virtual void berry::IMenuManager::RemoveMenuListener ( QObject *  listener)
pure virtual

Removes the given menu listener from this menu. Has no effect if an identical listener is not registered.

Parameters
listenerthe menu listener

Implemented in berry::MenuManager.

◆ SetRemoveAllWhenShown()

virtual void berry::IMenuManager::SetRemoveAllWhenShown ( bool  removeAll)
pure virtual

Sets whether all items should be removed when the menu is about to show, but before notifying menu listeners.

Parameters
removeAlltrue if all items should be removed when shown, false if not

Implemented in berry::MenuManager.

◆ UpdateAll()

virtual void berry::IMenuManager::UpdateAll ( bool  force)
pure virtual

Incrementally builds the menu from the contribution items, and does so recursively for all submenus.

Parameters
forcetrue means update even if not dirty, and false for normal incremental updating

Implemented in berry::MenuManager.


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