OpenWalnut  1.5.0dev
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
WQtIntervalEdit< DataType, DisplayType > Class Template Reference

Simple widget allowing to define a certain interval. More...

#include <WQtIntervalEdit.h>

+ Inheritance diagram for WQtIntervalEdit< DataType, DisplayType >:
+ Collaboration diagram for WQtIntervalEdit< DataType, DisplayType >:

Public Member Functions

 WQtIntervalEdit (QWidget *parent)
 Default constructor. More...
 
virtual ~WQtIntervalEdit ()
 Destructor. More...
 
void setAllowedMin (DataType min=std::numeric_limits< DataType >::min())
 Set the allowed minimum. More...
 
void setAllowedMax (DataType max=std::numeric_limits< DataType >::max())
 Set the allowed maximum. More...
 
const DataTypegetAllowedMin () const
 Get the currently allowed min. More...
 
const DataTypegetAllowedMax () const
 Get the currently allowed max. More...
 
void setMin (DataType min=std::numeric_limits< DataType >::min())
 Set the currently selected min. More...
 
void setMax (DataType max=std::numeric_limits< DataType >::max())
 Set the currently selected max. More...
 
const DataTypegetMin () const
 Get the currently selected minimum. More...
 
const DataTypegetMax () const
 Get the currently selected maximum. More...
 
virtual void update ()
 Update the current state. More...
 
- Public Member Functions inherited from WQtIntervalEditBase
 WQtIntervalEditBase (QWidget *parent)
 Default constructor. More...
 
virtual ~WQtIntervalEditBase ()
 Destructor. More...
 

Protected Member Functions

virtual void minSliderChanged ()
 Slot called when the minimum slider changes. More...
 
virtual void maxSliderChanged ()
 Slot called when the maximum slider changes. More...
 
virtual void minEditChanged ()
 Slot called when the minimum edit changes. More...
 
virtual void maxEditChanged ()
 Slot called when the maximum edit changes. More...
 

Private Attributes

DataType m_allowedMax
 The allowed maximum. More...
 
DataType m_allowedMin
 The allowed minimum. More...
 
DataType m_min
 The current minumum. More...
 
DataType m_max
 The current maximum. More...
 

Additional Inherited Members

- Signals inherited from WQtIntervalEditBase
void minimumChanged ()
 Called whenever the user changes the current minimum OR setMin was called. More...
 
void maximumChanged ()
 Called whenever the user changes the current ,aximum OR setMax was called. More...
 
- Protected Slots inherited from WQtIntervalEditBase
- Protected Attributes inherited from WQtIntervalEditBase
QSlider m_minSlider
 The slider for the minimum. More...
 
QSlider m_maxSlider
 The slider for the maximumum. More...
 
QLineEdit m_minEdit
 The minimum edit. More...
 
QLineEdit m_maxEdit
 The maximum edit. More...
 
QLabel m_minLabel
 A label for the minimum. More...
 
QLabel m_maxLabel
 A label for the maximum. More...
 
QGridLayout m_layout
 The layout containing min and max layout. More...
 
- Static Protected Attributes inherited from WQtIntervalEditBase
static int SliderResolution = 10000
 Resolution of the sliders. More...
 

Detailed Description

template<typename DataType, typename DisplayType>
class WQtIntervalEdit< DataType, DisplayType >

Simple widget allowing to define a certain interval.

Template Parameters
DataTypeinterval for which integral type?

Definition at line 150 of file WQtIntervalEdit.h.

Constructor & Destructor Documentation

◆ WQtIntervalEdit()

template<typename DataType , typename DisplayType >
WQtIntervalEdit< DataType, DisplayType >::WQtIntervalEdit ( QWidget *  parent)
explicit

Default constructor.

Parameters
parentthe parent widget

Definition at line 270 of file WQtIntervalEdit.h.

◆ ~WQtIntervalEdit()

template<typename DataType , typename DisplayType >
WQtIntervalEdit< DataType, DisplayType >::~WQtIntervalEdit
virtual

Destructor.

Definition at line 282 of file WQtIntervalEdit.h.

Member Function Documentation

◆ getAllowedMax()

template<typename DataType , typename DisplayType >
const DataType & WQtIntervalEdit< DataType, DisplayType >::getAllowedMax

Get the currently allowed max.

Returns
the max

Definition at line 334 of file WQtIntervalEdit.h.

◆ getAllowedMin()

template<typename DataType , typename DisplayType >
const DataType & WQtIntervalEdit< DataType, DisplayType >::getAllowedMin

Get the currently allowed min.

Returns
the min

Definition at line 328 of file WQtIntervalEdit.h.

◆ getMax()

template<typename DataType , typename DisplayType >
const DataType & WQtIntervalEdit< DataType, DisplayType >::getMax

Get the currently selected maximum.

Returns
the max

Definition at line 385 of file WQtIntervalEdit.h.

Referenced by WPropertyDoubleWidget::minMaxUpdated(), WPropertyIntWidget::minMaxUpdated(), WPropertyDoubleWidget::update(), and WPropertyIntWidget::update().

+ Here is the caller graph for this function:

◆ getMin()

template<typename DataType , typename DisplayType >
const DataType & WQtIntervalEdit< DataType, DisplayType >::getMin

Get the currently selected minimum.

Returns
the min

Definition at line 379 of file WQtIntervalEdit.h.

Referenced by WPropertyDoubleWidget::minMaxUpdated(), WPropertyIntWidget::minMaxUpdated(), WPropertyDoubleWidget::update(), and WPropertyIntWidget::update().

+ Here is the caller graph for this function:

◆ maxEditChanged()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::maxEditChanged
protectedvirtual

Slot called when the maximum edit changes.

Reimplemented from WQtIntervalEditBase.

Definition at line 454 of file WQtIntervalEdit.h.

◆ maxSliderChanged()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::maxSliderChanged
protectedvirtual

Slot called when the maximum slider changes.

Reimplemented from WQtIntervalEditBase.

Definition at line 428 of file WQtIntervalEdit.h.

◆ minEditChanged()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::minEditChanged
protectedvirtual

Slot called when the minimum edit changes.

Reimplemented from WQtIntervalEditBase.

Definition at line 439 of file WQtIntervalEdit.h.

◆ minSliderChanged()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::minSliderChanged
protectedvirtual

Slot called when the minimum slider changes.

Reimplemented from WQtIntervalEditBase.

Definition at line 418 of file WQtIntervalEdit.h.

◆ setAllowedMax()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::setAllowedMax ( DataType  max = std::numeric_limits< DataType >::max())

Set the allowed maximum.

Parameters
maxthe max

Definition at line 308 of file WQtIntervalEdit.h.

Referenced by WPropertyDoubleWidget::update(), and WPropertyIntWidget::update().

+ Here is the caller graph for this function:

◆ setAllowedMin()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::setAllowedMin ( DataType  min = std::numeric_limits< DataType >::min())

Set the allowed minimum.

Parameters
minthe min.

Definition at line 288 of file WQtIntervalEdit.h.

Referenced by WPropertyDoubleWidget::update(), and WPropertyIntWidget::update().

+ Here is the caller graph for this function:

◆ setMax()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::setMax ( DataType  max = std::numeric_limits< DataType >::max())

Set the currently selected max.

Parameters
maxthe max

Definition at line 360 of file WQtIntervalEdit.h.

◆ setMin()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::setMin ( DataType  min = std::numeric_limits< DataType >::min())

Set the currently selected min.

Parameters
minthe min

Definition at line 340 of file WQtIntervalEdit.h.

◆ update()

template<typename DataType , typename DisplayType >
void WQtIntervalEdit< DataType, DisplayType >::update
virtual

Update the current state.

Implements WQtIntervalEditBase.

Definition at line 391 of file WQtIntervalEdit.h.

Member Data Documentation

◆ m_allowedMax

template<typename DataType , typename DisplayType >
DataType WQtIntervalEdit< DataType, DisplayType >::m_allowedMax
private

The allowed maximum.

Definition at line 250 of file WQtIntervalEdit.h.

◆ m_allowedMin

template<typename DataType , typename DisplayType >
DataType WQtIntervalEdit< DataType, DisplayType >::m_allowedMin
private

The allowed minimum.

Definition at line 255 of file WQtIntervalEdit.h.

◆ m_max

template<typename DataType , typename DisplayType >
DataType WQtIntervalEdit< DataType, DisplayType >::m_max
private

The current maximum.

Definition at line 265 of file WQtIntervalEdit.h.

◆ m_min

template<typename DataType , typename DisplayType >
DataType WQtIntervalEdit< DataType, DisplayType >::m_min
private

The current minumum.

Definition at line 260 of file WQtIntervalEdit.h.


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