Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryContributionItemFactory.h>
Public Member Functions | |
virtual SmartPointer< IContributionItem > | Create (IWorkbenchWindow *window)=0 |
QString | GetId () const |
Static Public Attributes | |
static const QScopedPointer< ContributionItemFactory > | OPEN_WINDOWS |
static const QScopedPointer< ContributionItemFactory > | VIEWS_SHORTLIST |
static const QScopedPointer< ContributionItemFactory > | REOPEN_EDITORS |
static const QScopedPointer< ContributionItemFactory > | PERSPECTIVES_SHORTLIST |
Protected Member Functions | |
ContributionItemFactory (const QString &contributionItemId) | |
Access to standard contribution items provided by the workbench.
Most of the functionality of this class is provided by static methods and fields. Example usage:
MenuManager menu = ...; IContributionItem::Pointer reEdit = ContributionItemFactory::REOPEN_EDITORS->Create(window); menu->Add(reEdit);
Clients may declare subclasses that provide additional application-specific contribution item factories.
Definition at line 49 of file berryContributionItemFactory.h.
|
protected |
Creates a new workbench contribution item factory with the given id.
contributionItemId | the id of contribution items created by this factory |
Definition at line 30 of file berryContributionItemFactory.cpp.
|
pure virtual |
Creates a new standard contribution item for the given workbench window.
A typical contribution item automatically registers listeners against the workbench window so that it can keep its enablement state up to date. Ordinarily, the window's references to these listeners will be dropped automatically when the window closes. However, if the client needs to get rid of a contribution item while the window is still open, the client must call IContributionItem::dispose to give the item an opportunity to deregister its listeners and to perform any other cleanup.
window | the workbench window |
QString berry::ContributionItemFactory::GetId | ( | ) | const |
Returns the id of this contribution item factory.
Definition at line 34 of file berryContributionItemFactory.cpp.
|
static |
Workbench contribution item (id "openWindows"): A list of windows currently open in the workbench. Selecting one of the items makes the corresponding window the active window. This action dynamically maintains the list of windows.
Definition at line 100 of file berryContributionItemFactory.h.
|
static |
Workbench contribution item (id "perspectivesShortlist"): A list of perspectives available to be opened, arranged as a shortlist of promising perspectives and an "Other" subitem. Selecting one of the items makes the corresponding perspective active. Should a new perspective need to be opened, a workbench user preference controls whether the prespective is opened in the active window or a new window. This action dynamically maintains the perspectives shortlist.
Definition at line 128 of file berryContributionItemFactory.h.
|
static |
Workbench contribution item (id "reopenEditors"): A list of recent editors (with inputs) available to be reopened in the window. Selecting one of the items reopens the corresponding editor on its input in the active window. This action dynamically maintains the list of editors.
Definition at line 117 of file berryContributionItemFactory.h.
|
static |
Workbench contribution item (id "viewsShortlist"): A list of views available to be opened in the window, arranged as a shortlist of promising views and an "Other" subitem. Selecting one of the items opens the corresponding view in the active window. This action dynamically maintains the view shortlist.
Definition at line 109 of file berryContributionItemFactory.h.