Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qMRMLClipNodeDisplayWidget Class Reference

Clipping settings of a display node: clipping on/off, the nodes that clip it and how (from its clip node), cap and outline of the clipped surface. The clip node is chosen next to the clipping check box. When clipping is enabled and the display node has no clip node, the clip node of the scene is selected (one is created if there is none). Widgets that contain it can add options that are specific to their display node type, see addRow(). More...

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

Inheritance diagram for qMRMLClipNodeDisplayWidget:
Collaboration diagram for qMRMLClipNodeDisplayWidget:

Public Slots

void setMRMLDisplayNode (vtkMRMLDisplayNode *node)
 Set the clip node to represent.
 
void setMRMLDisplayNode (vtkMRMLNode *node)
 Utility function to be connected to signals/slots.
 
- Public Slots inherited from qMRMLWidget
virtual void setMRMLScene (vtkMRMLScene *newScene)
 Set the MRML scene associated with the widget.
 

Public Member Functions

Q_INVOKABLE void addRow (const QString &labelText, QWidget *field)
 
Q_INVOKABLE void addRow (QWidget *label, QWidget *field)
 
Q_INVOKABLE void addRow (QWidget *widget)
 Add a widget that spans both columns of the row.
 
Q_INVOKABLE void addRowBelowClipNodeSelector (const QString &labelText, QWidget *field)
 
Q_INVOKABLE void addRowBelowClipNodeSelector (QWidget *label, QWidget *field)
 
Q_INVOKABLE void addWidgetNextToClipNodeSelector (QWidget *widget)
 
vtkMRMLDisplayNode * mrmlDisplayNode () const
 
 qMRMLClipNodeDisplayWidget (QWidget *parent=nullptr)
 
 ~qMRMLClipNodeDisplayWidget () override
 
- Public Member Functions inherited from qMRMLWidget
Q_INVOKABLE vtkMRMLScene * mrmlScene () const
 Return a pointer on the current MRML scene.
 
 qMRMLWidget (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
 
 ~qMRMLWidget () override
 

Static Public Member Functions

static vtkMRMLClipNode * ensureClipNode (vtkMRMLDisplayNode *displayNode)
 
- Static Public Member Functions inherited from qMRMLWidget
static Q_INVOKABLE QPixmap pixmapFromIcon (const QIcon &icon)
 
static Q_INVOKABLE void postInitializeApplication ()
 Initialization that needs to be performed after application object is created.
 
static Q_INVOKABLE void preInitializeApplication ()
 
static QString safeQStringFromUtf8Ptr (const char *cString)
 

Protected Slots

void onClipNodeSelected (vtkMRMLNode *node)
 
void onClippingToggled (bool enabled)
 
void updateMRMLFromWidget ()
 
void updateWidgetFromMRML ()
 

Protected Attributes

QScopedPointer< qMRMLClipNodeDisplayWidgetPrivate > d_ptr
 
- Protected Attributes inherited from qMRMLWidget
QScopedPointer< qMRMLWidgetPrivate > d_ptr
 

Additional Inherited Members

- Public Types inherited from qMRMLWidget
typedef QWidget Superclass
 
- Signals inherited from qMRMLWidget
void mrmlSceneChanged (vtkMRMLScene *)
 

Detailed Description

Clipping settings of a display node: clipping on/off, the nodes that clip it and how (from its clip node), cap and outline of the clipped surface. The clip node is chosen next to the clipping check box. When clipping is enabled and the display node has no clip node, the clip node of the scene is selected (one is created if there is none). Widgets that contain it can add options that are specific to their display node type, see addRow().

Definition at line 43 of file qMRMLClipNodeDisplayWidget.h.

Constructor & Destructor Documentation

◆ qMRMLClipNodeDisplayWidget()

qMRMLClipNodeDisplayWidget::qMRMLClipNodeDisplayWidget ( QWidget * parent = nullptr)

◆ ~qMRMLClipNodeDisplayWidget()

qMRMLClipNodeDisplayWidget::~qMRMLClipNodeDisplayWidget ( )
override

Member Function Documentation

◆ addRow() [1/3]

Q_INVOKABLE void qMRMLClipNodeDisplayWidget::addRow ( const QString & labelText,
QWidget * field )

Add a row below the clipping options, for options that are specific to the type of the display node (for example, soft edge of volume rendering). If label is nullptr then the field is only in the second column. The added widgets are reparented to this widget.

◆ addRow() [2/3]

Q_INVOKABLE void qMRMLClipNodeDisplayWidget::addRow ( QWidget * label,
QWidget * field )

◆ addRow() [3/3]

Q_INVOKABLE void qMRMLClipNodeDisplayWidget::addRow ( QWidget * widget)

Add a widget that spans both columns of the row.

◆ addRowBelowClipNodeSelector() [1/2]

Q_INVOKABLE void qMRMLClipNodeDisplayWidget::addRowBelowClipNodeSelector ( const QString & labelText,
QWidget * field )

Add a row directly below the row of the clip node selector (for example, details of the status that a widget next to the selector shows). Rows are added in the order of the calls. If label is nullptr then the field is only in the second column. The added widgets are reparented to this widget.

◆ addRowBelowClipNodeSelector() [2/2]

Q_INVOKABLE void qMRMLClipNodeDisplayWidget::addRowBelowClipNodeSelector ( QWidget * label,
QWidget * field )

◆ addWidgetNextToClipNodeSelector()

Q_INVOKABLE void qMRMLClipNodeDisplayWidget::addWidgetNextToClipNodeSelector ( QWidget * widget)

Add a widget (for example, a status button) next to the clip node selector. The widget gets the height of the clip node selector (a button is made square, with its icon fitting in it).

◆ ensureClipNode()

static vtkMRMLClipNode * qMRMLClipNodeDisplayWidget::ensureClipNode ( vtkMRMLDisplayNode * displayNode)
static

Make sure that the display node has a clip node: if it has none, then use the first clip node of the scene (usually there is only one, used by all nodes), or create one if the scene has none. Returns the clip node of the display node (nullptr if the display node is not in a scene).

◆ mrmlDisplayNode()

vtkMRMLDisplayNode * qMRMLClipNodeDisplayWidget::mrmlDisplayNode ( ) const

◆ onClipNodeSelected

void qMRMLClipNodeDisplayWidget::onClipNodeSelected ( vtkMRMLNode * node)
protectedslot

◆ onClippingToggled

void qMRMLClipNodeDisplayWidget::onClippingToggled ( bool enabled)
protectedslot

◆ setMRMLDisplayNode [1/2]

void qMRMLClipNodeDisplayWidget::setMRMLDisplayNode ( vtkMRMLDisplayNode * node)
slot

Set the clip node to represent.

◆ setMRMLDisplayNode [2/2]

void qMRMLClipNodeDisplayWidget::setMRMLDisplayNode ( vtkMRMLNode * node)
slot

Utility function to be connected to signals/slots.

◆ updateMRMLFromWidget

void qMRMLClipNodeDisplayWidget::updateMRMLFromWidget ( )
protectedslot

◆ updateWidgetFromMRML

void qMRMLClipNodeDisplayWidget::updateWidgetFromMRML ( )
protectedslot

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLClipNodeDisplayWidgetPrivate> qMRMLClipNodeDisplayWidget::d_ptr
protected

Definition at line 95 of file qMRMLClipNodeDisplayWidget.h.


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