Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
A convenient base class for MITK related BlueBerry Views. More...
#include <QmitkAbstractView.h>
Public Types | |
enum | IRenderWindowPartStrategy { NONE, BRING_TO_FRONT, ACTIVATE, OPEN } |
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 |
Public Member Functions | |
berryObjectMacro (QmitkAbstractView) | |
QmitkAbstractView () | |
virtual | ~QmitkAbstractView () |
Public Member Functions inherited from berry::QtViewPart | |
berryObjectMacro (QtViewPart) void CreatePartControl(QWidget *parent) override | |
Public Member Functions inherited from berry::ViewPart | |
IViewSite::Pointer | GetViewSite () override |
Public Member Functions inherited from berry::WorkbenchPart | |
berryObjectMacro (WorkbenchPart, QObject, IWorkbenchPart, IExecutableExtension)~WorkbenchPart() | |
void | AddPropertyListener (IPropertyChangeListener *l) override |
void | RemovePropertyListener (IPropertyChangeListener *l) override |
void | SetPartProperty (const QString &key, const QString &value) override |
QString | GetPartProperty (const QString &key) const override |
const QHash< QString, QString > & | GetPartProperties () const override |
void | SetInitializationData (const IConfigurationElement::Pointer &cfig, const QString &propertyName, const Object::Pointer &data) override |
virtual void | SetFocus () override=0 |
IWorkbenchPartSite::Pointer | GetSite () const override |
QString | GetPartName () const override |
QString | GetContentDescription () const override |
QIcon | GetTitleImage () const override |
QString | GetTitleToolTip () const override |
Public Member Functions inherited from berry::IWorkbenchPart | |
berryObjectMacro (berry::IWorkbenchPart, Object) virtual ~IWorkbenchPart() | |
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 Member Functions inherited from berry::IExecutableExtension | |
virtual | ~IExecutableExtension () |
virtual void | SetInitializationData (const SmartPointer< IConfigurationElement > &config, const QString &propertyName, const Object::Pointer &data)=0 |
Public Member Functions inherited from berry::IViewPart | |
berryObjectMacro (berry::IViewPart, IWorkbenchPart) virtual ~IViewPart() | |
virtual void | Init (IViewSite::Pointer site, IMemento::Pointer memento=IMemento::Pointer(nullptr))=0 |
virtual void | SaveState (IMemento::Pointer memento)=0 |
Protected Member Functions | |
void | FireNodeSelected (mitk::DataNode::Pointer node) |
virtual void | FireNodesSelected (const QList< mitk::DataNode::Pointer > &nodes) |
QList< mitk::DataNode::Pointer > | GetCurrentSelection () const |
bool | IsCurrentSelectionValid () const |
QList< mitk::DataNode::Pointer > | GetDataManagerSelection () const |
bool | IsDataManagerSelectionValid () const |
void | SetDataManagerSelection (const berry::ISelection::ConstPointer &selection, QItemSelectionModel::SelectionFlags flags=QItemSelectionModel::ClearAndSelect) const |
void | SynchronizeDataManagerSelection () const |
berry::IPreferences::Pointer | GetPreferences () const |
mitk::IDataStorageReference::Pointer | GetDataStorageReference () const |
mitk::DataStorage::Pointer | GetDataStorage () const |
mitk::IRenderWindowPart * | GetRenderWindowPart (IRenderWindowPartStrategies strategies=NONE) const |
void | RequestRenderWindowUpdate (mitk::RenderingManager::RequestType requestType=mitk::RenderingManager::REQUEST_UPDATE_ALL) |
void | HandleException (std::exception &e, QWidget *parent=nullptr, bool showDialog=true) const |
void | HandleException (const char *str, QWidget *parent=nullptr, bool showDialog=true) const |
void | WaitCursorOn () |
void | WaitCursorOff () |
void | BusyCursorOn () |
void | BusyCursorOff () |
void | RestoreOverrideCursor () |
Protected Member Functions inherited from berry::QtViewPart | |
virtual void | CreateQtPartControl (QWidget *parent)=0 |
Protected Member Functions inherited from berry::ViewPart | |
ViewPart () | |
void | CheckSite (IWorkbenchPartSite::Pointer site) override |
Protected Member Functions inherited from berry::WorkbenchPart | |
WorkbenchPart () | |
IConfigurationElement::Pointer | GetConfigurationElement () const |
void | SetSite (IWorkbenchPartSite::Pointer site) |
virtual void | SetTitleImage (const QIcon &titleImage) |
virtual void | SetTitleToolTip (const QString &toolTip) |
virtual void | SetPartName (const QString &partName) |
virtual void | SetContentDescription (const QString &description) |
void | FirePropertyChanged (const QString &key, const QString &oldValue, const QString &newValue) |
void | FirePropertyChange (int propertyId) |
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 | |
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 |
A convenient base class for MITK related BlueBerry Views.
QmitkAbstractView provides several convenience methods that ease the introduction of a new view:
Usually all MITK Views inherit from QmitkAbstractView to achieve a consistent Workbench behavior.
When inheriting from QmitkAbstractView, you must implement the following methods:
You may reimplement the following private virtual methods to customize your View's behavior:
You may reimplement the following private virtual methods to be notified about certain changes:
Definition at line 104 of file QmitkAbstractView.h.
QmitkAbstractView::QmitkAbstractView | ( | ) |
Nothing to do in the standard ctor. Initiliaze your GUI in CreateQtPartControl(QWidget*)
Definition at line 189 of file QmitkAbstractView.cpp.
|
virtual |
Disconnects all standard event listeners
Definition at line 267 of file QmitkAbstractView.cpp.
References berry::SmartPointer< TObjectType >::Cast(), GetDataStorage(), GetPreferences(), berry::WorkbenchPart::GetSite(), berry::SmartPointer< TObjectType >::IsNotNull(), berry::Object::Register(), berry::ISelectionService::RemovePostSelectionListener(), and berry::Object::UnRegister().
QmitkAbstractView::berryObjectMacro | ( | QmitkAbstractView | ) |
Creates smartpointer typedefs
|
protected |
Convenient method to restore the standard cursor
Definition at line 451 of file QmitkAbstractView.cpp.
References RestoreOverrideCursor().
|
protected |
Convenient method to set and reset a busy cursor
Definition at line 441 of file QmitkAbstractView.cpp.
|
protected |
Informs other parts of the workbench that node is selected via the blueberry selection service.
Definition at line 562 of file QmitkAbstractView.cpp.
References FireNodesSelected().
|
protectedvirtual |
Informs other parts of the workbench that the nodes are selected via the blueberry selection service.
Definition at line 569 of file QmitkAbstractView.cpp.
References MITK_WARN.
Referenced by FireNodeSelected().
|
protected |
Definition at line 494 of file QmitkAbstractView.cpp.
References berry::SmartPointer< TObjectType >::Cast(), and berry::WorkbenchPart::GetSite().
Referenced by QmitkDataManagerView::ContextMenuActionTriggered(), QmitkDataManagerView::NodeSelectionChanged(), QmitkDataManagerView::NodeTableViewContextMenuRequested(), QmitkDataManagerView::ReinitSelectedNodes(), QmitkDataManagerView::ShowInfoDialogForSelectedNodes(), QmitkDataManagerView::ShowOnlySelectedNodes(), and QmitkDataManagerView::ToggleVisibilityOfSelectedNodes().
|
protected |
Returns the current selection made in the datamanager bundle or an empty list if there is no selection or if it is empty.
Definition at line 506 of file QmitkAbstractView.cpp.
References berry::SmartPointer< TObjectType >::Cast(), and berry::WorkbenchPart::GetSite().
|
protected |
Returns the currently active DataStorage.
Definition at line 470 of file QmitkAbstractView.cpp.
References mitk::IDataStorageService::GetDataStorage().
Referenced by QmitkDataManagerView::ContextMenuActionTriggered(), QmitkDataManagerView::CreateQtPartControl(), QmitkDataManagerView::GlobalReinit(), QmitkDataManagerView::RemoveSelectedNodes(), and ~QmitkAbstractView().
|
protected |
Returns a reference to the currently active DataStorage.
Definition at line 482 of file QmitkAbstractView.cpp.
References mitk::IDataStorageService::GetDataStorage().
Referenced by GetRenderWindowPart(), and QmitkDataManagerView::ShowIn().
|
protected |
Returns the Preferences object for this View. Important: When refering to this preferences, e.g. in a PreferencePage: The ID for this preferences object is "/<VIEW-ID>", e.g. "/org.mitk.views.datamanager"
Definition at line 461 of file QmitkAbstractView.cpp.
References berry::IPreferencesService::GetSystemPreferences().
Referenced by ~QmitkAbstractView().
|
protected |
Returns the currently active mitk::IRenderWindowPart.
strategies | Strategies for returning a mitk::IRenderWindowPart instance if there is currently no active one. |
Definition at line 325 of file QmitkAbstractView.cpp.
References ACTIVATE, BRING_TO_FRONT, GetDataStorageReference(), berry::SmartPointer< TObjectType >::GetPointer(), berry::WorkbenchPart::GetSite(), NONE, OPEN, and mitk::WorkbenchUtil::OpenEditor().
Referenced by QmitkDataManagerView::GlobalReinit(), QmitkDataManagerView::ReinitSelectedNodes(), and RequestRenderWindowUpdate().
|
protected |
Outputs an error message to the console and displays a message box containing the exception description.
e | the exception which should be handled |
showDialog | controls, whether additionally a message box should be displayed to inform the user that something went wrong |
Definition at line 431 of file QmitkAbstractView.cpp.
|
protected |
Calls HandleException ( std::exception&, QWidget*, bool ) internally
Definition at line 421 of file QmitkAbstractView.cpp.
References MITK_ERROR.
|
protected |
Queries the state of the current selection.
NULL
, this method returns false
and true
otherwise. Definition at line 501 of file QmitkAbstractView.cpp.
References berry::WorkbenchPart::GetSite().
|
protected |
Queries the state of the current selection of the data manager view.
NULL
, this method returns false
and true
otherwise. Definition at line 513 of file QmitkAbstractView.cpp.
References berry::WorkbenchPart::GetSite().
|
protected |
Request an update of all render windows of the currently active IRenderWindowPart.
requestType | Specifies the type of render windows for which an update will be requested. |
Definition at line 406 of file QmitkAbstractView.cpp.
References mitk::IRenderWindowPart::GetRenderingManager(), GetRenderWindowPart(), and mitk::IRenderWindowPart::RequestUpdate().
|
protected |
Convenient method to restore the standard cursor
Definition at line 456 of file QmitkAbstractView.cpp.
Referenced by BusyCursorOff(), and WaitCursorOff().
|
protected |
Sets the selection of the data manager view if available.
selection | The new selection for the data manager. |
flags | The Qt selection flags for controlling the way how the selection is updated. |
Definition at line 518 of file QmitkAbstractView.cpp.
References berry::SmartPointer< TObjectType >::Cast(), berry::WorkbenchPart::GetSite(), and berry::SmartPointer< TObjectType >::IsNull().
Referenced by SynchronizeDataManagerSelection().
|
protected |
Takes the current selection and sets it on the data manager. Only matching nodes in the data manager view will be selected.
Definition at line 527 of file QmitkAbstractView.cpp.
References berry::WorkbenchPart::GetSite(), berry::SmartPointer< TObjectType >::IsNull(), and SetDataManagerSelection().
|
protected |
Convenient method to restore the standard cursor
Definition at line 446 of file QmitkAbstractView.cpp.
References RestoreOverrideCursor().
|
protected |
Convenient method to set and reset a wait cursor ("hourglass")
Definition at line 436 of file QmitkAbstractView.cpp.