Open 3D Engine AzQtComponents API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::SliderInt Class Reference

Control to display a slider for integer value input. More...

#include <Slider.h>

Inherits AzQtComponents::Slider.

Signals

void valueChanged (int value)
 
void rangeChanged (int min, int max)
 Triggered when the minimum or maximum values are changed.
 
- Signals inherited from AzQtComponents::Slider
void sliderPressed ()
 Triggered when the user presses the slider handle.
 
void sliderMoved (int position)
 Triggered when the slider handle position changes via dragging.
 
void sliderReleased ()
 Triggered when the user releases the slider handle.
 
void actionTriggered (int action)
 

Public Member Functions

 SliderInt (QWidget *parent=nullptr)
 
 SliderInt (Qt::Orientation orientation, QWidget *parent=nullptr)
 
void setValue (int value)
 Sets the current value.
 
int value () const
 Gets the current value.
 
void setMinimum (int min)
 Sets the minimum value selectable with this slider.
 
int minimum () const
 Gets the minimum value selectable with this slider.
 
void setMaximum (int max)
 Sets the maximum value selectable with this slider.
 
int maximum () const
 Gets the maximum value selectable with this slider.
 
void setRange (int min, int max)
 Sets the minimum and maximum values.
 
- Public Member Functions inherited from AzQtComponents::Slider
 Slider (QWidget *parent=nullptr)
 
 Slider (Qt::Orientation orientation, QWidget *parent=nullptr)
 
void setOrientation (Qt::Orientation orientation)
 Sets the slider orientation.
 
Qt::Orientation orientation () const
 Gets the slider orientation.
 
void setToolTipOffset (const QPoint &toolTipOffset)
 Sets a custom tooltip offset for this Slider.
 
QPoint toolTipOffset () const
 Gets the tooltip offset for this Slider.
 
void setToolTipOffsetX (int toolTipOffsetX)
 Sets the X component for the tooltip offset for this Slider.
 
int toolTipOffsetX () const
 Gets the X component of the tooltip offset for this Slider.
 
void setToolTipOffsetY (int toolTipOffsetY)
 Sets the Y component for the tooltip offset for this Slider.
 
int toolTipOffsetY () const
 Gets the Y component of the tooltip offset for this Slider.
 
void setToolTipFormatting (const QString &prefix, const QString &postFix)
 
void sliderIsInMoving (bool b)
 Sets the flag that determines whether the handle is being dragged, stopping event detection.
 
bool IsSliderBeingMoved () const
 Returns whether the handle is being dragged.
 
QSize minimumSizeHint () const override
 Returns the recommended minimum size of the underlying QSlider.
 
QSize sizeHint () const override
 Returns the recommended size of the underlying QSlider.
 
void setFocusProxy (QWidget *proxy)
 Exposes the setFocusProxy function from the underlying Slider.
 
QWidget * focusProxy () const
 Exposes the focusProxy function from the underlying Slider.
 
void setTracking (bool enable)
 Exposes the setTracking function from the underlying Slider.
 
bool hasTracking () const
 Exposes the hasTracking function from the underlying Slider.
 

Protected Member Functions

QString hoverValueText (int sliderValue) const override
 
- Protected Member Functions inherited from AzQtComponents::Slider
virtual QString hoverValueText (int sliderValue) const =0
 
bool eventFilter (QObject *watched, QEvent *event) override
 
void ShowValueToolTip (int sliderPos)
 

Properties

int minimum
 Minimum value. Will be to the left for horizontal sliders, or at the bottom for vertical ones.
 
int maximum
 Maximum value. Will be to the right for horizontal sliders, or at the top for vertical ones.
 
int value
 The current value of the slider.
 
- Properties inherited from AzQtComponents::Slider
Qt::Orientation orientation
 Orientation of the slider. Horizontal sliders increase left to right, vertical ones are bottom to top.
 
int toolTipOffsetX
 Horizontal offset for the tooltip displaying the value on hover, in pixels.
 
int toolTipOffsetY
 Vertical offset for the tooltip displaying the value on hover, in pixels.
 

Additional Inherited Members

- Static Public Member Functions inherited from AzQtComponents::Slider
static void showHoverToolTip (const QString &toolTipText, const QPoint &globalPosition, QSlider *slider, QWidget *toolTipParentWidget, int width, int height, const QPoint &toolTipOffset)
 Shows a hover tooltip with the right positioning on top of a slider.
 
static int valueFromPosition (QSlider *slider, const QPoint &pos, int width, int height, int bottom)
 Returns the slider value at the position specified.
 
static void applyMidPointStyle (Slider *slider)
 
static void initStaticVars (const QPoint &verticalToolTipOffset, const QPoint &horizontalToolTipOffset)
 
static Config loadConfig (QSettings &settings)
 
static Config defaultConfig ()
 Gets the default Slider style configuration.
 
- Protected Attributes inherited from AzQtComponents::Slider
CustomSliderm_slider = nullptr
 
QString m_toolTipPrefix
 
QString m_toolTipPostfix
 

Detailed Description

Control to display a slider for integer value input.

Member Function Documentation

◆ hoverValueText()

QString AzQtComponents::SliderInt::hoverValueText ( int  sliderValue) const
overrideprotectedvirtual

◆ valueChanged

void AzQtComponents::SliderInt::valueChanged ( int  value)
signal

Triggered when the slider's value has changed. The tracking setting determines whether this signal is caused by user interaction.


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