Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkSliderNavigatorWidget Class Reference

#include <QmitkSliderNavigatorWidget.h>

Inheritance diagram for QmitkSliderNavigatorWidget:
Collaboration diagram for QmitkSliderNavigatorWidget:

Public Slots

void Refetch ()
 Updates the slider with the recent changes applied to the navigator. More...
 
void SetStepper (mitk::Stepper *stepper)
 
void ShowLabels (bool show)
 
void ShowLabelUnit (bool show)
 En-/disables displaying of the unit label (range will be displayed without unit if enabled). More...
 
void SetPos (int val)
 
void SetInverseDirection (bool inverseDirection)
 
void SetInvertedControls (bool invertedControls)
 

Public Member Functions

 QmitkSliderNavigatorWidget (QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
 
QString GetLabelUnit ()
 
QString ClippedValueToString (float value)
 Converts the passed value to a QString representation. More...
 
QString GetMinValueLabel ()
 Returns range-minimum (displayed as label left of slider if enabled) More...
 
QString GetMaxValueLabel ()
 
int GetPos ()
 
bool GetInverseDirection () const
 
bool GetInvertedControls () const
 

Protected Slots

void slider_valueChanged (double)
 
void SetLabelValues (float min, float max)
 Set range minimum and maximum (displayed as labels left and right of slider if enabled) More...
 
void SetLabelValuesValid (bool minValid, bool maxValid)
 
void SetLabelUnit (const char *unit)
 Set range unit (e.g. mm or ms) which will be displayed below range labels if enabled. More...
 
void SetLabels ()
 Configure slider with labels according to range and unit settings. More...
 
void spinBox_valueChanged (double)
 

Protected Attributes

bool m_HasLabelUnit
 
bool m_MaxValueValid
 
bool m_MinValueValid
 
QString m_LabelUnit
 
mitk::Stepper::Pointer m_Stepper
 
bool m_InRefetch
 
bool m_HasLabels
 
float m_MinValue
 
float m_MaxValue
 
bool m_InverseDirection
 
bool m_InvertedControls
 

Detailed Description

Definition at line 28 of file QmitkSliderNavigatorWidget.h.

Constructor & Destructor Documentation

QmitkSliderNavigatorWidget::QmitkSliderNavigatorWidget ( QWidget *  parent = nullptr,
Qt::WindowFlags  f = nullptr 
)

Member Function Documentation

QString QmitkSliderNavigatorWidget::ClippedValueToString ( float  value)

Converts the passed value to a QString representation.

If the value exceeds a certain maximum, "INF" (for "infinity") is displayed instead.

Definition at line 184 of file QmitkSliderNavigatorWidget.cpp.

Referenced by GetMaxValueLabel(), and GetMinValueLabel().

bool QmitkSliderNavigatorWidget::GetInverseDirection ( ) const

Definition at line 282 of file QmitkSliderNavigatorWidget.cpp.

References m_InverseDirection.

bool QmitkSliderNavigatorWidget::GetInvertedControls ( ) const

Definition at line 296 of file QmitkSliderNavigatorWidget.cpp.

References m_InvertedControls.

QString QmitkSliderNavigatorWidget::GetLabelUnit ( )

Definition at line 179 of file QmitkSliderNavigatorWidget.cpp.

References m_LabelUnit.

Referenced by SetLabels().

QString QmitkSliderNavigatorWidget::GetMaxValueLabel ( )

Definition at line 212 of file QmitkSliderNavigatorWidget.cpp.

References ClippedValueToString(), m_MaxValue, and m_MaxValueValid.

Referenced by SetLabels().

QString QmitkSliderNavigatorWidget::GetMinValueLabel ( )

Returns range-minimum (displayed as label left of slider if enabled)

Definition at line 200 of file QmitkSliderNavigatorWidget.cpp.

References ClippedValueToString(), m_MinValue, and m_MinValueValid.

Referenced by SetLabels().

int QmitkSliderNavigatorWidget::GetPos ( )

Definition at line 269 of file QmitkSliderNavigatorWidget.cpp.

References m_Stepper.

void QmitkSliderNavigatorWidget::Refetch ( )
slot

Updates the slider with the recent changes applied to the navigator.

Intended to be called via event mechanism, e.g. if the connected mitk::Stepper is modified.

Definition at line 55 of file QmitkSliderNavigatorWidget.cpp.

References m_HasLabels, m_InRefetch, m_InverseDirection, m_Stepper, SetLabels(), SetLabelUnit(), SetLabelValues(), and SetLabelValuesValid().

Referenced by SetInverseDirection(), slider_valueChanged(), and spinBox_valueChanged().

void QmitkSliderNavigatorWidget::SetInverseDirection ( bool  inverseDirection)
slot

Definition at line 287 of file QmitkSliderNavigatorWidget.cpp.

References m_InverseDirection, and Refetch().

void QmitkSliderNavigatorWidget::SetInvertedControls ( bool  invertedControls)
slot

Definition at line 301 of file QmitkSliderNavigatorWidget.cpp.

References m_InvertedControls.

void QmitkSliderNavigatorWidget::SetLabels ( )
protectedslot

Configure slider with labels according to range and unit settings.

Definition at line 224 of file QmitkSliderNavigatorWidget.cpp.

References GetLabelUnit(), GetMaxValueLabel(), GetMinValueLabel(), m_HasLabelUnit, m_MaxValueValid, m_MinValueValid, and m_Stepper.

Referenced by Refetch().

void QmitkSliderNavigatorWidget::SetLabelUnit ( const char *  unit)
protectedslot

Set range unit (e.g. mm or ms) which will be displayed below range labels if enabled.

Definition at line 174 of file QmitkSliderNavigatorWidget.cpp.

References m_LabelUnit.

Referenced by Refetch().

void QmitkSliderNavigatorWidget::SetLabelValues ( float  min,
float  max 
)
protectedslot

Set range minimum and maximum (displayed as labels left and right of slider if enabled)

Definition at line 162 of file QmitkSliderNavigatorWidget.cpp.

References m_MaxValue, m_MinValue, max(), and min().

Referenced by Refetch().

void QmitkSliderNavigatorWidget::SetLabelValuesValid ( bool  minValid,
bool  maxValid 
)
protectedslot

Definition at line 168 of file QmitkSliderNavigatorWidget.cpp.

References m_MaxValueValid, and m_MinValueValid.

Referenced by QmitkSliderNavigatorWidget(), and Refetch().

void QmitkSliderNavigatorWidget::SetPos ( int  val)
slot

Definition at line 274 of file QmitkSliderNavigatorWidget.cpp.

References m_InRefetch, and m_Stepper.

void QmitkSliderNavigatorWidget::SetStepper ( mitk::Stepper stepper)
slot

Definition at line 126 of file QmitkSliderNavigatorWidget.cpp.

References m_InRefetch, and m_Stepper.

void QmitkSliderNavigatorWidget::ShowLabels ( bool  show)
slot

Definition at line 152 of file QmitkSliderNavigatorWidget.cpp.

References m_HasLabels.

Referenced by QmitkSliderNavigatorWidget().

void QmitkSliderNavigatorWidget::ShowLabelUnit ( bool  show)
slot

En-/disables displaying of the unit label (range will be displayed without unit if enabled).

Definition at line 157 of file QmitkSliderNavigatorWidget.cpp.

References m_HasLabelUnit.

void QmitkSliderNavigatorWidget::slider_valueChanged ( double  )
protectedslot
void QmitkSliderNavigatorWidget::spinBox_valueChanged ( double  )
protectedslot

Member Data Documentation

bool QmitkSliderNavigatorWidget::m_HasLabels
protected

Definition at line 117 of file QmitkSliderNavigatorWidget.h.

Referenced by QmitkSliderNavigatorWidget(), Refetch(), and ShowLabels().

bool QmitkSliderNavigatorWidget::m_HasLabelUnit
protected
bool QmitkSliderNavigatorWidget::m_InRefetch
protected
bool QmitkSliderNavigatorWidget::m_InverseDirection
protected
bool QmitkSliderNavigatorWidget::m_InvertedControls
protected
QString QmitkSliderNavigatorWidget::m_LabelUnit
protected

Definition at line 114 of file QmitkSliderNavigatorWidget.h.

Referenced by GetLabelUnit(), and SetLabelUnit().

float QmitkSliderNavigatorWidget::m_MaxValue
protected

Definition at line 119 of file QmitkSliderNavigatorWidget.h.

Referenced by GetMaxValueLabel(), and SetLabelValues().

bool QmitkSliderNavigatorWidget::m_MaxValueValid
protected

Definition at line 112 of file QmitkSliderNavigatorWidget.h.

Referenced by GetMaxValueLabel(), SetLabels(), and SetLabelValuesValid().

float QmitkSliderNavigatorWidget::m_MinValue
protected

Definition at line 118 of file QmitkSliderNavigatorWidget.h.

Referenced by GetMinValueLabel(), and SetLabelValues().

bool QmitkSliderNavigatorWidget::m_MinValueValid
protected

Definition at line 113 of file QmitkSliderNavigatorWidget.h.

Referenced by GetMinValueLabel(), SetLabels(), and SetLabelValuesValid().

mitk::Stepper::Pointer QmitkSliderNavigatorWidget::m_Stepper
protected

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