Base class for Slider components. Wraps a CustomSlider to provide additional styling options and functionality.
More...
#include <Slider.h>
Inherits QWidget.
Inherited by AzQtComponents::SliderDouble, and AzQtComponents::SliderInt.
|
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) |
|
|
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.
|
|
|
virtual QString | hoverValueText (int sliderValue) const =0 |
|
bool | eventFilter (QObject *watched, QEvent *event) override |
|
void | ShowValueToolTip (int sliderPos) |
|
|
CustomSlider * | m_slider = nullptr |
|
QString | m_toolTipPrefix |
|
QString | m_toolTipPostfix |
|
|
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.
|
|
Base class for Slider components. Wraps a CustomSlider to provide additional styling options and functionality.
◆ actionTriggered
void AzQtComponents::Slider::actionTriggered |
( |
int |
action | ) |
|
|
signal |
Exposes the actionTriggered signal from the underlying QSlider. This signal is triggered when a slider action is executed. Actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove.
◆ applyMidPointStyle()
static void AzQtComponents::Slider::applyMidPointStyle |
( |
Slider * |
slider | ) |
|
|
static |
Applies the "Midpoint" styling to a Slider. "Midpoint" styling shows a tick halfway through the slider, and has the hover lines originate from it.
◆ initStaticVars()
static void AzQtComponents::Slider::initStaticVars |
( |
const QPoint & |
verticalToolTipOffset, |
|
|
const QPoint & |
horizontalToolTipOffset |
|
) |
| |
|
static |
Initializes the static variables used by the Slider class.
- Parameters
-
verticalToolTipOffset | Offset for the hover tooltip on sliders with the vertical orientation. |
horizontalToolTipOffset | Offset for the hover tooltip on sliders with the horizontal orientation. |
◆ loadConfig()
static Config AzQtComponents::Slider::loadConfig |
( |
QSettings & |
settings | ) |
|
|
static |
Sets the Slider style configuration.
- Parameters
-
settings | The settings object to load the configuration from. |
- Returns
- The new configuration of the Slider.
◆ setToolTipFormatting()
void AzQtComponents::Slider::setToolTipFormatting |
( |
const QString & |
prefix, |
|
|
const QString & |
postFix |
|
) |
| |
Apply custom formatting to the hover tooltip.
- Parameters
-
prefix | Text to prefix to the slider value being hovered (for example, "$10"). |
postFix | Text to postfix to the slider value being hovered (for example, "10%"). |
The documentation for this class was generated from the following file:
- Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Slider.h