Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryIContributionManager.h>
Public Member Functions | |
berryObjectMacro (berry::IContributionManager) virtual void Add(QAction *action | |
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< IContributionItem > | Find (const QString &id) const =0 |
virtual QList< SmartPointer< IContributionItem > > | GetItems () const =0 |
virtual SmartPointer< IContributionManagerOverrides > | GetOverrides ()=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< IContributionItem > | Remove (const QString &id)=0 |
virtual SmartPointer< IContributionItem > | Remove (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::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 |
Public Attributes | |
const QString & | id |
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 contribution manager organizes contributions to such UI components as menus, toolbars and status lines.
A contribution manager keeps track of a list of contribution items. Each contribution item may has an optional identifier, which can be used to retrieve items from a manager, and for positioning items relative to each other. The list of contribution items can be subdivided into named groups using special contribution items that serve as group markers.
The IContributionManager
interface provides general protocol for adding, removing, and retrieving contribution items. It also provides convenience methods that make it convenient to contribute actions. This interface should be implemented by all objects that wish to manage contributions.
There are several implementions of this interface in this package, including ones for menus (MenuManager
), tool bars (ToolBarManager
), and status lines (StatusLineManager
).
Definition at line 55 of file berryIContributionManager.h.
|
pure virtual |
Adds a contribution item to this manager.
item | the contribution item, this cannot be null |
Implemented in berry::ContributionManager.
Referenced by QmitkExtActionBarAdvisor::FillMenuBar().
|
pure virtual |
Adds a contribution item for the given action at the end of the group with the given name. Equivalent to AppendToGroup(groupName,IContributionItem::Pointer(new QActionContributionItem(action, id)))
.
groupName | the name of the group |
action | the action |
id | the unique action id |
ctkInvalidArgumentException | if there is no group with the given name |
Implemented in berry::ContributionManager.
|
pure virtual |
Adds a contribution item to this manager at the end of the group with the given name.
groupName | the name of the group |
item | the contribution item |
ctkInvalidArgumentException | if there is no group with the given name |
Implemented in berry::ContributionManager.
berry::IContributionManager::berryObjectMacro | ( | berry::IContributionManager | ) |
Adds an action as a contribution item to this manager. Equivalent to Add(IContributionItem::Pointer(new QActionContributionItem(action, id)))
.
action | the action, this cannot be null |
id | the unique action id |
|
pure virtual |
Finds the contribution item with the given id.
id | the contribution item id |
null
if no item with the given id can be found Implemented in berry::ContributionManager.
|
pure virtual |
Returns all contribution items known to this manager.
Implemented in berry::ContributionManager.
|
pure virtual |
Returns the overrides for the items of this manager.
Implemented in berry::MenuManager, and berry::ContributionManager.
Referenced by berry::QActionContributionItem::IsEnabledAllowed().
|
pure virtual |
Inserts a contribution item after the item with the given id.
id | the contribution item id |
item | the contribution item to insert |
IllegalArgumentException | if there is no item with the given id |
Implemented in berry::ContributionManager.
|
pure virtual |
Inserts a contribution item before the item with the given id.
id | the contribution item id |
item | the contribution item to insert |
IllegalArgumentException | if there is no item with the given id |
Implemented in berry::ContributionManager.
|
pure virtual |
Returns whether the list of contributions has recently changed and has yet to be reflected in the corresponding widgets.
true
if this manager is dirty, and false
if it is up-to-date Implemented in berry::ContributionManager, and berry::MenuManager.
|
pure virtual |
Returns whether this manager has any contribution items.
true
if there are no items, and false
otherwise Implemented in berry::ContributionManager.
|
pure virtual |
Marks this contribution manager as dirty.
Implemented in berry::MenuManager, and berry::ContributionManager.
Referenced by berry::MenuManager::MarkDirty().
|
pure virtual |
Adds a contribution item to this manager at the beginning of the group with the given name.
groupName | the name of the group |
item | the contribution item |
IllegalArgumentException | if there is no group with the given name |
Implemented in berry::ContributionManager.
|
pure virtual |
Removes and returns the contribution item with the given id from this manager. Returns null
if this manager has no contribution items with the given id.
id | the contribution item id |
null
if none Implemented in berry::ContributionManager.
|
pure virtual |
Removes the given contribution item from the contribution items known to this manager.
item | the contribution item |
item
parameter if the item was removed, and null
if it was not found Implemented in berry::ContributionManager.
|
pure virtual |
Removes all contribution items from this manager.
Implemented in berry::ContributionManager.
|
pure virtual |
Updates this manager's underlying widget(s) with any changes which have been made to it or its items. Normally changes to a contribution manager merely mark it as dirty, without updating the underlying widgets. This brings the underlying widgets up to date with any changes.
force | true means update even if not dirty, and false for normal incremental updating |
Implemented in berry::MenuManager.
Referenced by berry::CommandContributionItem::UpdateCommandPropertiesInUI().
const QString& berry::IContributionManager::id |
Definition at line 67 of file berryIContributionManager.h.
Referenced by berry::MenuManager::FindUsingPath(), and berry::MenuManager::GetId().