#[repr(C)]pub struct QStyleOptionProgressBar { /* private fields */ }
Expand description
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.
C++ class: QStyleOptionProgressBar
.
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.
An instance of the QStyleOptionProgressBar class has type SO_ProgressBar and version 2.
The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.
For an example demonstrating how style options can be used, see the Styles example.
Implementations§
Source§impl QStyleOptionProgressBar
impl QStyleOptionProgressBar
Sourcepub unsafe fn bottom_to_top(&self) -> bool
pub unsafe fn bottom_to_top(&self) -> bool
Returns the value of the bottomToTop
field.
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOptionProgressBar>>,
) -> Ref<QStyleOptionProgressBar>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QStyleOptionProgressBar>>, ) -> Ref<QStyleOptionProgressBar>
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.
Calls C++ function: QStyleOptionProgressBar& QStyleOptionProgressBar::operator=(const QStyleOptionProgressBar& other)
.
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.
An instance of the QStyleOptionProgressBar class has type SO_ProgressBar and version 2.
The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.
For an example demonstrating how style options can be used, see the Styles example.
Sourcepub unsafe fn inverted_appearance(&self) -> bool
pub unsafe fn inverted_appearance(&self) -> bool
Returns the value of the invertedAppearance
field.
Sourcepub unsafe fn new() -> CppBox<QStyleOptionProgressBar>
pub unsafe fn new() -> CppBox<QStyleOptionProgressBar>
Constructs a QStyleOptionProgressBar, initializing the members variables to their default values.
Calls C++ function: [constructor] void QStyleOptionProgressBar::QStyleOptionProgressBar()
.
Constructs a QStyleOptionProgressBar, initializing the members variables to their default values.
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QStyleOptionProgressBar>>,
) -> CppBox<QStyleOptionProgressBar>
pub unsafe fn new_copy( other: impl CastInto<Ref<QStyleOptionProgressBar>>, ) -> CppBox<QStyleOptionProgressBar>
Constructs a copy of the other style option.
Calls C++ function: [constructor] void QStyleOptionProgressBar::QStyleOptionProgressBar(const QStyleOptionProgressBar& other)
.
Constructs a copy of the other style option.
Sourcepub unsafe fn orientation(&self) -> Orientation
pub unsafe fn orientation(&self) -> Orientation
Returns the value of the orientation
field.
Sourcepub unsafe fn set_bottom_to_top(&self, value: bool)
pub unsafe fn set_bottom_to_top(&self, value: bool)
Sets the value of the bottomToTop
field.
Sourcepub unsafe fn set_inverted_appearance(&self, value: bool)
pub unsafe fn set_inverted_appearance(&self, value: bool)
Sets the value of the invertedAppearance
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_orientation(&self, value: Orientation)
pub unsafe fn set_orientation(&self, value: Orientation)
Sets the value of the orientation
field.
Sourcepub unsafe fn set_progress(&self, value: c_int)
pub unsafe fn set_progress(&self, value: c_int)
Sets the value of the progress
field.
Sourcepub unsafe fn set_text(&self, value: impl CastInto<Ref<QString>>)
pub unsafe fn set_text(&self, value: impl CastInto<Ref<QString>>)
Sets the value of the text
field.
Sourcepub unsafe fn set_text_alignment(&self, value: QFlags<AlignmentFlag>)
pub unsafe fn set_text_alignment(&self, value: QFlags<AlignmentFlag>)
Sets the value of the textAlignment
field.
Sourcepub unsafe fn set_text_visible(&self, value: bool)
pub unsafe fn set_text_visible(&self, value: bool)
Sets the value of the textVisible
field.
Sourcepub unsafe fn text_alignment(&self) -> QFlags<AlignmentFlag>
pub unsafe fn text_alignment(&self) -> QFlags<AlignmentFlag>
Returns a reference to the textAlignment
field.
Sourcepub unsafe fn text_visible(&self) -> bool
pub unsafe fn text_visible(&self) -> bool
Returns the value of the textVisible
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 QStyleOptionProgressBar
impl CppDeletable for QStyleOptionProgressBar
Source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.
Calls C++ function: [destructor] void QStyleOptionProgressBar::~QStyleOptionProgressBar()
.
The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar.
An instance of the QStyleOptionProgressBar class has type SO_ProgressBar and version 2.
The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.
For an example demonstrating how style options can be used, see the Styles example.
Source§impl Deref for QStyleOptionProgressBar
impl Deref for QStyleOptionProgressBar
Source§fn deref(&self) -> &QStyleOption
fn deref(&self) -> &QStyleOption
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionProgressBar* ptr)
.
Source§type Target = QStyleOption
type Target = QStyleOption
Source§impl StaticDowncast<QStyleOptionProgressBar> for QStyleOption
impl StaticDowncast<QStyleOptionProgressBar> for QStyleOption
Source§unsafe fn static_downcast(
ptr: Ptr<QStyleOption>,
) -> Ptr<QStyleOptionProgressBar>
unsafe fn static_downcast( ptr: Ptr<QStyleOption>, ) -> Ptr<QStyleOptionProgressBar>
Calls C++ function: QStyleOptionProgressBar* static_cast<QStyleOptionProgressBar*>(QStyleOption* ptr)
.
Source§impl StaticUpcast<QStyleOption> for QStyleOptionProgressBar
impl StaticUpcast<QStyleOption> for QStyleOptionProgressBar
Source§unsafe fn static_upcast(ptr: Ptr<QStyleOptionProgressBar>) -> Ptr<QStyleOption>
unsafe fn static_upcast(ptr: Ptr<QStyleOptionProgressBar>) -> Ptr<QStyleOption>
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionProgressBar* ptr)
.