Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Properties | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes
qMRMLLayoutViewFactory Class Reference

#include <Libs/MRML/Widgets/qMRMLLayoutViewFactory.h>

Inheritance diagram for qMRMLLayoutViewFactory:
Inheritance graph
[legend]
Collaboration diagram for qMRMLLayoutViewFactory:
Collaboration graph
[legend]

Public Types

typedef ctkLayoutViewFactory Superclass
 Superclass typedef. More...
 

Properties

QString viewClassName
 

Public Slots

virtual void onNodeAdded (vtkObject *scene, vtkObject *node)
 
virtual void onNodeModified (vtkObject *node)
 
virtual void onNodeRemoved (vtkObject *scene, vtkObject *node)
 
virtual void onSceneModified ()
 
virtual void onViewNodeAdded (vtkMRMLAbstractViewNode *node)
 
virtual void onViewNodeModified (vtkMRMLAbstractViewNode *node)
 
virtual void onViewNodeRemoved (vtkMRMLAbstractViewNode *node)
 
virtual void setMRMLScene (vtkMRMLScene *scene)
 

Signals

void activeViewNodeChanged (vtkMRMLAbstractViewNode *)
 
void viewCreated (QWidget *createdView)
 This signal emitted whenever a new view is created. More...
 

Public Member Functions

virtual vtkRenderer * activeRenderer () const
 
vtkMRMLAbstractViewNodeactiveViewNode () const
 
void beginSetupLayout () override
 
bool isElementSupported (QDomElement layoutElement) const override
 
virtual bool isViewNodeSupported (vtkMRMLAbstractViewNode *viewNode) const
 
Q_INVOKABLE qMRMLLayoutManagerlayoutManager () const
 
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 
 qMRMLLayoutViewFactory (QObject *parent=nullptr)
 Constructors. More...
 
void setActiveViewNode (vtkMRMLAbstractViewNode *viewNode)
 
Q_INVOKABLE void setLayoutManager (qMRMLLayoutManager *)
 
virtual QString viewClassName () const
 
Q_INVOKABLE int viewCount () const
 
vtkMRMLAbstractViewNodeviewNode (QWidget *widget) const
 
QStringList viewNodeNames () const
 Return all the names of the created view nodes. More...
 
Q_INVOKABLE QWidget * viewWidget (int id) const
 
Q_INVOKABLE QWidget * viewWidget (vtkMRMLAbstractViewNode *node) const
 
Q_INVOKABLE QWidget * viewWidget (const QString &name) const
 
Q_INVOKABLE QWidget * viewWidgetByLayoutLabel (const QString &layoutLabel) const
 
 ~qMRMLLayoutViewFactory () override
 

Protected Member Functions

virtual QWidget * createViewFromNode (vtkMRMLAbstractViewNode *node)
 
QWidget * createViewFromXML (QDomElement layoutElement) override
 
QList< QWidget * > createViewsFromXML (QDomElement layoutElement) override
 Reimplemented to support. More...
 
virtual void deleteView (vtkMRMLAbstractViewNode *node)
 
void setupView (QDomElement viewElement, QWidget *view) override
 
virtual vtkMRMLAbstractViewNodeviewNodeFromXML (QDomElement viewElement) const
 
virtual QList< vtkMRMLAbstractViewNode * > viewNodesFromXML (QDomElement viewElement) const
 

Protected Attributes

QScopedPointer< qMRMLLayoutViewFactoryPrivate > d_ptr
 

Detailed Description

Definition at line 44 of file qMRMLLayoutViewFactory.h.

Member Typedef Documentation

◆ Superclass

typedef ctkLayoutViewFactory qMRMLLayoutViewFactory::Superclass

Superclass typedef.

Definition at line 52 of file qMRMLLayoutViewFactory.h.

Property Documentation

◆ viewClassName

QString qMRMLLayoutViewFactory::viewClassName
read

This property controls the class name of the view nodes that are supported by the factory. The accessor MUST BE reimplemented in the derived class.

See also
viewClassName(), isElementSupported, isViewNodeSupported

Definition at line 52 of file qMRMLLayoutViewFactory.h.

Constructor & Destructor Documentation

◆ qMRMLLayoutViewFactory()

qMRMLLayoutViewFactory::qMRMLLayoutViewFactory ( QObject *  parent = nullptr)
explicit

Constructors.

◆ ~qMRMLLayoutViewFactory()

qMRMLLayoutViewFactory::~qMRMLLayoutViewFactory ( )
override

Member Function Documentation

◆ activeRenderer()

virtual vtkRenderer* qMRMLLayoutViewFactory::activeRenderer ( ) const
virtual

◆ activeViewNode()

vtkMRMLAbstractViewNode* qMRMLLayoutViewFactory::activeViewNode ( ) const

◆ activeViewNodeChanged

void qMRMLLayoutViewFactory::activeViewNodeChanged ( vtkMRMLAbstractViewNode )
signal

This signal is emitted when the active view node changed.

See also
setActiveViewNode()

◆ beginSetupLayout()

void qMRMLLayoutViewFactory::beginSetupLayout ( )
override

◆ createViewFromNode()

virtual QWidget* qMRMLLayoutViewFactory::createViewFromNode ( vtkMRMLAbstractViewNode node)
protectedvirtual

Instantiate a QWidget for a given abstract view node. To be reimplemented

See also
createViewFromXML

◆ createViewFromXML()

QWidget* qMRMLLayoutViewFactory::createViewFromXML ( QDomElement  layoutElement)
overrideprotected

Reimplemented to search view node matching QDomElement.

See also
viewFromXML(), createViewFromNode()

◆ createViewsFromXML()

QList<QWidget*> qMRMLLayoutViewFactory::createViewsFromXML ( QDomElement  layoutElement)
overrideprotected

Reimplemented to support.

◆ deleteView()

virtual void qMRMLLayoutViewFactory::deleteView ( vtkMRMLAbstractViewNode node)
protectedvirtual

◆ isElementSupported()

bool qMRMLLayoutViewFactory::isElementSupported ( QDomElement  layoutElement) const
override

Returns true if the layoutElement matches the viewClassName

See also
viewClassName, isViewNodeSupported()

◆ isViewNodeSupported()

virtual bool qMRMLLayoutViewFactory::isViewNodeSupported ( vtkMRMLAbstractViewNode viewNode) const
virtual

Returns true if the viewNode matches the viewClassName.

See also
viewClassName, isElementSupported()

◆ layoutManager()

Q_INVOKABLE qMRMLLayoutManager* qMRMLLayoutViewFactory::layoutManager ( ) const

Return the layout manager. It means the view factory can only be used in one layout manager.

See also
setLayoutManager()

◆ mrmlScene()

Q_INVOKABLE vtkMRMLScene* qMRMLLayoutViewFactory::mrmlScene ( ) const

Return the mrml scene that was set.

See also
setMRMLScene()

◆ onNodeAdded

virtual void qMRMLLayoutViewFactory::onNodeAdded ( vtkObject *  scene,
vtkObject *  node 
)
virtualslot

◆ onNodeModified

virtual void qMRMLLayoutViewFactory::onNodeModified ( vtkObject *  node)
virtualslot

◆ onNodeRemoved

virtual void qMRMLLayoutViewFactory::onNodeRemoved ( vtkObject *  scene,
vtkObject *  node 
)
virtualslot

◆ onSceneModified

virtual void qMRMLLayoutViewFactory::onSceneModified ( )
virtualslot

Populate widgets from the scene. The widgets will then be used by viewFromXML()

See also
viewFromXML()

◆ onViewNodeAdded

virtual void qMRMLLayoutViewFactory::onViewNodeAdded ( vtkMRMLAbstractViewNode node)
virtualslot

◆ onViewNodeModified

virtual void qMRMLLayoutViewFactory::onViewNodeModified ( vtkMRMLAbstractViewNode node)
virtualslot

◆ onViewNodeRemoved

virtual void qMRMLLayoutViewFactory::onViewNodeRemoved ( vtkMRMLAbstractViewNode node)
virtualslot

◆ setActiveViewNode()

void qMRMLLayoutViewFactory::setActiveViewNode ( vtkMRMLAbstractViewNode viewNode)

◆ setLayoutManager()

Q_INVOKABLE void qMRMLLayoutViewFactory::setLayoutManager ( qMRMLLayoutManager )

Set the layout manager

See also
layoutManager

◆ setMRMLScene

virtual void qMRMLLayoutViewFactory::setMRMLScene ( vtkMRMLScene scene)
virtualslot

Set the MRML scene to the factory and all the created views that are of type qMRMLWidget. Can be reimplemented if the view is not a qMRMLWidget.

See also
mrmlScene()

◆ setupView()

void qMRMLLayoutViewFactory::setupView ( QDomElement  viewElement,
QWidget *  view 
)
overrideprotected

◆ viewClassName()

virtual QString qMRMLLayoutViewFactory::viewClassName ( ) const
virtual

Returns the viewClassName property value. Returns QString() by default.

Note
To be reimplemented in derived classes.
See also
viewClassName

◆ viewCount()

Q_INVOKABLE int qMRMLLayoutViewFactory::viewCount ( ) const

◆ viewCreated

void qMRMLLayoutViewFactory::viewCreated ( QWidget *  createdView)
signal

This signal emitted whenever a new view is created.

◆ viewNode()

vtkMRMLAbstractViewNode* qMRMLLayoutViewFactory::viewNode ( QWidget *  widget) const

◆ viewNodeFromXML()

virtual vtkMRMLAbstractViewNode* qMRMLLayoutViewFactory::viewNodeFromXML ( QDomElement  viewElement) const
protectedvirtual

◆ viewNodeNames()

QStringList qMRMLLayoutViewFactory::viewNodeNames ( ) const

Return all the names of the created view nodes.

◆ viewNodesFromXML()

virtual QList<vtkMRMLAbstractViewNode*> qMRMLLayoutViewFactory::viewNodesFromXML ( QDomElement  viewElement) const
protectedvirtual

◆ viewWidget() [1/3]

Q_INVOKABLE QWidget* qMRMLLayoutViewFactory::viewWidget ( int  id) const

◆ viewWidget() [2/3]

Q_INVOKABLE QWidget* qMRMLLayoutViewFactory::viewWidget ( vtkMRMLAbstractViewNode node) const

◆ viewWidget() [3/3]

Q_INVOKABLE QWidget* qMRMLLayoutViewFactory::viewWidget ( const QString &  name) const

◆ viewWidgetByLayoutLabel()

Q_INVOKABLE QWidget* qMRMLLayoutViewFactory::viewWidgetByLayoutLabel ( const QString &  layoutLabel) const

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLLayoutViewFactoryPrivate> qMRMLLayoutViewFactory::d_ptr
protected

Definition at line 133 of file qMRMLLayoutViewFactory.h.


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