QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Slots | Signals | Public Member Functions | List of all members
QgsRangeSlider Class Reference

A slider control with two interactive endpoints, for interactive selection of a range of values. More...

#include <qgsrangeslider.h>

Inheritance diagram for QgsRangeSlider:
Inheritance graph
[legend]

Public Slots

bool event (QEvent *event) override
 
void setLowerValue (int value)
 Sets the lower value for the range currently selected in the widget. More...
 
void setMaximum (int maximum)
 Sets the maximum value allowed in the widget. More...
 
void setMinimum (int minimum)
 Sets the minimum value allowed in the widget. More...
 
void setPageStep (int step)
 Sets the page step value for the widget. More...
 
void setRange (int lower, int upper)
 Sets the current range selected in the widget. More...
 
void setRangeLimits (int minimum, int maximum)
 Sets the minimum and maximum range limits for values allowed in the widget. More...
 
void setSingleStep (int step)
 Sets the single step value for the widget. More...
 
void setUpperValue (int value)
 Sets the upper value for the range currently selected in the widget. More...
 

Signals

void rangeChanged (int minimum, int maximum)
 Emitted when the range selected in the widget is changed. More...
 
void rangeLimitsChanged (int minimum, int maximum)
 Emitted when the limits of values allowed in the widget is changed. More...
 

Public Member Functions

 QgsRangeSlider (Qt::Orientation orientation, QWidget *parent=nullptr)
 Constructor for QgsRangeSlider, with the specified parent widget. More...
 
 QgsRangeSlider (QWidget *parent=nullptr)
 Constructor for QgsRangeSlider, with the specified parent widget. More...
 
bool flippedDirection () const
 Returns true if the slider has its values flipped. More...
 
void keyPressEvent (QKeyEvent *event) override
 
int lowerValue () const
 Returns the lower value for the range selected in the widget. More...
 
int maximum () const
 Returns the maximum value allowed by the widget. More...
 
int minimum () const
 Returns the minimum value allowed by the widget. More...
 
QSize minimumSizeHint () const override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
Qt::Orientation orientation () const
 Returns the orientation of the slider. More...
 
int pageStep () const
 Returns the page step value for the widget. More...
 
void paintEvent (QPaintEvent *event) override
 
void setFlippedDirection (bool flipped)
 Sets whether the slider has its values flipped. More...
 
void setOrientation (Qt::Orientation orientation)
 Sets the orientation of the slider. More...
 
void setTickInterval (int interval)
 Sets the interval for tick marks shown in the widget. More...
 
void setTickPosition (QSlider::TickPosition position)
 Sets the position of the tick marks shown in the widget. More...
 
int singleStep () const
 Returns the single step value for the widget. More...
 
QSize sizeHint () const override
 
int tickInterval () const
 Returns the interval for tick marks shown in the widget. More...
 
QSlider::TickPosition tickPosition () const
 Returns the position of the tick marks shown in the widget. More...
 
int upperValue () const
 Returns the upper value for the range selected in the widget. More...
 

Detailed Description

A slider control with two interactive endpoints, for interactive selection of a range of values.

Since
QGIS 3.18

Definition at line 31 of file qgsrangeslider.h.

Constructor & Destructor Documentation

◆ QgsRangeSlider() [1/2]

QgsRangeSlider::QgsRangeSlider ( QWidget *  parent = nullptr)

Constructor for QgsRangeSlider, with the specified parent widget.

Definition at line 20 of file qgsrangeslider.cpp.

◆ QgsRangeSlider() [2/2]

QgsRangeSlider::QgsRangeSlider ( Qt::Orientation  orientation,
QWidget *  parent = nullptr 
)

Constructor for QgsRangeSlider, with the specified parent widget.

The orientation parameter determines whether the slider is horizontal or vertical.

Definition at line 25 of file qgsrangeslider.cpp.

Member Function Documentation

◆ event

bool QgsRangeSlider::event ( QEvent *  event)
overrideslot

Definition at line 159 of file qgsrangeslider.cpp.

◆ flippedDirection()

bool QgsRangeSlider::flippedDirection ( ) const

Returns true if the slider has its values flipped.

If this property is false (the default), the minimum and maximum will be shown in its classic position for the widget. If the value is true, the minimum and maximum appear at their opposite location.

See also
setFlippedDirection()

Definition at line 447 of file qgsrangeslider.cpp.

◆ keyPressEvent()

void QgsRangeSlider::keyPressEvent ( QKeyEvent *  event)
override

Definition at line 714 of file qgsrangeslider.cpp.

◆ lowerValue()

int QgsRangeSlider::lowerValue ( ) const

Returns the lower value for the range selected in the widget.

See also
upperValue()
setLowerValue()

Definition at line 112 of file qgsrangeslider.cpp.

◆ maximum()

int QgsRangeSlider::maximum ( ) const

Returns the maximum value allowed by the widget.

See also
setMaximum()
minimum()

Definition at line 43 of file qgsrangeslider.cpp.

◆ minimum()

int QgsRangeSlider::minimum ( ) const

Returns the minimum value allowed by the widget.

See also
setMinimum()
maximum()

Definition at line 67 of file qgsrangeslider.cpp.

◆ minimumSizeHint()

QSize QgsRangeSlider::minimumSizeHint ( ) const
override

Definition at line 1053 of file qgsrangeslider.cpp.

◆ mouseMoveEvent()

void QgsRangeSlider::mouseMoveEvent ( QMouseEvent *  event)
override

Definition at line 582 of file qgsrangeslider.cpp.

◆ mousePressEvent()

void QgsRangeSlider::mousePressEvent ( QMouseEvent *  event)
override

Definition at line 524 of file qgsrangeslider.cpp.

◆ mouseReleaseEvent()

void QgsRangeSlider::mouseReleaseEvent ( QMouseEvent *  event)
override

Definition at line 701 of file qgsrangeslider.cpp.

◆ orientation()

Qt::Orientation QgsRangeSlider::orientation ( ) const

Returns the orientation of the slider.

See also
setOrientation()

Definition at line 442 of file qgsrangeslider.cpp.

◆ pageStep()

int QgsRangeSlider::pageStep ( ) const

Returns the page step value for the widget.

This corresponds to the larger increment or decrement applied when the user presses the page increment key (usually PageUp or PageDown).

See also
setPageStep()
singleStep()

Definition at line 388 of file qgsrangeslider.cpp.

◆ paintEvent()

void QgsRangeSlider::paintEvent ( QPaintEvent *  event)
override

Definition at line 458 of file qgsrangeslider.cpp.

◆ rangeChanged

void QgsRangeSlider::rangeChanged ( int  minimum,
int  maximum 
)
signal

Emitted when the range selected in the widget is changed.

◆ rangeLimitsChanged

void QgsRangeSlider::rangeLimitsChanged ( int  minimum,
int  maximum 
)
signal

Emitted when the limits of values allowed in the widget is changed.

◆ setFlippedDirection()

void QgsRangeSlider::setFlippedDirection ( bool  flipped)

Sets whether the slider has its values flipped.

If this property is false (the default), the minimum and maximum will be shown in its classic position for the widget. If the value is true, the minimum and maximum appear at their opposite location. (i.e. minimum at the bottom of a vertical slider, maximum at the top of a vertical slider).

See also
flippedDirection()

Definition at line 452 of file qgsrangeslider.cpp.

◆ setLowerValue

void QgsRangeSlider::setLowerValue ( int  value)
slot

Sets the lower value for the range currently selected in the widget.

See also
lowerValue()
setRange()
setUpperValue()

Definition at line 117 of file qgsrangeslider.cpp.

◆ setMaximum

void QgsRangeSlider::setMaximum ( int  maximum)
slot

Sets the maximum value allowed in the widget.

See also
maximum()
setMinimum()

Definition at line 48 of file qgsrangeslider.cpp.

◆ setMinimum

void QgsRangeSlider::setMinimum ( int  minimum)
slot

Sets the minimum value allowed in the widget.

See also
minimum()
setMaximum()

Definition at line 72 of file qgsrangeslider.cpp.

◆ setOrientation()

void QgsRangeSlider::setOrientation ( Qt::Orientation  orientation)

Sets the orientation of the slider.

See also
orientation()

Definition at line 430 of file qgsrangeslider.cpp.

◆ setPageStep

void QgsRangeSlider::setPageStep ( int  step)
slot

Sets the page step value for the widget.

This corresponds to the larger increment or decrement applied when the user presses the page increment key (usually PageUp or PageDown).

See also
pageStep()
setSingleStep()

Definition at line 393 of file qgsrangeslider.cpp.

◆ setRange

void QgsRangeSlider::setRange ( int  lower,
int  upper 
)
slot

Sets the current range selected in the widget.

See also
setLowerValue()
setUpperValue()

Definition at line 145 of file qgsrangeslider.cpp.

◆ setRangeLimits

void QgsRangeSlider::setRangeLimits ( int  minimum,
int  maximum 
)
slot

Sets the minimum and maximum range limits for values allowed in the widget.

See also
setMinimum()
setMaximum()

Definition at line 90 of file qgsrangeslider.cpp.

◆ setSingleStep

void QgsRangeSlider::setSingleStep ( int  step)
slot

Sets the single step value for the widget.

This corresponds to the smaller increment or decrement applied when the user presses an arrow key.

See also
singleStep()
pageStep()

Definition at line 403 of file qgsrangeslider.cpp.

◆ setTickInterval()

void QgsRangeSlider::setTickInterval ( int  interval)

Sets the interval for tick marks shown in the widget.

See also
tickInterval()

Definition at line 419 of file qgsrangeslider.cpp.

◆ setTickPosition()

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

Sets the position of the tick marks shown in the widget.

See also
tickPosition()

Definition at line 408 of file qgsrangeslider.cpp.

◆ setUpperValue

void QgsRangeSlider::setUpperValue ( int  value)
slot

Sets the upper value for the range currently selected in the widget.

See also
upperValue()
setRange()
setLowerValue()

Definition at line 134 of file qgsrangeslider.cpp.

◆ singleStep()

int QgsRangeSlider::singleStep ( ) const

Returns the single step value for the widget.

This corresponds to the smaller increment or decrement applied when the user presses an arrow key.

See also
setSingleStep()
pageStep()

Definition at line 398 of file qgsrangeslider.cpp.

◆ sizeHint()

QSize QgsRangeSlider::sizeHint ( ) const
override

Definition at line 1032 of file qgsrangeslider.cpp.

◆ tickInterval()

int QgsRangeSlider::tickInterval ( ) const

Returns the interval for tick marks shown in the widget.

See also
setTickInterval()

Definition at line 425 of file qgsrangeslider.cpp.

◆ tickPosition()

QSlider::TickPosition QgsRangeSlider::tickPosition ( ) const

Returns the position of the tick marks shown in the widget.

See also
setTickPosition()

Definition at line 414 of file qgsrangeslider.cpp.

◆ upperValue()

int QgsRangeSlider::upperValue ( ) const

Returns the upper value for the range selected in the widget.

See also
lowerValue()
setUpperValue()

Definition at line 128 of file qgsrangeslider.cpp.


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