#[repr(C)]pub struct QStyleOptionSlider { /* private fields */ }Expand description
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider.
C++ class: QStyleOptionSlider.
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider.
QStyleOptionSlider contains all the information that QStyle functions need to draw QSlider and QScrollBar.
For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.
For an example demonstrating how style options can be used, see the Styles example.
Implementations§
Source§impl QStyleOptionSlider
impl QStyleOptionSlider
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOptionSlider>>,
) -> Ref<QStyleOptionSlider>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QStyleOptionSlider>>, ) -> Ref<QStyleOptionSlider>
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider.
Calls C++ function: QStyleOptionSlider& QStyleOptionSlider::operator=(const QStyleOptionSlider& other).
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider.
QStyleOptionSlider contains all the information that QStyle functions need to draw QSlider and QScrollBar.
For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.
For an example demonstrating how style options can be used, see the Styles example.
Sourcepub unsafe fn dial_wrapping(&self) -> bool
pub unsafe fn dial_wrapping(&self) -> bool
Returns the value of the dialWrapping field.
Sourcepub unsafe fn new() -> CppBox<QStyleOptionSlider>
pub unsafe fn new() -> CppBox<QStyleOptionSlider>
Constructs a QStyleOptionSlider, initializing the members variables to their default values.
Calls C++ function: [constructor] void QStyleOptionSlider::QStyleOptionSlider().
Constructs a QStyleOptionSlider, initializing the members variables to their default values.
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QStyleOptionSlider>>,
) -> CppBox<QStyleOptionSlider>
pub unsafe fn new_copy( other: impl CastInto<Ref<QStyleOptionSlider>>, ) -> CppBox<QStyleOptionSlider>
Constructs a copy of the other style option.
Calls C++ function: [constructor] void QStyleOptionSlider::QStyleOptionSlider(const QStyleOptionSlider& other).
Constructs a copy of the other style option.
Sourcepub unsafe fn notch_target(&self) -> c_double
pub unsafe fn notch_target(&self) -> c_double
Returns the value of the notchTarget field.
Sourcepub unsafe fn orientation(&self) -> Orientation
pub unsafe fn orientation(&self) -> Orientation
Returns the value of the orientation field.
Sourcepub unsafe fn set_dial_wrapping(&self, value: bool)
pub unsafe fn set_dial_wrapping(&self, value: bool)
Sets the value of the dialWrapping field.
Sourcepub unsafe fn set_maximum(&self, value: c_int)
pub unsafe fn set_maximum(&self, value: c_int)
Sets the value of the maximum field.
Sourcepub unsafe fn set_minimum(&self, value: c_int)
pub unsafe fn set_minimum(&self, value: c_int)
Sets the value of the minimum field.
Sourcepub unsafe fn set_notch_target(&self, value: c_double)
pub unsafe fn set_notch_target(&self, value: c_double)
Sets the value of the notchTarget field.
Sourcepub unsafe fn set_orientation(&self, value: Orientation)
pub unsafe fn set_orientation(&self, value: Orientation)
Sets the value of the orientation field.
Sourcepub unsafe fn set_page_step(&self, value: c_int)
pub unsafe fn set_page_step(&self, value: c_int)
Sets the value of the pageStep field.
Sourcepub unsafe fn set_single_step(&self, value: c_int)
pub unsafe fn set_single_step(&self, value: c_int)
Sets the value of the singleStep field.
Sourcepub unsafe fn set_slider_position(&self, value: c_int)
pub unsafe fn set_slider_position(&self, value: c_int)
Sets the value of the sliderPosition field.
Sourcepub unsafe fn set_slider_value(&self, value: c_int)
pub unsafe fn set_slider_value(&self, value: c_int)
Sets the value of the sliderValue field.
Sourcepub unsafe fn set_tick_interval(&self, value: c_int)
pub unsafe fn set_tick_interval(&self, value: c_int)
Sets the value of the tickInterval field.
Sourcepub unsafe fn set_tick_position(&self, value: TickPosition)
pub unsafe fn set_tick_position(&self, value: TickPosition)
Sets the value of the tickPosition field.
Sourcepub unsafe fn set_upside_down(&self, value: bool)
pub unsafe fn set_upside_down(&self, value: bool)
Sets the value of the upsideDown field.
Sourcepub unsafe fn single_step(&self) -> c_int
pub unsafe fn single_step(&self) -> c_int
Returns the value of the singleStep field.
Sourcepub unsafe fn slider_position(&self) -> c_int
pub unsafe fn slider_position(&self) -> c_int
Returns the value of the sliderPosition field.
Sourcepub unsafe fn slider_value(&self) -> c_int
pub unsafe fn slider_value(&self) -> c_int
Returns the value of the sliderValue field.
Sourcepub unsafe fn tick_interval(&self) -> c_int
pub unsafe fn tick_interval(&self) -> c_int
Returns the value of the tickInterval field.
Sourcepub unsafe fn tick_position(&self) -> TickPosition
pub unsafe fn tick_position(&self) -> TickPosition
Returns the value of the tickPosition field.
Sourcepub unsafe fn upside_down(&self) -> bool
pub unsafe fn upside_down(&self) -> bool
Returns the value of the upsideDown field.
Methods from Deref<Target = QStyleOptionComplex>§
Sourcepub unsafe fn active_sub_controls(&self) -> QFlags<SubControl>
pub unsafe fn active_sub_controls(&self) -> QFlags<SubControl>
Returns a reference to the activeSubControls field.
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOptionComplex>>,
) -> Ref<QStyleOptionComplex>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QStyleOptionComplex>>, ) -> Ref<QStyleOptionComplex>
The QStyleOptionComplex class is used to hold parameters that are common to all complex controls.
Calls C++ function: QStyleOptionComplex& QStyleOptionComplex::operator=(const QStyleOptionComplex& other).
The QStyleOptionComplex class is used to hold parameters that are common to all complex controls.
This class is not used on its own. Instead it is used to derive other complex control options, for example QStyleOptionSlider and QStyleOptionSpinBox.
For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator).
For an example demonstrating how style options can be used, see the Styles example.
Sourcepub unsafe fn set_active_sub_controls(&self, value: QFlags<SubControl>)
pub unsafe fn set_active_sub_controls(&self, value: QFlags<SubControl>)
Sets the value of the activeSubControls field.
Sourcepub unsafe fn set_sub_controls(&self, value: QFlags<SubControl>)
pub unsafe fn set_sub_controls(&self, value: QFlags<SubControl>)
Sets the value of the subControls field.
Sourcepub unsafe fn sub_controls(&self) -> QFlags<SubControl>
pub unsafe fn sub_controls(&self) -> QFlags<SubControl>
Returns a reference to the subControls field.
Methods from Deref<Target = QStyleOption>§
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOption>>,
) -> Ref<QStyleOption>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QStyleOption>>, ) -> Ref<QStyleOption>
Assign other to this QStyleOption.
Calls C++ function: QStyleOption& QStyleOption::operator=(const QStyleOption& other).
Assign other to this QStyleOption.
Sourcepub unsafe fn direction(&self) -> LayoutDirection
pub unsafe fn direction(&self) -> LayoutDirection
Returns the value of the direction field.
Sourcepub unsafe fn font_metrics(&self) -> Ref<QFontMetrics>
pub unsafe fn font_metrics(&self) -> Ref<QFontMetrics>
Returns a reference to the fontMetrics field.
Sourcepub unsafe fn font_metrics_mut(&self) -> Ref<QFontMetrics>
pub unsafe fn font_metrics_mut(&self) -> Ref<QFontMetrics>
Returns a mutable reference to the fontMetrics field.
Sourcepub unsafe fn init(&self, w: impl CastInto<Ptr<QWidget>>)
pub unsafe fn init(&self, w: impl CastInto<Ptr<QWidget>>)
Sourcepub unsafe fn init_from(&self, w: impl CastInto<Ptr<QWidget>>)
pub unsafe fn init_from(&self, w: impl CastInto<Ptr<QWidget>>)
Initializes the state, direction, rect, palette, fontMetrics and styleObject member variables based on the specified widget.
Calls C++ function: void QStyleOption::initFrom(const QWidget* w).
Initializes the state, direction, rect, palette, fontMetrics and styleObject member variables based on the specified widget.
This is a convenience function; the member variables can also be initialized manually.
This function was introduced in Qt 4.1.
See also QWidget::layoutDirection(), QWidget::rect(), QWidget::palette(), and QWidget::fontMetrics().
Sourcepub unsafe fn palette_mut(&self) -> Ref<QPalette>
pub unsafe fn palette_mut(&self) -> Ref<QPalette>
Returns a mutable reference to the palette field.
Sourcepub unsafe fn set_direction(&self, value: LayoutDirection)
pub unsafe fn set_direction(&self, value: LayoutDirection)
Sets the value of the direction field.
Sourcepub unsafe fn set_font_metrics(&self, value: impl CastInto<Ref<QFontMetrics>>)
pub unsafe fn set_font_metrics(&self, value: impl CastInto<Ref<QFontMetrics>>)
Sets the value of the fontMetrics field.
Sourcepub unsafe fn set_palette(&self, value: impl CastInto<Ref<QPalette>>)
pub unsafe fn set_palette(&self, value: impl CastInto<Ref<QPalette>>)
Sets the value of the palette field.
Sourcepub unsafe fn set_rect(&self, value: impl CastInto<Ref<QRect>>)
pub unsafe fn set_rect(&self, value: impl CastInto<Ref<QRect>>)
Sets the value of the rect field.
Sourcepub unsafe fn set_style_object(&self, value: impl CastInto<Ptr<QObject>>)
pub unsafe fn set_style_object(&self, value: impl CastInto<Ptr<QObject>>)
Sets the value of the styleObject field.
Sourcepub unsafe fn set_version(&self, value: c_int)
pub unsafe fn set_version(&self, value: c_int)
Sets the value of the version field.
Sourcepub unsafe fn style_object(&self) -> QPtr<QObject>
pub unsafe fn style_object(&self) -> QPtr<QObject>
Returns the value of the styleObject field.
Trait Implementations§
Source§impl CppDeletable for QStyleOptionSlider
impl CppDeletable for QStyleOptionSlider
Source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider.
Calls C++ function: [destructor] void QStyleOptionSlider::~QStyleOptionSlider().
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider.
QStyleOptionSlider contains all the information that QStyle functions need to draw QSlider and QScrollBar.
For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.
For an example demonstrating how style options can be used, see the Styles example.
Source§impl Deref for QStyleOptionSlider
impl Deref for QStyleOptionSlider
Source§fn deref(&self) -> &QStyleOptionComplex
fn deref(&self) -> &QStyleOptionComplex
Calls C++ function: QStyleOptionComplex* static_cast<QStyleOptionComplex*>(QStyleOptionSlider* ptr).
Source§type Target = QStyleOptionComplex
type Target = QStyleOptionComplex
Source§impl StaticDowncast<QStyleOptionSlider> for QStyleOption
impl StaticDowncast<QStyleOptionSlider> for QStyleOption
Source§unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionSlider>
unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionSlider>
Calls C++ function: QStyleOptionSlider* static_cast<QStyleOptionSlider*>(QStyleOption* ptr).
Source§impl StaticDowncast<QStyleOptionSlider> for QStyleOptionComplex
impl StaticDowncast<QStyleOptionSlider> for QStyleOptionComplex
Source§unsafe fn static_downcast(
ptr: Ptr<QStyleOptionComplex>,
) -> Ptr<QStyleOptionSlider>
unsafe fn static_downcast( ptr: Ptr<QStyleOptionComplex>, ) -> Ptr<QStyleOptionSlider>
Calls C++ function: QStyleOptionSlider* static_cast<QStyleOptionSlider*>(QStyleOptionComplex* ptr).
Source§impl StaticUpcast<QStyleOption> for QStyleOptionSlider
impl StaticUpcast<QStyleOption> for QStyleOptionSlider
Source§unsafe fn static_upcast(ptr: Ptr<QStyleOptionSlider>) -> Ptr<QStyleOption>
unsafe fn static_upcast(ptr: Ptr<QStyleOptionSlider>) -> Ptr<QStyleOption>
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionSlider* ptr).
Source§impl StaticUpcast<QStyleOptionComplex> for QStyleOptionSlider
impl StaticUpcast<QStyleOptionComplex> for QStyleOptionSlider
Source§unsafe fn static_upcast(
ptr: Ptr<QStyleOptionSlider>,
) -> Ptr<QStyleOptionComplex>
unsafe fn static_upcast( ptr: Ptr<QStyleOptionSlider>, ) -> Ptr<QStyleOptionComplex>
Calls C++ function: QStyleOptionComplex* static_cast<QStyleOptionComplex*>(QStyleOptionSlider* ptr).