#[repr(C)]pub struct QStyleOptionFrame { /* private fields */ }
Expand description
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
C++ class: QStyleOptionFrame
.
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
QStyleOptionFrame is used for drawing several built-in Qt widgets, including QFrame, QGroupBox, QLineEdit, and QMenu.
An instance of the QStyleOptionFrame class has type SO_Frame and version 3.
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 QStyleOptionFrame
impl QStyleOptionFrame
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QStyleOptionFrame>>,
) -> Ref<QStyleOptionFrame>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QStyleOptionFrame>>, ) -> Ref<QStyleOptionFrame>
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
Calls C++ function: QStyleOptionFrame& QStyleOptionFrame::operator=(const QStyleOptionFrame& other)
.
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
QStyleOptionFrame is used for drawing several built-in Qt widgets, including QFrame, QGroupBox, QLineEdit, and QMenu.
An instance of the QStyleOptionFrame class has type SO_Frame and version 3.
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 features(&self) -> QFlags<FrameFeature>
pub unsafe fn features(&self) -> QFlags<FrameFeature>
Returns a reference to the features
field.
Sourcepub unsafe fn frame_shape(&self) -> Shape
pub unsafe fn frame_shape(&self) -> Shape
Returns the value of the frameShape
field.
Sourcepub unsafe fn line_width(&self) -> c_int
pub unsafe fn line_width(&self) -> c_int
Returns the value of the lineWidth
field.
Sourcepub unsafe fn mid_line_width(&self) -> c_int
pub unsafe fn mid_line_width(&self) -> c_int
Returns the value of the midLineWidth
field.
Sourcepub unsafe fn new() -> CppBox<QStyleOptionFrame>
pub unsafe fn new() -> CppBox<QStyleOptionFrame>
Constructs a QStyleOptionFrame, initializing the members variables to their default values.
Calls C++ function: [constructor] void QStyleOptionFrame::QStyleOptionFrame()
.
Constructs a QStyleOptionFrame, initializing the members variables to their default values.
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QStyleOptionFrame>>,
) -> CppBox<QStyleOptionFrame>
pub unsafe fn new_copy( other: impl CastInto<Ref<QStyleOptionFrame>>, ) -> CppBox<QStyleOptionFrame>
Constructs a copy of the other style option.
Calls C++ function: [constructor] void QStyleOptionFrame::QStyleOptionFrame(const QStyleOptionFrame& other)
.
Constructs a copy of the other style option.
Sourcepub unsafe fn set_features(&self, value: QFlags<FrameFeature>)
pub unsafe fn set_features(&self, value: QFlags<FrameFeature>)
Sets the value of the features
field.
Sourcepub unsafe fn set_frame_shape(&self, value: Shape)
pub unsafe fn set_frame_shape(&self, value: Shape)
Sets the value of the frameShape
field.
Sourcepub unsafe fn set_line_width(&self, value: c_int)
pub unsafe fn set_line_width(&self, value: c_int)
Sets the value of the lineWidth
field.
Sourcepub unsafe fn set_mid_line_width(&self, value: c_int)
pub unsafe fn set_mid_line_width(&self, value: c_int)
Sets the value of the midLineWidth
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 QStyleOptionFrame
impl CppDeletable for QStyleOptionFrame
Source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
Calls C++ function: [destructor] void QStyleOptionFrame::~QStyleOptionFrame()
.
The QStyleOptionFrame class is used to describe the parameters for drawing a frame.
QStyleOptionFrame is used for drawing several built-in Qt widgets, including QFrame, QGroupBox, QLineEdit, and QMenu.
An instance of the QStyleOptionFrame class has type SO_Frame and version 3.
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 QStyleOptionFrame
impl Deref for QStyleOptionFrame
Source§fn deref(&self) -> &QStyleOption
fn deref(&self) -> &QStyleOption
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionFrame* ptr)
.
Source§type Target = QStyleOption
type Target = QStyleOption
Source§impl StaticDowncast<QStyleOptionFrame> for QStyleOption
impl StaticDowncast<QStyleOptionFrame> for QStyleOption
Source§unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionFrame>
unsafe fn static_downcast(ptr: Ptr<QStyleOption>) -> Ptr<QStyleOptionFrame>
Calls C++ function: QStyleOptionFrame* static_cast<QStyleOptionFrame*>(QStyleOption* ptr)
.
Source§impl StaticUpcast<QStyleOption> for QStyleOptionFrame
impl StaticUpcast<QStyleOption> for QStyleOptionFrame
Source§unsafe fn static_upcast(ptr: Ptr<QStyleOptionFrame>) -> Ptr<QStyleOption>
unsafe fn static_upcast(ptr: Ptr<QStyleOptionFrame>) -> Ptr<QStyleOption>
Calls C++ function: QStyleOption* static_cast<QStyleOption*>(QStyleOptionFrame* ptr)
.