Class QSliderPopup
Popup widget containing a labeled slider. More...
#include <widgets.h>
Inherits the following classes: QWidget
Public Functions
| Type | Name |
|---|---|
| QSliderPopup (int min, int max, int value, Qt::Orientation orientation, QWidget * parent=nullptr) Constructs a frameless popup widget containing a labeled slider with a specified range and orientation. |
|
| void | SetDisplayLabels (const bool value) const Sets whether text labels are displayed along the slider. |
| void | SetLabelInterval (const int value) const Sets the interval for displaying labels on the slider. |
| void | SetMaximum (const int max) const Sets the maximum value of the slider. |
| void | SetMinimum (const int min) const Sets the minimum value of the slider. |
| int | value () const returns the value of the slider. |
Detailed Description
This class implements a popup widget that encapsulates a custom labeled slider widget. It provides functionality to access the slider's value as well as modify its minimum and maximum bounds. The slider is displayed within a vertical layout to ensure proper placement within the widget.
Public Functions Documentation
function QSliderPopup
Constructs a frameless popup widget containing a labeled slider with a specified range and orientation.
QSliderPopup::QSliderPopup (
int min,
int max,
int value,
Qt::Orientation orientation,
QWidget * parent=nullptr
)
This constructor initializes a QSliderPopup containing a QSliderLabeled widget integrated within a vertical layout. The slider is configured with the provided minimum value, maximum value, and default value. The orientation of the slider (horizontal or vertical) is set based on the given parameter. The widget is styled as a frameless popup window.
Parameters:
minThe minimum value of the slider.maxThe maximum value of the slider.valueThe initial value of the slider.orientationThe orientation of the slider (Qt::HorizontalorQt::Vertical).parentThe parent widget of the popup, can be null.
Returns:
An instance of the QSliderPopup class.
function SetDisplayLabels
Sets whether text labels are displayed along the slider.
This method enables or disables the display of labels on the slider based on the input value. When set to true, labels corresponding to values in the slider are shown, otherwise, labels are hidden.
Parameters:
valueBoolean indicating whether to display labels (true) or not (false).
function SetLabelInterval
Sets the interval for displaying labels on the slider.
Defines the interval between adjacent labels displayed along the slider. This allows customization of how frequently labels appear on the slider based on the specified interval value.
Parameters:
valueThe numerical value representing the interval between labels
function SetMaximum
Sets the maximum value of the slider.
Parameters:
maxmaximum value.
function SetMinimum
Sets the minimum value of the slider.
Parameters:
minminimum value.
function value
returns the value of the slider.
Returns:
value of hte slider.
The documentation for this class was generated from the following file src/widgets.h