Slicer
4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Extend the ctkSliderWidget to integrate units support. More...
#include <Libs/MRML/Widgets/qMRMLSliderWidget.h>
Public Types | |
typedef ctkSliderWidget | Superclass |
enum | UnitAwareProperty { None = 0x00, Prefix = 0x01, Suffix = 0x02, Precision = 0x04, MinimumValue = 0x08, MaximumValue = 0x10, Scaling = 0x20, All = Prefix | Suffix | Precision | MinimumValue | MaximumValue | Scaling } |
Properties | |
QString | quantity |
UnitAwareProperties | unitAwareProperties |
Public Slots | |
virtual void | setMRMLScene (vtkMRMLScene *scene) |
void | setQuantity (const QString &baseName) |
void | setUnitAwareProperties (UnitAwareProperties flags) |
Public Member Functions | |
Q_INVOKABLE vtkMRMLScene * | mrmlScene () const |
qMRMLSliderWidget (QWidget *parent=0) | |
Construct an empty qMRMLSliderWidget with a null scene. More... | |
QString | quantity () const |
virtual void | setMaximum (double) |
virtual void | setMinimum (double) |
virtual void | setRange (double, double) |
UnitAwareProperties | unitAwareProperties () const |
virtual | ~qMRMLSliderWidget () |
Protected Slots | |
void | updateWidgetFromUnitNode () |
Protected Attributes | |
QScopedPointer< qMRMLSliderWidgetPrivate > | d_ptr |
Extend the ctkSliderWidget to integrate units support.
This custom widgets extends the ctkSliderWidget widget to integrate the unit support within Slicer. By default, this widget behaves just like a normal ctkSliderWidget.
To use the units, one needs to set what kind of quantity this widget should look for. For example, when dealing with world positions, the quantity is probably going to be "length". Once a scene is set to this widget, it listens to the changes made upon the selection node to extract the unit properties related to its quantity and update accordingly.
To allow even more customisation, one can set which properties of the widget are updated by units and which aren't.
Definition at line 55 of file qMRMLSliderWidget.h.
typedef ctkSliderWidget qMRMLSliderWidget::Superclass |
Definition at line 77 of file qMRMLSliderWidget.h.
Enumerator | |
---|---|
None | |
Prefix | |
Suffix | |
Precision | |
MinimumValue | |
MaximumValue | |
Scaling | |
All |
Definition at line 83 of file qMRMLSliderWidget.h.
|
readwrite |
Get/Set the quantity is used to determine what unit the spinbox is in. This determines the spinbox properties like minimum, maximum, single step, prefix and suffix.
Definition at line 64 of file qMRMLSliderWidget.h.
|
readwrite |
Get/Set the properties that will be determined by units. If a property is aware of units, it will update itself to the unit's property value automatically. Otherwise, this property is left to be changed by its accessors. All flags except MinimumValue and MaximumValue are on by default.
Definition at line 74 of file qMRMLSliderWidget.h.
|
explicit |
Construct an empty qMRMLSliderWidget with a null scene.
|
virtual |
Q_INVOKABLE vtkMRMLScene* qMRMLSliderWidget::mrmlScene | ( | ) | const |
Get MRML scene that has been set by setMRMLScene(). Default is no scene.
QString qMRMLSliderWidget::quantity | ( | ) | const |
Get the quantity property value.
|
virtual |
|
virtual |
Reimplemented for internal reasons.
|
virtualslot |
Set the scene the spinbox listens to.
|
slot |
|
virtual |
|
slot |
UnitAwareProperties qMRMLSliderWidget::unitAwareProperties | ( | ) | const |
Get the unitAwareProperties property value.
|
protectedslot |
|
protected |
Definition at line 128 of file qMRMLSliderWidget.h.