itom
Loading...
Searching...
No Matches
DoubleRangeSlider Class Reference

#include <doubleRangeSlider.h>

Inheritance diagram for DoubleRangeSlider:

Public Types

typedef QWidget Superclass
 

Public Slots

void setMinimumValue (double minVal)
 
void setMaximumValue (double maxVal)
 
void setValues (double minVal, double maxVal)
 Utility function that set the minimum value and maximum value at once.
 

Signals

void minimumValueChanged (double minVal)
 
void maximumValueChanged (double maxVal)
 
void valuesChanged (double minVal, double maxVal)
 Utility signal that is fired when minimum or maximum values have changed.
 
void minimumPositionChanged (double minPos)
 
void maximumPositionChanged (double maxPos)
 
void positionsChanged (double minPos, double maxPos)
 
void sliderPressed ()
 
void sliderReleased ()
 
void rangeChanged (double min, double max)
 

Public Member Functions

 DoubleRangeSlider (Qt::Orientation o, QWidget *par=0)
 
 DoubleRangeSlider (QWidget *par=0)
 
virtual ~DoubleRangeSlider ()
 Destructor.
 
void setSingleStep (double ss)
 
double singleStep () const
 
bool isValidStep (double step) const
 
void setTickInterval (double ti)
 
double tickInterval () const
 
void setTickPosition (QSlider::TickPosition position)
 
QSlider::TickPosition tickPosition () const
 
double minimum () const
 
void setMinimum (double min)
 
double maximum () const
 
void setMaximum (double max)
 
void setRange (double min, double max)
 
double minimumValue () const
 
double maximumValue () const
 
double minimumPosition () const
 
void setMinimumPosition (double minPos)
 
double maximumPosition () const
 
void setMaximumPosition (double maxPos)
 
void setPositions (double minPos, double maxPos)
 
void setTracking (bool enable)
 
bool hasTracking () const
 
void triggerAction (QAbstractSlider::SliderAction action)
 
Qt::Orientation orientation () const
 
void setOrientation (Qt::Orientation orientation)
 
bool symmetricMoves () const
 
void setSymmetricMoves (bool symmetry)
 
void setValueProxy (ValueProxy *proxy)
 
ValueProxyvalueProxy () const
 

Protected Slots

void onValuesChanged (int min, int max)
 
void onMinPosChanged (int value)
 
void onMaxPosChanged (int value)
 
void onPositionsChanged (int min, int max)
 
void onRangeChanged (int min, int max)
 
void onValueProxyAboutToBeModified ()
 
void onValueProxyModified ()
 

Protected Member Functions

RangeSliderslider () const
 
void setSlider (RangeSlider *slider)
 Subclasses can change the internal slider.
 

Protected Attributes

QScopedPointer< DoubleRangeSliderPrivated_ptr
 

Properties

double minimum
 
double maximum
 
double singleStep
 
double minimumValue
 
double maximumValue
 
double minimumPosition
 
double maximumPosition
 
bool tracking
 
Qt::Orientation orientation
 
double tickInterval
 
QSlider::TickPosition tickPosition
 
bool symmetricMoves
 

Private Member Functions

 Q_DECLARE_PRIVATE (DoubleRangeSlider)
 
 Q_DISABLE_COPY (DoubleRangeSlider)
 

Detailed Description

DoubleRangeSlider is a slider that controls 2 numbers as double. DoubleRangeSlider internally aggregates a RangeSlider (not in the API to prevent misuse). Only subclasses can have access to it.

See also
RangeSlider, DoubleSlider, RangeWidget

Constructor & Destructor Documentation

◆ DoubleRangeSlider() [1/2]

DoubleRangeSlider::DoubleRangeSlider ( Qt::Orientation o,
QWidget * par = 0 )

Constructor, builds a DoubleRangeSlider whose default values are the same as RangeSlider.

◆ DoubleRangeSlider() [2/2]

DoubleRangeSlider::DoubleRangeSlider ( QWidget * par = 0)

Constructor, builds a DoubleRangeSlider whose default values are the same as RangeSlider.

Member Function Documentation

◆ isValidStep()

bool DoubleRangeSlider::isValidStep ( double step) const

Return true if the step can be handled by the slider, false otherwise. An invalid step is a step that can't be used to convert from double to int (too large or too small).

See also
singleStep

◆ maximum()

double DoubleRangeSlider::maximum ( ) const

This property holds the slider's maximum value. When setting this property, the minimum is adjusted if necessary to ensure that the range remains valid. Also the slider's current values are adjusted to be within the new range.

◆ maximumPosition()

double DoubleRangeSlider::maximumPosition ( ) const

This property holds the current slider maximum position. If tracking is enabled (the default), this is identical to maximumValue.

◆ maximumPositionChanged

void DoubleRangeSlider::maximumPositionChanged ( double maxPos)
signal

This signal is emitted when sliderDown is true and the slider moves. This usually happens when the user is dragging the maximum slider. The value is the new slider maximum position. This signal is emitted even when tracking is turned off.

◆ maximumValue()

double DoubleRangeSlider::maximumValue ( ) const

This property holds the slider's current maximum value. The slider forces the maximum value to be within the legal range: minimum <= minvalue <= maxvalue <= maximum. Changing the maximumValue also changes the maximumPosition.

◆ maximumValueChanged

void DoubleRangeSlider::maximumValueChanged ( double maxVal)
signal

This signal is emitted when the slider maximum value has changed, with the new slider value as argument.

◆ minimum()

double DoubleRangeSlider::minimum ( ) const

This property holds the sliders's minimum value. When setting this property, the maximum is adjusted if necessary to ensure that the range remains valid. Also the slider's current values are adjusted to be within the new range.

◆ minimumPosition()

double DoubleRangeSlider::minimumPosition ( ) const

This property holds the current slider minimum position. If tracking is enabled (the default), this is identical to minimumValue.

◆ minimumPositionChanged

void DoubleRangeSlider::minimumPositionChanged ( double minPos)
signal

This signal is emitted when sliderDown is true and the slider moves. This usually happens when the user is dragging the minimum slider. The value is the new slider minimum position. This signal is emitted even when tracking is turned off.

◆ minimumValue()

double DoubleRangeSlider::minimumValue ( ) const

This property holds the slider's current minimum value. The slider forces the minimum value to be within the legal range: minimum <= minvalue <= maxvalue <= maximum. Changing the minimumValue also changes the minimumPosition.

◆ minimumValueChanged

void DoubleRangeSlider::minimumValueChanged ( double minVal)
signal

This signal is emitted when the slider minimum value has changed, with the new slider value as argument.

◆ orientation()

Qt::Orientation DoubleRangeSlider::orientation ( ) const

This property holds the orientation of the slider. The orientation must be Qt::Vertical (the default) or Qt::Horizontal.

◆ positionsChanged

void DoubleRangeSlider::positionsChanged ( double minPos,
double maxPos )
signal

Utility signal that is fired when minimum or maximum positions have changed.

◆ rangeChanged

void DoubleRangeSlider::rangeChanged ( double min,
double max )
signal

This signal is emitted when the slider range has changed, with min being the new minimum, and max being the new maximum. Warning: don't confound with valuesChanged(double, double);

See also
QAbstractSlider::rangeChanged()

◆ setMaximumValue

void DoubleRangeSlider::setMaximumValue ( double maxVal)
slot

This property holds the slider's current maximum value. The slider forces the maximum value to be within the legal range: minimum <= minvalue <= maxvalue <= maximum. Changing the maximumValue also changes the maximumPosition.

◆ setMinimumValue

void DoubleRangeSlider::setMinimumValue ( double minVal)
slot

This property holds the slider's current minimum value. The slider forces the minimum value to be within the legal range: minimum <= minvalue <= maxvalue <= maximum. Changing the minimumValue also changes the minimumPosition.

◆ setPositions()

void DoubleRangeSlider::setPositions ( double minPos,
double maxPos )

Utility function that set the minimum position and maximum position at once.

◆ setRange()

void DoubleRangeSlider::setRange ( double min,
double max )

Sets the slider's minimum to min and its maximum to max. If max is smaller than min, min becomes the only legal value.

◆ setSingleStep()

void DoubleRangeSlider::setSingleStep ( double ss)

This property holds the single step. The smaller of two natural steps that an abstract sliders provides and typically corresponds to the user pressing an arrow key

See also
isValidStep()

◆ setTickInterval()

void DoubleRangeSlider::setTickInterval ( double ti)

This property holds the interval between tickmarks. This is a value interval, not a pixel interval. If it is 0, the slider will choose between lineStep() and pageStep(). The default value is 0.

◆ setTickPosition()

void DoubleRangeSlider::setTickPosition ( QSlider::TickPosition position)

This property holds the tickmark position for this slider. The valid values are described by the QSlider::TickPosition enum. The default value is QSlider::NoTicks.

◆ setTracking()

void DoubleRangeSlider::setTracking ( bool enable)

This property holds whether slider tracking is enabled. If tracking is enabled (the default), the slider emits the minimumValueChanged() signal while the left/bottom handler is being dragged and the slider emits the maximumValueChanged() signal while the right/top handler is being dragged. If tracking is disabled, the slider emits the minimumValueChanged() and maximumValueChanged() signals only when the user releases the slider.

◆ setValueProxy()

void DoubleRangeSlider::setValueProxy ( ValueProxy * proxy)

Set/Get the value proxy of the internal range slider.

See also
setValueProxy(), valueProxy()

◆ sliderPressed

void DoubleRangeSlider::sliderPressed ( )
signal

This signal is emitted when the user presses one slider with the mouse, or programmatically when setSliderDown(true) is called.

◆ sliderReleased

void DoubleRangeSlider::sliderReleased ( )
signal

This signal is emitted when the user releases one slider with the mouse, or programmatically when setSliderDown(false) is called.

◆ symmetricMoves()

bool DoubleRangeSlider::symmetricMoves ( ) const

When symmetricMoves is true, moving a handle will move the other handle symmetrically, otherwise the handles are independent. False by default

◆ triggerAction()

void DoubleRangeSlider::triggerAction ( QAbstractSlider::SliderAction action)

Triggers a slider action on the current slider. Possible actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove.


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