Read-only QLabel that displays a numeric MITK property value.
More...
#include <QmitkNumberPropertyView.h>
Read-only QLabel that displays a numeric MITK property value.
Observes an mitk::IntProperty, mitk::FloatProperty, or mitk::DoubleProperty and displays its current value as text. Supports configurable decimal places, a text suffix, and percentage display mode. If the property is removed, "n/a" is shown.
- See also
- QmitkNumberPropertyEditor, QmitkNumberPropertySlider, QmitkPropertyViewFactory
Definition at line 30 of file QmitkNumberPropertyView.h.
◆ QmitkNumberPropertyView() [1/3]
| QmitkNumberPropertyView::QmitkNumberPropertyView |
( |
const mitk::IntProperty * |
property, |
|
|
QWidget * |
parent |
|
) |
| |
Construct a view for an integer property.
- Parameters
-
| [in] | property | The int property to observe. |
| [in] | parent | The parent widget. |
◆ QmitkNumberPropertyView() [2/3]
| QmitkNumberPropertyView::QmitkNumberPropertyView |
( |
const mitk::FloatProperty * |
property, |
|
|
QWidget * |
parent |
|
) |
| |
Construct a view for a float property.
- Parameters
-
| [in] | property | The float property to observe. |
| [in] | parent | The parent widget. |
◆ QmitkNumberPropertyView() [3/3]
| QmitkNumberPropertyView::QmitkNumberPropertyView |
( |
const mitk::DoubleProperty * |
property, |
|
|
QWidget * |
parent |
|
) |
| |
Construct a view for a double property.
- Parameters
-
| [in] | property | The double property to observe. |
| [in] | parent | The parent widget. |
◆ ~QmitkNumberPropertyView()
| QmitkNumberPropertyView::~QmitkNumberPropertyView |
( |
| ) |
|
|
override |
◆ decimalPlaces()
| short QmitkNumberPropertyView::decimalPlaces |
( |
| ) |
const |
Get the number of decimal places displayed.
- Returns
- The decimal places count.
◆ DisplayNumber()
| void QmitkNumberPropertyView::DisplayNumber |
( |
| ) |
|
|
protected |
◆ initialize()
| void QmitkNumberPropertyView::initialize |
( |
| ) |
|
|
protected |
◆ PropertyChanged()
| void QmitkNumberPropertyView::PropertyChanged |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ PropertyRemoved()
| void QmitkNumberPropertyView::PropertyRemoved |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ setDecimalPlaces()
| void QmitkNumberPropertyView::setDecimalPlaces |
( |
short |
places | ) |
|
Set the number of decimal places to display.
- Parameters
-
| [in] | places | The number of decimal places. |
◆ setShowPercent()
| void QmitkNumberPropertyView::setShowPercent |
( |
bool |
show | ) |
|
Enable or disable percentage display (value multiplied by 100, "%" suffix).
- Parameters
-
| [in] | show | True to enable percentage mode. |
◆ setSuffix()
| void QmitkNumberPropertyView::setSuffix |
( |
const QString & |
suffix | ) |
|
Set a text suffix appended to the displayed value.
- Parameters
-
| [in] | suffix | The suffix string (e.g. " mm"). |
◆ showPercent()
| bool QmitkNumberPropertyView::showPercent |
( |
| ) |
const |
Check whether values are displayed as percentages.
- Returns
- True if percentage mode is active.
◆ suffix()
| QString QmitkNumberPropertyView::suffix |
( |
| ) |
const |
Get the current text suffix.
- Returns
- The suffix string.
◆ m_DataType
| const int QmitkNumberPropertyView::m_DataType |
|
protected |
◆ m_DecimalPlaces
| short QmitkNumberPropertyView::m_DecimalPlaces |
|
protected |
◆ m_DisplayFactor
| double QmitkNumberPropertyView::m_DisplayFactor |
|
protected |
◆ m_DoubleProperty
◆ m_FloatProperty
◆ m_IntProperty
◆ m_Suffix
| QString QmitkNumberPropertyView::m_Suffix |
|
protected |
◆ decimalPlaces
| short QmitkNumberPropertyView::decimalPlaces |
|
readwrite |
◆ showPercent
| bool QmitkNumberPropertyView::showPercent |
|
readwrite |
◆ suffix
| QString QmitkNumberPropertyView::suffix |
|
readwrite |
The documentation for this class was generated from the following file: