VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Signals | Public Member Functions | Protected Attributes | Private Member Functions
makVrv::DtSliderSpinboxWidget Class Reference

A widget for pairing a horizontal slider with a spinbox. More...

Inheritance diagram for makVrv::DtSliderSpinboxWidget:
Inheritance graph
[legend]

Signals

void valueChanged (int value)
 Signal when the value has changed by either the slider or spinbox.

Public Member Functions

 DtSliderSpinboxWidget (int maxValue, int minValue=0, QWidget *parent=NULL, Qt::WindowFlags flags=Qt::Widget)
 CTOR.
virtual ~DtSliderSpinboxWidget ()
 virtual DTOR
Field value setters.

Sets the values of the widget's corresponding fields.

virtual void setValue (int value)
 Set the current value.
virtual int value () const
 Get the current value.
virtual void setMaxAndMin (int maxValue, int minValue)
 Set the maximum and minimum values.
virtual int maximum () const
 Get the maximum allowed value for this widget.
virtual int minimum () const
 Get the minimum allowed value for this widget.
virtual void setSingleStep (int step)
 Set the current value.
Accessors to the underlying widgets.

Gets the handle to each of the child widgets.

QHBoxLayout * mainLayout ()
 Get the main layout for this widget.
QSlider * sliderWidget ()
 Get the slider for this widget.
QSpinBoxspinboxWidget ()
 Get the spin-box for this widget.

Protected Slots

User input slots.

Slots connected to the signals of the internal widgets.

virtual void onSliderValueChanged (int value)
virtual void onSpinnerValueChanged (int value)

Protected Member Functions

Event handlers.

Extending base-class event handlers to propagate to children.

virtual void changeEvent (QEvent *evt)
 Handle the enabled/disabled event.
virtual void showEvent (QShowEvent *evt)
virtual void hideEvent (QHideEvent *evt)
 Handle the enabled/disabled event.

Protected Attributes

QHBoxLayout * myLayout
QSlider * mySlider
QSpinBoxmySpinBox
int myMaximum
int myMinimum

Private Member Functions

void setupGui ()
 Sets up the widget's fields.
void connectToSignals ()
 Connects widget signals to slots.

Detailed Description

A widget for pairing a horizontal slider with a spinbox.

The spin box must be clamped to a min and max value, as the slider cannot slide continuously.

Constructor & Destructor Documentation

makVrv::DtSliderSpinboxWidget::DtSliderSpinboxWidget ( int  maxValue,
int  minValue = 0,
QWidget parent = NULL,
Qt::WindowFlags  flags = Qt::Widget 
)

CTOR.

Parameters
[in]maxValueis the maximum allowed value for this widget.
[in]minValueis the minimum allowed value for this widget.
[in]parentis the parent to manage this widget.
[in]flagsis a set of windowing flags for display.
virtual makVrv::DtSliderSpinboxWidget::~DtSliderSpinboxWidget ( )
virtual

virtual DTOR

Member Function Documentation

virtual void makVrv::DtSliderSpinboxWidget::setValue ( int  value)
virtual

Set the current value.

Parameters
[in]valueis the new value to set.
Note
The value will be clamped between max and min.
virtual int makVrv::DtSliderSpinboxWidget::value ( ) const
virtual

Get the current value.

Returns
the current value.
virtual void makVrv::DtSliderSpinboxWidget::setMaxAndMin ( int  maxValue,
int  minValue 
)
virtual

Set the maximum and minimum values.

Parameters
[in]maxValueis the maximum allowed value for this widget.
[in]minValueis the minimum allowed value for this widget.
virtual int makVrv::DtSliderSpinboxWidget::maximum ( ) const
virtual

Get the maximum allowed value for this widget.

virtual int makVrv::DtSliderSpinboxWidget::minimum ( ) const
virtual

Get the minimum allowed value for this widget.

virtual void makVrv::DtSliderSpinboxWidget::setSingleStep ( int  step)
virtual

Set the current value.

Parameters
[in]valueis the new value to set.
Note
The value will be clamped between max and min.
QHBoxLayout* makVrv::DtSliderSpinboxWidget::mainLayout ( )

Get the main layout for this widget.

returns a handle to the main layout.

QSlider* makVrv::DtSliderSpinboxWidget::sliderWidget ( )

Get the slider for this widget.

returns a handle to the slider.

QSpinBox* makVrv::DtSliderSpinboxWidget::spinboxWidget ( )

Get the spin-box for this widget.

returns a handle to the spin-box.

void makVrv::DtSliderSpinboxWidget::valueChanged ( int  value)
signal

Signal when the value has changed by either the slider or spinbox.

Parameters
[in]valueis the new current value.
virtual void makVrv::DtSliderSpinboxWidget::onSliderValueChanged ( int  value)
protectedvirtualslot
virtual void makVrv::DtSliderSpinboxWidget::onSpinnerValueChanged ( int  value)
protectedvirtualslot
virtual void makVrv::DtSliderSpinboxWidget::changeEvent ( QEvent *  evt)
protectedvirtual

Handle the enabled/disabled event.

Parameters
[in]evtis the event to handle.
virtual void makVrv::DtSliderSpinboxWidget::showEvent ( QShowEvent *  evt)
protectedvirtual

Handle the show/hide events.

Parameters
[in]evtis the event to handle.
virtual void makVrv::DtSliderSpinboxWidget::hideEvent ( QHideEvent *  evt)
protectedvirtual

Handle the enabled/disabled event.

Parameters
[in]evtis the event to handle.
void makVrv::DtSliderSpinboxWidget::setupGui ( )
private

Sets up the widget's fields.

Non-virtual (Called from CTOR).

void makVrv::DtSliderSpinboxWidget::connectToSignals ( )
private

Connects widget signals to slots.

Non-virtual (Called from CTOR).

Member Data Documentation

QHBoxLayout* makVrv::DtSliderSpinboxWidget::myLayout
protected
QSlider* makVrv::DtSliderSpinboxWidget::mySlider
protected
QSpinBox* makVrv::DtSliderSpinboxWidget::mySpinBox
protected
int makVrv::DtSliderSpinboxWidget::myMaximum
protected
int makVrv::DtSliderSpinboxWidget::myMinimum
protected

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)