Slicer  4.8
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
qMRMLLayoutManager Class Reference

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

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

Public Types

typedef ctkLayoutFactory Superclass
 Superclass typedef. More...
 

Properties

int chartViewCount
 
bool enabled
 
int layout
 
int plotViewCount
 
int tableViewCount
 
int threeDViewCount
 

Public Slots

void resetSliceViews ()
 
void resetThreeDViews ()
 
void setEnabled (bool enable)
 
void setLayout (int newLayout)
 
void setLayoutNumberOfCompareViewColumns (int num)
 
void setLayoutNumberOfCompareViewRows (int num)
 
void setMRMLScene (vtkMRMLScene *scene)
 

Signals

void activeChartRendererChanged (vtkRenderer *newRenderer)
 
void activeMRMLChartViewNodeChanged (vtkMRMLChartViewNode *newActiveMRMLChartViewNode)
 
void activeMRMLPlotViewNodeChanged (vtkMRMLPlotViewNode *newActiveMRMLPlotViewNode)
 
void activeMRMLTableViewNodeChanged (vtkMRMLTableViewNode *newActiveMRMLChartViewNode)
 
void activeMRMLThreeDViewNodeChanged (vtkMRMLViewNode *newActiveMRMLThreeDViewNode)
 
void activePlotRendererChanged (vtkRenderer *newRenderer)
 
void activeTableRendererChanged (vtkRenderer *newRenderer)
 
void activeThreeDRendererChanged (vtkRenderer *newRenderer)
 
void layoutChanged (int)
 
void nodeAboutToBeEdited (vtkMRMLNode *node)
 Signal emitted when editing of a node is requested from within the layout. More...
 

Public Member Functions

Q_INVOKABLE vtkRenderer * activeChartRenderer () const
 
Q_INVOKABLE vtkMRMLChartViewNodeactiveMRMLChartViewNode () const
 
Q_INVOKABLE vtkMRMLPlotViewNodeactiveMRMLPlotViewNode () const
 
Q_INVOKABLE vtkMRMLTableViewNodeactiveMRMLTableViewNode () const
 
Q_INVOKABLE vtkMRMLViewNodeactiveMRMLThreeDViewNode () const
 
Q_INVOKABLE vtkRenderer * activePlotRenderer () const
 
Q_INVOKABLE vtkRenderer * activeTableRenderer () const
 
Q_INVOKABLE vtkRenderer * activeThreeDRenderer () const
 
int chartViewCount () const
 
Q_INVOKABLE qMRMLChartWidgetchartWidget (int id) const
 
bool isEnabled () const
 
int layout () const
 
Q_INVOKABLE vtkMRMLLayoutLogiclayoutLogic () const
 
Q_INVOKABLE vtkMRMLColorLogicmrmlColorLogic () const
 
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 
Q_INVOKABLE vtkCollection * mrmlSliceLogics () const
 
Q_INVOKABLE QList< qMRMLLayoutViewFactory * > mrmlViewFactories () const
 
qMRMLLayoutViewFactorymrmlViewFactory (const QString &viewClassName) const
 
int plotViewCount () const
 
Q_INVOKABLE qMRMLPlotWidgetplotWidget (int id) const
 
 qMRMLLayoutManager (QObject *parent=0)
 Constructors. More...
 
 qMRMLLayoutManager (QWidget *viewport, QObject *parent)
 
virtual void registerViewFactory (ctkLayoutViewFactory *viewFactory)
 
Q_INVOKABLE void setMRMLColorLogic (vtkMRMLColorLogic *colorLogic)
 
Q_INVOKABLE QStringList sliceViewNames () const
 
Q_INVOKABLE qMRMLSliceWidgetsliceWidget (const QString &name) const
 Get SliceViewWidget identified by name. More...
 
int tableViewCount () const
 
Q_INVOKABLE qMRMLTableWidgettableWidget (int id) const
 
int threeDViewCount () const
 Return the number of instantiated ThreeDRenderView. More...
 
Q_INVOKABLE qMRMLThreeDWidgetthreeDWidget (int id) const
 
Q_INVOKABLE QWidget * viewWidget (vtkMRMLNode *n) const
 
virtual ~qMRMLLayoutManager ()
 

Protected Member Functions

virtual void onViewportChanged ()
 
 qMRMLLayoutManager (qMRMLLayoutManagerPrivate *obj, QWidget *viewport, QObject *parent)
 

Protected Attributes

QScopedPointer< qMRMLLayoutManagerPrivate > d_ptr
 

Detailed Description

MRML layout manager that instantiates the QT widgets and layouts from the layout node and the view nodes in the scene. The management (creation, configuration and deletion) of the view widgets are delegated to qMRMLLayoutViewFactory. Example to change a default factory:

qMRMLLayoutSliceViewFactory* mrmlSliceViewFactory =
qobject_cast<qMRMLLayoutSliceViewFactory*>(
app->layoutManager()->mrmlViewFactory("vtkMRMLSliceNode"));
MySliceViewFactory* mySliceViewFactory =
new MySliceViewFactory(app->layoutManager());
mySliceViewFactory->setSliceLogics(mrmlSliceViewFactory->sliceLogics());
app->layoutManager()->unregisterViewFactory(mrmlSliceViewFactory);
app->layoutManager()->registerViewFactory(mySliceViewFactory);

You can also register ctkLayoutViewFactories that are not related to MRML view nodes.

See also
ctkLayoutFactory, ctkLayoutManager, qMRMLLayoutViewFactory

Definition at line 75 of file qMRMLLayoutManager.h.

Member Typedef Documentation

◆ Superclass

typedef ctkLayoutFactory qMRMLLayoutManager::Superclass

Superclass typedef.

Definition at line 95 of file qMRMLLayoutManager.h.

Property Documentation

◆ chartViewCount

int qMRMLLayoutManager::chartViewCount
read

Definition at line 89 of file qMRMLLayoutManager.h.

◆ enabled

bool qMRMLLayoutManager::enabled
readwrite

This property controls whether the layout manager reacts to layout node changes or note. When enabled (default), the layout is updated each time the layout node is modified and when the scene leaves batch-process state. It can be useful to temporarilly disable the manager when loading a scene, it could otherwise change the layout.

See also
isEnabled(), setEnabled(), setMRMLScene()

Definition at line 85 of file qMRMLLayoutManager.h.

◆ layout

int qMRMLLayoutManager::layout
readwrite

Definition at line 87 of file qMRMLLayoutManager.h.

◆ plotViewCount

int qMRMLLayoutManager::plotViewCount
read

Definition at line 91 of file qMRMLLayoutManager.h.

◆ tableViewCount

int qMRMLLayoutManager::tableViewCount
read

Definition at line 90 of file qMRMLLayoutManager.h.

◆ threeDViewCount

int qMRMLLayoutManager::threeDViewCount
read

Definition at line 88 of file qMRMLLayoutManager.h.

Constructor & Destructor Documentation

◆ qMRMLLayoutManager() [1/3]

qMRMLLayoutManager::qMRMLLayoutManager ( QObject *  parent = 0)
explicit

Constructors.

◆ qMRMLLayoutManager() [2/3]

qMRMLLayoutManager::qMRMLLayoutManager ( QWidget *  viewport,
QObject *  parent 
)
explicit

◆ ~qMRMLLayoutManager()

virtual qMRMLLayoutManager::~qMRMLLayoutManager ( )
virtual

◆ qMRMLLayoutManager() [3/3]

qMRMLLayoutManager::qMRMLLayoutManager ( qMRMLLayoutManagerPrivate *  obj,
QWidget *  viewport,
QObject *  parent 
)
protected

Member Function Documentation

◆ activeChartRenderer()

Q_INVOKABLE vtkRenderer* qMRMLLayoutManager::activeChartRenderer ( ) const

Return the renderer of the active chart view.

Todo:
For now the active view is the first chart view.
See also
activeMRMLChartViewNode(), activeMRMLThreeDViewNode(), activeThreeDRenderer()

◆ activeChartRendererChanged

void qMRMLLayoutManager::activeChartRendererChanged ( vtkRenderer *  newRenderer)
signal

◆ activeMRMLChartViewNode()

Q_INVOKABLE vtkMRMLChartViewNode* qMRMLLayoutManager::activeMRMLChartViewNode ( ) const

Return the view node of the active chart view.

Todo:
For now the active view is the first chart view.
See also
activeChartRenderer(), activeMRMLThreeDViewNode(), activeThreeDRenderer()

◆ activeMRMLChartViewNodeChanged

void qMRMLLayoutManager::activeMRMLChartViewNodeChanged ( vtkMRMLChartViewNode newActiveMRMLChartViewNode)
signal

◆ activeMRMLPlotViewNode()

Q_INVOKABLE vtkMRMLPlotViewNode* qMRMLLayoutManager::activeMRMLPlotViewNode ( ) const

Return the view node of the active plot view.

Todo:
For now the active view is the first plot view.
See also
activePlotRenderer(), activeMRMLThreeDViewNode(), activeThreeDRenderer()

◆ activeMRMLPlotViewNodeChanged

void qMRMLLayoutManager::activeMRMLPlotViewNodeChanged ( vtkMRMLPlotViewNode newActiveMRMLPlotViewNode)
signal

◆ activeMRMLTableViewNode()

Q_INVOKABLE vtkMRMLTableViewNode* qMRMLLayoutManager::activeMRMLTableViewNode ( ) const

Return the view node of the active table view.

Todo:
For now the active view is the first table view.
See also
activeTableRenderer(), activeMRMLThreeDViewNode(), activeThreeDRenderer()

◆ activeMRMLTableViewNodeChanged

void qMRMLLayoutManager::activeMRMLTableViewNodeChanged ( vtkMRMLTableViewNode newActiveMRMLChartViewNode)
signal

◆ activeMRMLThreeDViewNode()

Q_INVOKABLE vtkMRMLViewNode* qMRMLLayoutManager::activeMRMLThreeDViewNode ( ) const

Return the view node of the active 3D view.

Todo:
For now the active view is the first 3D view.
See also
activeThreeDRenderer(), activeMRMLChartViewNode(), activeChartRenderer()

◆ activeMRMLThreeDViewNodeChanged

void qMRMLLayoutManager::activeMRMLThreeDViewNodeChanged ( vtkMRMLViewNode newActiveMRMLThreeDViewNode)
signal

◆ activePlotRenderer()

Q_INVOKABLE vtkRenderer* qMRMLLayoutManager::activePlotRenderer ( ) const

Return the renderer of the active plot view.

Todo:
For now the active view is the first plot view.
See also
activeMRMLPlotViewNode(), activeMRMLThreeDViewNode(), activeThreeDRenderer()

◆ activePlotRendererChanged

void qMRMLLayoutManager::activePlotRendererChanged ( vtkRenderer *  newRenderer)
signal

◆ activeTableRenderer()

Q_INVOKABLE vtkRenderer* qMRMLLayoutManager::activeTableRenderer ( ) const

Return the renderer of the active table view.

Todo:
For now the active view is the first table view.
See also
activeMRMLTableViewNode(), activeMRMLThreeDViewNode(), activeThreeDRenderer()

◆ activeTableRendererChanged

void qMRMLLayoutManager::activeTableRendererChanged ( vtkRenderer *  newRenderer)
signal

◆ activeThreeDRenderer()

Q_INVOKABLE vtkRenderer* qMRMLLayoutManager::activeThreeDRenderer ( ) const

Return the renderer of the active 3D view.

Todo:
For now the active view is the first 3D view.
See also
activeThreeDRenderer(), activeMRMLChartViewNode(), activeChartRenderer()

◆ activeThreeDRendererChanged

void qMRMLLayoutManager::activeThreeDRendererChanged ( vtkRenderer *  newRenderer)
signal

◆ chartViewCount()

int qMRMLLayoutManager::chartViewCount ( ) const

◆ chartWidget()

Q_INVOKABLE qMRMLChartWidget* qMRMLLayoutManager::chartWidget ( int  id) const

◆ isEnabled()

bool qMRMLLayoutManager::isEnabled ( ) const

Return the enabled property value.

See also
enabled

◆ layout()

int qMRMLLayoutManager::layout ( ) const

Returns the current layout. it's the same value than vtkMRMLLayoutNode::ViewArrangement

See also
vtkMRMLLayoutNode::SlicerLayout, layoutLogic()

◆ layoutChanged

void qMRMLLayoutManager::layoutChanged ( int  )
signal

◆ layoutLogic()

Q_INVOKABLE vtkMRMLLayoutLogic* qMRMLLayoutManager::layoutLogic ( ) const

Return the layout logic instantiated and used by the manager.

See also
setLayout(), layout()

◆ mrmlColorLogic()

Q_INVOKABLE vtkMRMLColorLogic* qMRMLLayoutManager::mrmlColorLogic ( ) const

◆ mrmlScene()

Q_INVOKABLE vtkMRMLScene* qMRMLLayoutManager::mrmlScene ( ) const

Return the mrml scene of the layout manager. It is the scene that is set by setMRMLScene().

See also
setMRMLScene(), enabled

◆ mrmlSliceLogics()

Q_INVOKABLE vtkCollection* qMRMLLayoutManager::mrmlSliceLogics ( ) const

Return the up-to-date list of vtkMRMLSliceLogics associated to the slice views. The returned collection object is owned by the layout manager.

◆ mrmlViewFactories()

Q_INVOKABLE QList<qMRMLLayoutViewFactory*> qMRMLLayoutManager::mrmlViewFactories ( ) const

Return the list of registered MRML view factories.

See also
registeredViewFactories(), registerViewFactory(), unregisterViewFactory()

◆ mrmlViewFactory()

qMRMLLayoutViewFactory* qMRMLLayoutManager::mrmlViewFactory ( const QString &  viewClassName) const

Return the view factory that handles the viewClassName view nodes. This can be used to replace a view factory with another one.

See also
mrmlViewFactories(), registerViewFactory(), unregisterViewFactory()

◆ nodeAboutToBeEdited

void qMRMLLayoutManager::nodeAboutToBeEdited ( vtkMRMLNode node)
signal

Signal emitted when editing of a node is requested from within the layout.

◆ onViewportChanged()

virtual void qMRMLLayoutManager::onViewportChanged ( )
protectedvirtual

◆ plotViewCount()

int qMRMLLayoutManager::plotViewCount ( ) const

◆ plotWidget()

Q_INVOKABLE qMRMLPlotWidget* qMRMLLayoutManager::plotWidget ( int  id) const

◆ registerViewFactory()

virtual void qMRMLLayoutManager::registerViewFactory ( ctkLayoutViewFactory *  viewFactory)
virtual

Reimplemented for internal reasons. If the registered view factory is a qMRMLLayoutViewFactory, then set its layoutManager and its mrmlScene.

See also
ctkLayoutFactory::registerViewFactory(), unregisterViewFactory()

◆ resetSliceViews

void qMRMLLayoutManager::resetSliceViews ( )
slot

◆ resetThreeDViews

void qMRMLLayoutManager::resetThreeDViews ( )
slot

Reset focal view around volumes

See also
ctkVTKRenderView::resetFocalPoint(), ctkVTKRenderView::resetCamera()

◆ setEnabled

void qMRMLLayoutManager::setEnabled ( bool  enable)
slot

Set the enabled property value

See also
enabled

◆ setLayout

void qMRMLLayoutManager::setLayout ( int  newLayout)
slot

Change the current layout (see vtkMRMLLayoutNode::SlicerLayout) It creates views if needed.

◆ setLayoutNumberOfCompareViewColumns

void qMRMLLayoutManager::setLayoutNumberOfCompareViewColumns ( int  num)
slot

◆ setLayoutNumberOfCompareViewRows

void qMRMLLayoutManager::setLayoutNumberOfCompareViewRows ( int  num)
slot

Change the number of viewers in comparison modes It creates views if needed.

◆ setMRMLColorLogic()

Q_INVOKABLE void qMRMLLayoutManager::setMRMLColorLogic ( vtkMRMLColorLogic colorLogic)

◆ setMRMLScene

void qMRMLLayoutManager::setMRMLScene ( vtkMRMLScene scene)
slot

Set the MRML scene that should be listened for events

See also
mrmlScene(), enabled

◆ sliceViewNames()

Q_INVOKABLE QStringList qMRMLLayoutManager::sliceViewNames ( ) const

Get the list of SliceWidgetNames All slice widget names are returned, even those from hidden and not currently used widgets.

◆ sliceWidget()

Q_INVOKABLE qMRMLSliceWidget* qMRMLLayoutManager::sliceWidget ( const QString &  name) const

Get SliceViewWidget identified by name.

◆ tableViewCount()

int qMRMLLayoutManager::tableViewCount ( ) const

◆ tableWidget()

Q_INVOKABLE qMRMLTableWidget* qMRMLLayoutManager::tableWidget ( int  id) const

◆ threeDViewCount()

int qMRMLLayoutManager::threeDViewCount ( ) const

Return the number of instantiated ThreeDRenderView.

◆ threeDWidget()

Q_INVOKABLE qMRMLThreeDWidget* qMRMLLayoutManager::threeDWidget ( int  id) const

Get ThreeDWidget identified by id where id is an integer ranging from 0 to N-1 with N being the number of instantiated qMRMLThreeDView (that should also be equal to the number of vtkMRMLViewNode)

◆ viewWidget()

Q_INVOKABLE QWidget* qMRMLLayoutManager::viewWidget ( vtkMRMLNode n) const

Get the view widget representing a particular node (can be used for SliceNodes or ViewNodes, returning qMRMLSliceWidget or qMRMLThreeDWidget respectively).

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLLayoutManagerPrivate> qMRMLLayoutManager::d_ptr
protected

Definition at line 254 of file qMRMLLayoutManager.h.


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