Slicer  5.1
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 Slots | Protected Attributes
qMRMLUnitWidget Class Reference

#include <Modules/Loadable/Units/Widgets/qMRMLUnitWidget.h>

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

Public Types

typedef qMRMLWidget Superclass
 
enum  UnitProperty {
  None = 0x000, Preset = 0x001, Name = 0x002, Quantity = 0x004,
  Precision = 0x008, Prefix = 0x010, Suffix = 0x020, Minimum = 0x040,
  Maximum = 0x080, Coefficient = 0x100, Offset = 0x200, All = 0xfff
}
 
- Public Types inherited from qMRMLWidget
typedef QWidget Superclass
 

Properties

double coefficient
 
UnitProperties displayedProperties
 
UnitProperties editableProperties
 
double maximum
 
double minimum
 
QString name
 
double offset
 
int precision
 
QString prefix
 
QString quantity
 
QString suffix
 

Public Slots

void setCoefficient (double)
 
void setCurrentNode (vtkMRMLNode *unitNode)
 
void setDisplayedProperties (UnitProperties properties)
 
void setEditableProperties (UnitProperties properties)
 
void setMaximum (double)
 
void setMinimum (double)
 
void setName (const QString &)
 
void setOffset (double)
 
void setPrecision (int)
 
void setPrefix (const QString &)
 
void setQuantity (const QString &)
 
void setSuffix (const QString &)
 
void setUnitFromPreset (vtkMRMLNode *presetNode)
 Apply a preset to the node. More...
 
- Public Slots inherited from qMRMLWidget

Signals

void coefficientChanged (double)
 
void maximumChanged (double)
 
void minimumChanged (double)
 
void nameChanged (QString)
 
void offsetChanged (double)
 
void precisionChanged (int)
 
void prefixChanged (QString)
 
void quantityChanged (QString)
 
void suffixChanged (QString)
 
- Signals inherited from qMRMLWidget
void mrmlSceneChanged (vtkMRMLScene *)
 

Public Member Functions

double coefficient () const
 
Q_INVOKABLE vtkMRMLNodecurrentNode () const
 
UnitProperties displayedProperties () const
 
UnitProperties editableProperties () const
 
double maximum () const
 
double minimum () const
 
QString name () const
 
double offset () const
 
int precision () const
 
QString prefix () const
 
 qMRMLUnitWidget (QWidget *parent=nullptr)
 
QString quantity () const
 
void setMRMLScene (vtkMRMLScene *unitsLogicScene) override
 Set the units logic scene for the preset comboxes. More...
 
QString suffix () const
 
 ~qMRMLUnitWidget () override
 
- Public Member Functions inherited from qMRMLWidget
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 Return a pointer on the current MRML scene. More...
 
 qMRMLWidget (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
 
 ~qMRMLWidget () override
 

Protected Slots

void updateWidgetFromNode ()
 

Protected Attributes

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

Additional Inherited Members

- 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. More...
 
static Q_INVOKABLE void preInitializeApplication ()
 

Detailed Description

Definition at line 42 of file qMRMLUnitWidget.h.

Member Typedef Documentation

◆ Superclass

Definition at line 87 of file qMRMLUnitWidget.h.

Member Enumeration Documentation

◆ UnitProperty

Enumerator
None 
Preset 
Name 
Quantity 
Precision 
Prefix 
Suffix 
Minimum 
Maximum 
Coefficient 
Offset 
All 

Definition at line 119 of file qMRMLUnitWidget.h.

Property Documentation

◆ coefficient

double qMRMLUnitWidget::coefficient
readwrite

This property controls the displayed coefficient of the unit node

See also
coefficient(), setCoefficient(), coefficientChanged()

Definition at line 69 of file qMRMLUnitWidget.h.

◆ displayedProperties

UnitProperties qMRMLUnitWidget::displayedProperties
readwrite

Set/Get what are the current unit node displayed property by the widget. Hidden properties can still be accessed programmatically. By default, all the properties are visible.

See also
editableProperties

Definition at line 78 of file qMRMLUnitWidget.h.

◆ editableProperties

UnitProperties qMRMLUnitWidget::editableProperties
readwrite

This property control which property is editable by the user. All the properties except quantity are editable by default.e

See also
displayedProperties

Definition at line 82 of file qMRMLUnitWidget.h.

◆ maximum

double qMRMLUnitWidget::maximum
readwrite

This property controls the maximum of the unit node.

See also
maximum(), setMaximum(), maximumChanged()

Definition at line 66 of file qMRMLUnitWidget.h.

◆ minimum

double qMRMLUnitWidget::minimum
readwrite

This property controls the minimum of the unit node.

See also
minimum(), setMinimum(), minimumChanged()

Definition at line 63 of file qMRMLUnitWidget.h.

◆ name

QString qMRMLUnitWidget::name
readwrite

This property controls the name of the unit node.

See also
name(), setName(), nameChanged()

Definition at line 48 of file qMRMLUnitWidget.h.

◆ offset

double qMRMLUnitWidget::offset
readwrite

This property controls the displayed offset of the unit node.

See also
offset(), setOffset(), offsetChanged()

Definition at line 72 of file qMRMLUnitWidget.h.

◆ precision

int qMRMLUnitWidget::precision
readwrite

This property controls the precision of the unit node.

See also
precision(), setPrecision(), precisionChanged()

Definition at line 60 of file qMRMLUnitWidget.h.

◆ prefix

QString qMRMLUnitWidget::prefix
readwrite

This property controls the prefix of the unit node.

See also
prefix(), setPrefix(), prefixChanged()

Definition at line 54 of file qMRMLUnitWidget.h.

◆ quantity

QString qMRMLUnitWidget::quantity
readwrite

This property controls the quantity of the unit node.

See also
quantity(), setQuantity(), quantityChanged()

Definition at line 51 of file qMRMLUnitWidget.h.

◆ suffix

QString qMRMLUnitWidget::suffix
readwrite

This property controls the suffix of the unit node.

See also
suffix(), setSuffix(), suffixChanged()

Definition at line 57 of file qMRMLUnitWidget.h.

Constructor & Destructor Documentation

◆ qMRMLUnitWidget()

qMRMLUnitWidget::qMRMLUnitWidget ( QWidget *  parent = nullptr)

◆ ~qMRMLUnitWidget()

qMRMLUnitWidget::~qMRMLUnitWidget ( )
override

Member Function Documentation

◆ coefficient()

double qMRMLUnitWidget::coefficient ( ) const

Return the coefficient property value.

See also
setCoefficient

◆ coefficientChanged

void qMRMLUnitWidget::coefficientChanged ( double  )
signal

◆ currentNode()

Q_INVOKABLE vtkMRMLNode* qMRMLUnitWidget::currentNode ( ) const

◆ displayedProperties()

UnitProperties qMRMLUnitWidget::displayedProperties ( ) const

Return the displayedProperties property value.

See also
displayedProperties

◆ editableProperties()

UnitProperties qMRMLUnitWidget::editableProperties ( ) const

Return the editableProperties property value.

See also
editableProperties

◆ maximum()

double qMRMLUnitWidget::maximum ( ) const

Return the maximum property value.

See also
maximum

◆ maximumChanged

void qMRMLUnitWidget::maximumChanged ( double  )
signal

◆ minimum()

double qMRMLUnitWidget::minimum ( ) const

Return the minimum property value.

See also
minimum

◆ minimumChanged

void qMRMLUnitWidget::minimumChanged ( double  )
signal

◆ name()

QString qMRMLUnitWidget::name ( ) const

Return the name property value.

See also
name

◆ nameChanged

void qMRMLUnitWidget::nameChanged ( QString  )
signal

◆ offset()

double qMRMLUnitWidget::offset ( ) const

Return the offset property value.

See also
setOffset

◆ offsetChanged

void qMRMLUnitWidget::offsetChanged ( double  )
signal

◆ precision()

int qMRMLUnitWidget::precision ( ) const

Return the precision property value.

See also
precision

◆ precisionChanged

void qMRMLUnitWidget::precisionChanged ( int  )
signal

◆ prefix()

QString qMRMLUnitWidget::prefix ( ) const

Return the prefix property value.

See also
prefix

◆ prefixChanged

void qMRMLUnitWidget::prefixChanged ( QString  )
signal

◆ quantity()

QString qMRMLUnitWidget::quantity ( ) const

Return the quantity property value.

See also
quantity

◆ quantityChanged

void qMRMLUnitWidget::quantityChanged ( QString  )
signal

◆ setCoefficient

void qMRMLUnitWidget::setCoefficient ( double  )
slot

Set the coefficient property value.

See also
coefficient

◆ setCurrentNode

void qMRMLUnitWidget::setCurrentNode ( vtkMRMLNode unitNode)
slot

◆ setDisplayedProperties

void qMRMLUnitWidget::setDisplayedProperties ( UnitProperties  properties)
slot

Set the displayedProperties property value.

See also
displayedProperties

◆ setEditableProperties

void qMRMLUnitWidget::setEditableProperties ( UnitProperties  properties)
slot

Set the editableProperties property value.

See also
editableProperties

◆ setMaximum

void qMRMLUnitWidget::setMaximum ( double  )
slot

Set the maximum property value.

See also
maximum

◆ setMinimum

void qMRMLUnitWidget::setMinimum ( double  )
slot

Set the minimum property value.

See also
minimum

◆ setMRMLScene()

void qMRMLUnitWidget::setMRMLScene ( vtkMRMLScene unitsLogicScene)
overridevirtual

Set the units logic scene for the preset comboxes.

Reimplemented from qMRMLWidget.

◆ setName

void qMRMLUnitWidget::setName ( const QString &  )
slot

Set the name property value.

See also
name

◆ setOffset

void qMRMLUnitWidget::setOffset ( double  )
slot

Set the offset property value.

See also
offset

◆ setPrecision

void qMRMLUnitWidget::setPrecision ( int  )
slot

Set the precision property value.

See also
precision

◆ setPrefix

void qMRMLUnitWidget::setPrefix ( const QString &  )
slot

Set the prefix property value.

See also
prefix

◆ setQuantity

void qMRMLUnitWidget::setQuantity ( const QString &  )
slot

Set the quantity property value.

See also
quantity

◆ setSuffix

void qMRMLUnitWidget::setSuffix ( const QString &  )
slot

Set the suffix property value.

See also
suffix

◆ setUnitFromPreset

void qMRMLUnitWidget::setUnitFromPreset ( vtkMRMLNode presetNode)
slot

Apply a preset to the node.

◆ suffix()

QString qMRMLUnitWidget::suffix ( ) const

Return the suffix property value.

See also
suffix

◆ suffixChanged

void qMRMLUnitWidget::suffixChanged ( QString  )
signal

◆ updateWidgetFromNode

void qMRMLUnitWidget::updateWidgetFromNode ( )
protectedslot

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLUnitWidgetPrivate> qMRMLUnitWidget::d_ptr
protected

Definition at line 204 of file qMRMLUnitWidget.h.


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