[][src]Struct qt_widgets::QStyle

#[repr(C)]
pub struct QStyle { /* fields omitted */ }

The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.

C++ class: QStyle.

C++ documentation:

The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.

Qt contains a set of QStyle subclasses that emulate the styles of the different platforms supported by Qt (QWindowsStyle, QMacStyle etc.). By default, these styles are built into the Qt GUI module. Styles can also be made available as plugins.

Qt's built-in widgets use QStyle to perform nearly all of their drawing, ensuring that they look exactly like the equivalent native widgets. The diagram below shows a QComboBox in nine different styles.

Nine combo boxes

Topics:

Methods

impl QStyle[src]

pub unsafe fn aligned_rect(
    direction: LayoutDirection,
    alignment: QFlags<AlignmentFlag>,
    size: impl CastInto<Ref<QSize>>,
    rectangle: impl CastInto<Ref<QRect>>
) -> CppBox<QRect>
[src]

Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction.

Calls C++ function: static QRect QStyle::alignedRect(Qt::LayoutDirection direction, QFlags<Qt::AlignmentFlag> alignment, const QSize& size, const QRect& rectangle).

C++ documentation:

Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction.

pub unsafe fn combined_layout_spacing_5a(
    &self,
    controls1: QFlags<ControlType>,
    controls2: QFlags<ControlType>,
    orientation: Orientation,
    option: impl CastInto<MutPtr<QStyleOption>>,
    widget: impl CastInto<MutPtr<QWidget>>
) -> c_int
[src]

Returns the spacing that should be used between controls1 and controls2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

Calls C++ function: int QStyle::combinedLayoutSpacing(QFlags<QSizePolicy::ControlType> controls1, QFlags<QSizePolicy::ControlType> controls2, Qt::Orientation orientation, QStyleOption* option = …, QWidget* widget = …) const.

C++ documentation:

Returns the spacing that should be used between controls1 and controls2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

controls1 and controls2 are OR-combination of zero or more control types.

This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.

This function was introduced in Qt 4.3.

See also layoutSpacing().

pub unsafe fn combined_layout_spacing_4a(
    &self,
    controls1: QFlags<ControlType>,
    controls2: QFlags<ControlType>,
    orientation: Orientation,
    option: impl CastInto<MutPtr<QStyleOption>>
) -> c_int
[src]

Returns the spacing that should be used between controls1 and controls2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

Calls C++ function: int QStyle::combinedLayoutSpacing(QFlags<QSizePolicy::ControlType> controls1, QFlags<QSizePolicy::ControlType> controls2, Qt::Orientation orientation, QStyleOption* option = …) const.

C++ documentation:

Returns the spacing that should be used between controls1 and controls2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

controls1 and controls2 are OR-combination of zero or more control types.

This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.

This function was introduced in Qt 4.3.

See also layoutSpacing().

pub unsafe fn combined_layout_spacing_3a(
    &self,
    controls1: QFlags<ControlType>,
    controls2: QFlags<ControlType>,
    orientation: Orientation
) -> c_int
[src]

Returns the spacing that should be used between controls1 and controls2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

Calls C++ function: int QStyle::combinedLayoutSpacing(QFlags<QSizePolicy::ControlType> controls1, QFlags<QSizePolicy::ControlType> controls2, Qt::Orientation orientation) const.

C++ documentation:

Returns the spacing that should be used between controls1 and controls2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

controls1 and controls2 are OR-combination of zero or more control types.

This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.

This function was introduced in Qt 4.3.

See also layoutSpacing().

pub unsafe fn draw_complex_control_4a(
    &self,
    cc: ComplexControl,
    opt: impl CastInto<Ptr<QStyleOptionComplex>>,
    p: impl CastInto<MutPtr<QPainter>>,
    widget: impl CastInto<Ptr<QWidget>>
)
[src]

Draws the given control using the provided painter with the style options specified by option.

Calls C++ function: pure virtual void QStyle::drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p, const QWidget* widget = …) const.

C++ documentation:

Draws the given control using the provided painter with the style options specified by option.

The widget argument is optional and can be used as aid in drawing the control.

The option parameter is a pointer to a QStyleOptionComplex object that can be cast to the correct subclass using the qstyleoption_cast() function. Note that the rect member of the specified option must be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical coordinates into screen coordinates before calling the drawPrimitive() or drawControl() function.

The table below is listing the complex control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.

Complex ControlQStyleOptionComplex SubclassStyle FlagRemark
CC_SpinBoxQStyleOptionSpinBoxState_EnabledSet if the spin box is enabled.
State_HasFocusSet if the spin box has input focus.
CC_ComboBoxQStyleOptionComboBoxState_EnabledSet if the combobox is enabled.
State_HasFocusSet if the combobox has input focus.
CC_ScrollBarQStyleOptionSliderState_EnabledSet if the scroll bar is enabled.
State_HasFocusSet if the scroll bar has input focus.
CC_SliderQStyleOptionSliderState_EnabledSet if the slider is enabled.
State_HasFocusSet if the slider has input focus.
CC_DialQStyleOptionSliderState_EnabledSet if the dial is enabled.
State_HasFocusSet if the dial has input focus.
CC_ToolButtonQStyleOptionToolButtonState_EnabledSet if the tool button is enabled.
State_HasFocusSet if the tool button has input focus.
State_DownArrowSet if the tool button is down (i.e., a mouse button or the space bar is pressed).
State_OnSet if the tool button is a toggle button and is toggled on.
State_AutoRaiseSet if the tool button has auto-raise enabled.
State_RaisedSet if the button is not down, not on, and doesn't contain the mouse when auto-raise is enabled.
CC_TitleBarQStyleOptionTitleBarState_EnabledSet if the title bar is enabled.

See also drawPrimitive() and drawControl().

pub unsafe fn draw_complex_control_3a(
    &self,
    cc: ComplexControl,
    opt: impl CastInto<Ptr<QStyleOptionComplex>>,
    p: impl CastInto<MutPtr<QPainter>>
)
[src]

Draws the given control using the provided painter with the style options specified by option.

Calls C++ function: pure virtual void QStyle::drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p) const.

C++ documentation:

Draws the given control using the provided painter with the style options specified by option.

The widget argument is optional and can be used as aid in drawing the control.

The option parameter is a pointer to a QStyleOptionComplex object that can be cast to the correct subclass using the qstyleoption_cast() function. Note that the rect member of the specified option must be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical coordinates into screen coordinates before calling the drawPrimitive() or drawControl() function.

The table below is listing the complex control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.

Complex ControlQStyleOptionComplex SubclassStyle FlagRemark
CC_SpinBoxQStyleOptionSpinBoxState_EnabledSet if the spin box is enabled.
State_HasFocusSet if the spin box has input focus.
CC_ComboBoxQStyleOptionComboBoxState_EnabledSet if the combobox is enabled.
State_HasFocusSet if the combobox has input focus.
CC_ScrollBarQStyleOptionSliderState_EnabledSet if the scroll bar is enabled.
State_HasFocusSet if the scroll bar has input focus.
CC_SliderQStyleOptionSliderState_EnabledSet if the slider is enabled.
State_HasFocusSet if the slider has input focus.
CC_DialQStyleOptionSliderState_EnabledSet if the dial is enabled.
State_HasFocusSet if the dial has input focus.
CC_ToolButtonQStyleOptionToolButtonState_EnabledSet if the tool button is enabled.
State_HasFocusSet if the tool button has input focus.
State_DownArrowSet if the tool button is down (i.e., a mouse button or the space bar is pressed).
State_OnSet if the tool button is a toggle button and is toggled on.
State_AutoRaiseSet if the tool button has auto-raise enabled.
State_RaisedSet if the button is not down, not on, and doesn't contain the mouse when auto-raise is enabled.
CC_TitleBarQStyleOptionTitleBarState_EnabledSet if the title bar is enabled.

See also drawPrimitive() and drawControl().

pub unsafe fn draw_control_4a(
    &self,
    element: ControlElement,
    opt: impl CastInto<Ptr<QStyleOption>>,
    p: impl CastInto<MutPtr<QPainter>>,
    w: impl CastInto<Ptr<QWidget>>
)
[src]

Draws the given element with the provided painter with the style options specified by option.

Calls C++ function: pure virtual void QStyle::drawControl(QStyle::ControlElement element, const QStyleOption* opt, QPainter* p, const QWidget* w = …) const.

C++ documentation:

Draws the given element with the provided painter with the style options specified by option.

The widget argument is optional and can be used as aid in drawing the control. The option parameter is a pointer to a QStyleOption object that can be cast to the correct subclass using the qstyleoption_cast() function.

The table below is listing the control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.

Note that if a control element is not listed here, it is because it uses a plain QStyleOption object.

Control ElementQStyleOption SubclassStyle FlagRemark
CE_MenuItem, CE_MenuBarItemQStyleOptionMenuItemState_SelectedThe menu item is currently selected item.
State_EnabledThe item is enabled.
State_DownArrowIndicates that a scroll down arrow should be drawn.
State_UpArrowIndicates that a scroll up arrow should be drawn
State_HasFocusSet if the menu bar has input focus.
CE_PushButton, CE_PushButtonBevel, CE_PushButtonLabelQStyleOptionButtonState_EnabledSet if the button is enabled.
State_HasFocusSet if the button has input focus.
State_RaisedSet if the button is not down, not on and not flat.
State_OnSet if the button is a toggle button and is toggled on.
State_SunkenSet if the button is down (i.e., the mouse button or the space bar is pressed on the button).
CE_RadioButton, CE_RadioButtonLabel, CE_CheckBox, CE_CheckBoxLabelQStyleOptionButtonState_EnabledSet if the button is enabled.
State_HasFocusSet if the button has input focus.
State_OnSet if the button is checked.
State_OffSet if the button is not checked.
State_NoChangeSet if the button is in the NoChange state.
State_SunkenSet if the button is down (i.e., the mouse button or the space bar is pressed on the button).
CE_ProgressBarContents, CE_ProgressBarLabel, CE_ProgressBarGrooveQStyleOptionProgressBarState_EnabledSet if the progress bar is enabled.
State_HasFocusSet if the progress bar has input focus.
CE_Header, CE_HeaderSection, CE_HeaderLabelQStyleOptionHeader
CE_TabBarTab, CE_TabBarTabShape, CE_TabBarTabLabelQStyleOptionTabState_EnabledSet if the tab bar is enabled.
State_SelectedThe tab bar is the currently selected tab bar.
State_HasFocusSet if the tab bar tab has input focus.
CE_ToolButtonLabelQStyleOptionToolButtonState_EnabledSet if the tool button is enabled.
State_HasFocusSet if the tool button has input focus.
State_SunkenSet if the tool button is down (i.e., a mouse button or the space bar is pressed).
State_OnSet if the tool button is a toggle button and is toggled on.
State_AutoRaiseSet if the tool button has auto-raise enabled.
State_MouseOverSet if the mouse pointer is over the tool button.
State_RaisedSet if the button is not down and is not on.
CE_ToolBoxTabQStyleOptionToolBoxState_SelectedThe tab is the currently selected tab.
CE_HeaderSectionQStyleOptionHeaderState_SunkenIndicates that the section is pressed.
State_UpArrowIndicates that the sort indicator should be pointing up.
State_DownArrowIndicates that the sort indicator should be pointing down.

See also drawPrimitive() and drawComplexControl().

pub unsafe fn draw_control_3a(
    &self,
    element: ControlElement,
    opt: impl CastInto<Ptr<QStyleOption>>,
    p: impl CastInto<MutPtr<QPainter>>
)
[src]

Draws the given element with the provided painter with the style options specified by option.

Calls C++ function: pure virtual void QStyle::drawControl(QStyle::ControlElement element, const QStyleOption* opt, QPainter* p) const.

C++ documentation:

Draws the given element with the provided painter with the style options specified by option.

The widget argument is optional and can be used as aid in drawing the control. The option parameter is a pointer to a QStyleOption object that can be cast to the correct subclass using the qstyleoption_cast() function.

The table below is listing the control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.

Note that if a control element is not listed here, it is because it uses a plain QStyleOption object.

Control ElementQStyleOption SubclassStyle FlagRemark
CE_MenuItem, CE_MenuBarItemQStyleOptionMenuItemState_SelectedThe menu item is currently selected item.
State_EnabledThe item is enabled.
State_DownArrowIndicates that a scroll down arrow should be drawn.
State_UpArrowIndicates that a scroll up arrow should be drawn
State_HasFocusSet if the menu bar has input focus.
CE_PushButton, CE_PushButtonBevel, CE_PushButtonLabelQStyleOptionButtonState_EnabledSet if the button is enabled.
State_HasFocusSet if the button has input focus.
State_RaisedSet if the button is not down, not on and not flat.
State_OnSet if the button is a toggle button and is toggled on.
State_SunkenSet if the button is down (i.e., the mouse button or the space bar is pressed on the button).
CE_RadioButton, CE_RadioButtonLabel, CE_CheckBox, CE_CheckBoxLabelQStyleOptionButtonState_EnabledSet if the button is enabled.
State_HasFocusSet if the button has input focus.
State_OnSet if the button is checked.
State_OffSet if the button is not checked.
State_NoChangeSet if the button is in the NoChange state.
State_SunkenSet if the button is down (i.e., the mouse button or the space bar is pressed on the button).
CE_ProgressBarContents, CE_ProgressBarLabel, CE_ProgressBarGrooveQStyleOptionProgressBarState_EnabledSet if the progress bar is enabled.
State_HasFocusSet if the progress bar has input focus.
CE_Header, CE_HeaderSection, CE_HeaderLabelQStyleOptionHeader
CE_TabBarTab, CE_TabBarTabShape, CE_TabBarTabLabelQStyleOptionTabState_EnabledSet if the tab bar is enabled.
State_SelectedThe tab bar is the currently selected tab bar.
State_HasFocusSet if the tab bar tab has input focus.
CE_ToolButtonLabelQStyleOptionToolButtonState_EnabledSet if the tool button is enabled.
State_HasFocusSet if the tool button has input focus.
State_SunkenSet if the tool button is down (i.e., a mouse button or the space bar is pressed).
State_OnSet if the tool button is a toggle button and is toggled on.
State_AutoRaiseSet if the tool button has auto-raise enabled.
State_MouseOverSet if the mouse pointer is over the tool button.
State_RaisedSet if the button is not down and is not on.
CE_ToolBoxTabQStyleOptionToolBoxState_SelectedThe tab is the currently selected tab.
CE_HeaderSectionQStyleOptionHeaderState_SunkenIndicates that the section is pressed.
State_UpArrowIndicates that the sort indicator should be pointing up.
State_DownArrowIndicates that the sort indicator should be pointing down.

See also drawPrimitive() and drawComplexControl().

pub unsafe fn draw_item_pixmap(
    &self,
    painter: impl CastInto<MutPtr<QPainter>>,
    rect: impl CastInto<Ref<QRect>>,
    alignment: c_int,
    pixmap: impl CastInto<Ref<QPixmap>>
)
[src]

Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter.

Calls C++ function: virtual void QStyle::drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const.

C++ documentation:

Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter.

See also drawItemText().

pub unsafe fn draw_item_text_7a(
    &self,
    painter: impl CastInto<MutPtr<QPainter>>,
    rect: impl CastInto<Ref<QRect>>,
    flags: c_int,
    pal: impl CastInto<Ref<QPalette>>,
    enabled: bool,
    text: impl CastInto<Ref<QString>>,
    text_role: ColorRole
)
[src]

Draws the given text in the specified rectangle using the provided painter and palette.

Calls C++ function: virtual void QStyle::drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole = …) const.

C++ documentation:

Draws the given text in the specified rectangle using the provided painter and palette.

The text is drawn using the painter's pen, and aligned and wrapped according to the specified alignment. If an explicit textRole is specified, the text is drawn using the palette's color for the given role. The enabled parameter indicates whether or not the item is enabled; when reimplementing this function, the enabled parameter should influence how the item is drawn.

See also Qt::Alignment and drawItemPixmap().

pub unsafe fn draw_item_text_6a(
    &self,
    painter: impl CastInto<MutPtr<QPainter>>,
    rect: impl CastInto<Ref<QRect>>,
    flags: c_int,
    pal: impl CastInto<Ref<QPalette>>,
    enabled: bool,
    text: impl CastInto<Ref<QString>>
)
[src]

Draws the given text in the specified rectangle using the provided painter and palette.

Calls C++ function: virtual void QStyle::drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text) const.

C++ documentation:

Draws the given text in the specified rectangle using the provided painter and palette.

The text is drawn using the painter's pen, and aligned and wrapped according to the specified alignment. If an explicit textRole is specified, the text is drawn using the palette's color for the given role. The enabled parameter indicates whether or not the item is enabled; when reimplementing this function, the enabled parameter should influence how the item is drawn.

See also Qt::Alignment and drawItemPixmap().

pub unsafe fn draw_primitive_4a(
    &self,
    pe: PrimitiveElement,
    opt: impl CastInto<Ptr<QStyleOption>>,
    p: impl CastInto<MutPtr<QPainter>>,
    w: impl CastInto<Ptr<QWidget>>
)
[src]

Draws the given primitive element with the provided painter using the style options specified by option.

Calls C++ function: pure virtual void QStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption* opt, QPainter* p, const QWidget* w = …) const.

C++ documentation:

Draws the given primitive element with the provided painter using the style options specified by option.

The widget argument is optional and may contain a widget that may aid in drawing the primitive element.

The table below is listing the primitive elements and their associated style option subclasses. The style options contain all the parameters required to draw the elements, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.

Note that if a primitive element is not listed here, it is because it uses a plain QStyleOption object.

Primitive ElementQStyleOption SubclassStyle FlagRemark
PE_FrameFocusRectQStyleOptionFocusRectState_FocusAtBorderWhether the focus is is at the border or inside the widget.
PE_IndicatorCheckBoxQStyleOptionButtonState_NoChangeIndicates a "tri-state" checkbox.
State_OnIndicates the indicator is checked.
PE_IndicatorRadioButtonQStyleOptionButtonState_OnIndicates that a radio button is selected.
State_NoChangeIndicates a "tri-state" controller.
State_EnabledIndicates the controller is enabled.
PE_IndicatorBranchQStyleOptionState_ChildrenIndicates that the control for expanding the tree to show child items, should be drawn.
State_ItemIndicates that a horizontal branch (to show a child item), should be drawn.
State_OpenIndicates that the tree branch is expanded.
State_SiblingIndicates that a vertical line (to show a sibling item), should be drawn.
PE_IndicatorHeaderArrowQStyleOptionHeaderState_UpArrowIndicates that the arrow should be drawn up; otherwise it should be down.
PE_FrameGroupBox, PE_Frame, PE_FrameLineEdit, PE_FrameMenu, PE_FrameDockWidget, PE_FrameWindowQStyleOptionFrameState_SunkenIndicates that the Frame should be sunken.
PE_IndicatorToolBarHandleQStyleOptionState_HorizontalIndicates that the window handle is horizontal instead of vertical.
PE_IndicatorSpinPlus, PE_IndicatorSpinMinus, PE_IndicatorSpinUp, PE_IndicatorSpinDown,QStyleOptionSpinBoxState_SunkenIndicates that the button is pressed.
PE_PanelButtonCommandQStyleOptionButtonState_EnabledSet if the button is enabled.
State_HasFocusSet if the button has input focus.
State_RaisedSet if the button is not down, not on and not flat.
State_OnSet if the button is a toggle button and is toggled on.
State_SunkenSet if the button is down (i.e., the mouse button or the space bar is pressed on the button).

See also drawComplexControl() and drawControl().

pub unsafe fn draw_primitive_3a(
    &self,
    pe: PrimitiveElement,
    opt: impl CastInto<Ptr<QStyleOption>>,
    p: impl CastInto<MutPtr<QPainter>>
)
[src]

Draws the given primitive element with the provided painter using the style options specified by option.

Calls C++ function: pure virtual void QStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption* opt, QPainter* p) const.

C++ documentation:

Draws the given primitive element with the provided painter using the style options specified by option.

The widget argument is optional and may contain a widget that may aid in drawing the primitive element.

The table below is listing the primitive elements and their associated style option subclasses. The style options contain all the parameters required to draw the elements, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.

Note that if a primitive element is not listed here, it is because it uses a plain QStyleOption object.

Primitive ElementQStyleOption SubclassStyle FlagRemark
PE_FrameFocusRectQStyleOptionFocusRectState_FocusAtBorderWhether the focus is is at the border or inside the widget.
PE_IndicatorCheckBoxQStyleOptionButtonState_NoChangeIndicates a "tri-state" checkbox.
State_OnIndicates the indicator is checked.
PE_IndicatorRadioButtonQStyleOptionButtonState_OnIndicates that a radio button is selected.
State_NoChangeIndicates a "tri-state" controller.
State_EnabledIndicates the controller is enabled.
PE_IndicatorBranchQStyleOptionState_ChildrenIndicates that the control for expanding the tree to show child items, should be drawn.
State_ItemIndicates that a horizontal branch (to show a child item), should be drawn.
State_OpenIndicates that the tree branch is expanded.
State_SiblingIndicates that a vertical line (to show a sibling item), should be drawn.
PE_IndicatorHeaderArrowQStyleOptionHeaderState_UpArrowIndicates that the arrow should be drawn up; otherwise it should be down.
PE_FrameGroupBox, PE_Frame, PE_FrameLineEdit, PE_FrameMenu, PE_FrameDockWidget, PE_FrameWindowQStyleOptionFrameState_SunkenIndicates that the Frame should be sunken.
PE_IndicatorToolBarHandleQStyleOptionState_HorizontalIndicates that the window handle is horizontal instead of vertical.
PE_IndicatorSpinPlus, PE_IndicatorSpinMinus, PE_IndicatorSpinUp, PE_IndicatorSpinDown,QStyleOptionSpinBoxState_SunkenIndicates that the button is pressed.
PE_PanelButtonCommandQStyleOptionButtonState_EnabledSet if the button is enabled.
State_HasFocusSet if the button has input focus.
State_RaisedSet if the button is not down, not on and not flat.
State_OnSet if the button is a toggle button and is toggled on.
State_SunkenSet if the button is down (i.e., the mouse button or the space bar is pressed on the button).

See also drawComplexControl() and drawControl().

pub unsafe fn generated_icon_pixmap(
    &self,
    icon_mode: Mode,
    pixmap: impl CastInto<Ref<QPixmap>>,
    opt: impl CastInto<Ptr<QStyleOption>>
) -> CppBox<QPixmap>
[src]

Returns a copy of the given pixmap, styled to conform to the specified iconMode and taking into account the palette specified by option.

Calls C++ function: pure virtual QPixmap QStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const.

C++ documentation:

Returns a copy of the given pixmap, styled to conform to the specified iconMode and taking into account the palette specified by option.

The option parameter can pass extra information, but it must contain a palette.

Note that not all pixmaps will conform, in which case the returned pixmap is a plain copy.

See also QIcon.

pub unsafe fn hit_test_complex_control_4a(
    &self,
    cc: ComplexControl,
    opt: impl CastInto<Ptr<QStyleOptionComplex>>,
    pt: impl CastInto<Ref<QPoint>>,
    widget: impl CastInto<Ptr<QWidget>>
) -> SubControl
[src]

Returns the sub control at the given position in the given complex control (with the style options specified by option).

Calls C++ function: pure virtual QStyle::SubControl QStyle::hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, const QPoint& pt, const QWidget* widget = …) const.

C++ documentation:

Returns the sub control at the given position in the given complex control (with the style options specified by option).

Note that the position is expressed in screen coordinates.

The option argument is a pointer to a QStyleOptionComplex object (or one of its subclasses). The object can be cast to the appropriate type using the qstyleoption_cast() function. See drawComplexControl() for details. The widget argument is optional and can contain additional information for the function.

See also drawComplexControl() and subControlRect().

pub unsafe fn hit_test_complex_control_3a(
    &self,
    cc: ComplexControl,
    opt: impl CastInto<Ptr<QStyleOptionComplex>>,
    pt: impl CastInto<Ref<QPoint>>
) -> SubControl
[src]

Returns the sub control at the given position in the given complex control (with the style options specified by option).

Calls C++ function: pure virtual QStyle::SubControl QStyle::hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, const QPoint& pt) const.

C++ documentation:

Returns the sub control at the given position in the given complex control (with the style options specified by option).

Note that the position is expressed in screen coordinates.

The option argument is a pointer to a QStyleOptionComplex object (or one of its subclasses). The object can be cast to the appropriate type using the qstyleoption_cast() function. See drawComplexControl() for details. The widget argument is optional and can contain additional information for the function.

See also drawComplexControl() and subControlRect().

pub unsafe fn item_pixmap_rect(
    &self,
    r: impl CastInto<Ref<QRect>>,
    flags: c_int,
    pixmap: impl CastInto<Ref<QPixmap>>
) -> CppBox<QRect>
[src]

Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment.

Calls C++ function: virtual QRect QStyle::itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const.

C++ documentation:

Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment.

pub unsafe fn item_text_rect(
    &self,
    fm: impl CastInto<Ref<QFontMetrics>>,
    r: impl CastInto<Ref<QRect>>,
    flags: c_int,
    enabled: bool,
    text: impl CastInto<Ref<QString>>
) -> CppBox<QRect>
[src]

Returns the area within the given rectangle in which to draw the provided text according to the specified font metrics and alignment. The enabled parameter indicates whether or not the associated item is enabled.

Calls C++ function: virtual QRect QStyle::itemTextRect(const QFontMetrics& fm, const QRect& r, int flags, bool enabled, const QString& text) const.

C++ documentation:

Returns the area within the given rectangle in which to draw the provided text according to the specified font metrics and alignment. The enabled parameter indicates whether or not the associated item is enabled.

If the given rectangle is larger than the area needed to render the text, the rectangle that is returned will be offset within rectangle according to the specified alignment. For example, if alignment is Qt::AlignCenter, the returned rectangle will be centered within rectangle. If the given rectangle is smaller than the area needed, the returned rectangle will be the smallest rectangle large enough to render the text.

See also Qt::Alignment.

pub unsafe fn layout_spacing_5a(
    &self,
    control1: ControlType,
    control2: ControlType,
    orientation: Orientation,
    option: impl CastInto<Ptr<QStyleOption>>,
    widget: impl CastInto<Ptr<QWidget>>
) -> c_int
[src]

Returns the spacing that should be used between control1 and control2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

Calls C++ function: pure virtual int QStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option = …, const QWidget* widget = …) const.

C++ documentation:

Returns the spacing that should be used between control1 and control2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.

This function was introduced in Qt 4.3.

See also combinedLayoutSpacing().

pub unsafe fn layout_spacing_4a(
    &self,
    control1: ControlType,
    control2: ControlType,
    orientation: Orientation,
    option: impl CastInto<Ptr<QStyleOption>>
) -> c_int
[src]

Returns the spacing that should be used between control1 and control2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

Calls C++ function: pure virtual int QStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option = …) const.

C++ documentation:

Returns the spacing that should be used between control1 and control2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.

This function was introduced in Qt 4.3.

See also combinedLayoutSpacing().

pub unsafe fn layout_spacing_3a(
    &self,
    control1: ControlType,
    control2: ControlType,
    orientation: Orientation
) -> c_int
[src]

Returns the spacing that should be used between control1 and control2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

Calls C++ function: pure virtual int QStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation) const.

C++ documentation:

Returns the spacing that should be used between control1 and control2 in a layout. orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.

This function was introduced in Qt 4.3.

See also combinedLayoutSpacing().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QStyle::metaObject() const.

pub unsafe fn pixel_metric_3a(
    &self,
    metric: PixelMetric,
    option: impl CastInto<Ptr<QStyleOption>>,
    widget: impl CastInto<Ptr<QWidget>>
) -> c_int
[src]

Returns the value of the given pixel metric.

Calls C++ function: pure virtual int QStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option = …, const QWidget* widget = …) const.

C++ documentation:

Returns the value of the given pixel metric.

The specified option and widget can be used for calculating the metric. In general, the widget argument is not used. The option can be cast to the appropriate type using the qstyleoption_cast() function. Note that the option may be zero even for PixelMetrics that can make use of it. See the table below for the appropriate option casts:

Some pixel metrics are called from widgets and some are only called internally by the style. If the metric is not called by a widget, it is the discretion of the style author to make use of it. For some styles, this may not be appropriate.

pub unsafe fn pixel_metric_2a(
    &self,
    metric: PixelMetric,
    option: impl CastInto<Ptr<QStyleOption>>
) -> c_int
[src]

Returns the value of the given pixel metric.

Calls C++ function: pure virtual int QStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option = …) const.

C++ documentation:

Returns the value of the given pixel metric.

The specified option and widget can be used for calculating the metric. In general, the widget argument is not used. The option can be cast to the appropriate type using the qstyleoption_cast() function. Note that the option may be zero even for PixelMetrics that can make use of it. See the table below for the appropriate option casts:

Some pixel metrics are called from widgets and some are only called internally by the style. If the metric is not called by a widget, it is the discretion of the style author to make use of it. For some styles, this may not be appropriate.

pub unsafe fn pixel_metric_1a(&self, metric: PixelMetric) -> c_int[src]

Returns the value of the given pixel metric.

Calls C++ function: pure virtual int QStyle::pixelMetric(QStyle::PixelMetric metric) const.

C++ documentation:

Returns the value of the given pixel metric.

The specified option and widget can be used for calculating the metric. In general, the widget argument is not used. The option can be cast to the appropriate type using the qstyleoption_cast() function. Note that the option may be zero even for PixelMetrics that can make use of it. See the table below for the appropriate option casts:

Some pixel metrics are called from widgets and some are only called internally by the style. If the metric is not called by a widget, it is the discretion of the style author to make use of it. For some styles, this may not be appropriate.

pub unsafe fn polish_q_widget(&mut self, widget: impl CastInto<MutPtr<QWidget>>)[src]

Initializes the appearance of the given widget.

Calls C++ function: virtual void QStyle::polish(QWidget* widget).

C++ documentation:

Initializes the appearance of the given widget.

This function is called for every widget at some point after it has been fully created but just before it is shown for the very first time.

Note that the default implementation does nothing. Reasonable actions in this function might be to call the QWidget::setBackgroundMode() function for the widget. Do not use the function to set, for example, the geometry. Reimplementing this function provides a back-door through which the appearance of a widget can be changed, but with Qt's style engine it is rarely necessary to implement this function; reimplement drawItemPixmap(), drawItemText(), drawPrimitive(), etc. instead.

The QWidget::inherits() function may provide enough information to allow class-specific customizations. But because new QStyle subclasses are expected to work reasonably with all current and future widgets, limited use of hard-coded customization is recommended.

See also unpolish().

pub unsafe fn polish_q_application(
    &mut self,
    application: impl CastInto<MutPtr<QApplication>>
)
[src]

This is an overloaded function.

Calls C++ function: virtual void QStyle::polish(QApplication* application).

C++ documentation:

This is an overloaded function.

Late initialization of the given application object.

pub unsafe fn polish_q_palette(
    &mut self,
    palette: impl CastInto<MutRef<QPalette>>
)
[src]

This is an overloaded function.

Calls C++ function: virtual void QStyle::polish(QPalette& palette).

C++ documentation:

This is an overloaded function.

Changes the palette according to style specific requirements for color palettes (if any).

See also QPalette and QApplication::setPalette().

pub unsafe fn proxy(&self) -> Ptr<QStyle>[src]

This function returns the current proxy for this style. By default most styles will return themselves. However when a proxy style is in use, it will allow the style to call back into its proxy.

Calls C++ function: const QStyle* QStyle::proxy() const.

C++ documentation:

This function returns the current proxy for this style. By default most styles will return themselves. However when a proxy style is in use, it will allow the style to call back into its proxy.

This function was introduced in Qt 4.6.

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QStyle::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QStyle::qt_metacast(const char* arg1).

pub unsafe fn size_from_contents_4a(
    &self,
    ct: ContentsType,
    opt: impl CastInto<Ptr<QStyleOption>>,
    contents_size: impl CastInto<Ref<QSize>>,
    w: impl CastInto<Ptr<QWidget>>
) -> CppBox<QSize>
[src]

Returns the size of the element described by the specified option and type, based on the provided contentsSize.

Calls C++ function: pure virtual QSize QStyle::sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt, const QSize& contentsSize, const QWidget* w = …) const.

C++ documentation:

Returns the size of the element described by the specified option and type, based on the provided contentsSize.

The option argument is a pointer to a QStyleOption or one of its subclasses. The option can be cast to the appropriate type using the qstyleoption_cast() function. The widget is an optional argument and can contain extra information used for calculating the size.

See the table below for the appropriate option casts:

See also ContentsType and QStyleOption.

pub unsafe fn size_from_contents_3a(
    &self,
    ct: ContentsType,
    opt: impl CastInto<Ptr<QStyleOption>>,
    contents_size: impl CastInto<Ref<QSize>>
) -> CppBox<QSize>
[src]

Returns the size of the element described by the specified option and type, based on the provided contentsSize.

Calls C++ function: pure virtual QSize QStyle::sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt, const QSize& contentsSize) const.

C++ documentation:

Returns the size of the element described by the specified option and type, based on the provided contentsSize.

The option argument is a pointer to a QStyleOption or one of its subclasses. The option can be cast to the appropriate type using the qstyleoption_cast() function. The widget is an optional argument and can contain extra information used for calculating the size.

See the table below for the appropriate option casts:

See also ContentsType and QStyleOption.

pub unsafe fn slider_position_from_value_5a(
    min: c_int,
    max: c_int,
    val: c_int,
    space: c_int,
    upside_down: bool
) -> c_int
[src]

Converts the given logicalValue to a pixel position. The min parameter maps to 0, max maps to span and other values are distributed evenly in-between.

Calls C++ function: static int QStyle::sliderPositionFromValue(int min, int max, int val, int space, bool upsideDown = …).

C++ documentation:

Converts the given logicalValue to a pixel position. The min parameter maps to 0, max maps to span and other values are distributed evenly in-between.

This function can handle the entire integer range without overflow, providing that span is less than 4096.

By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.

See also sliderValueFromPosition().

pub unsafe fn slider_position_from_value_4a(
    min: c_int,
    max: c_int,
    val: c_int,
    space: c_int
) -> c_int
[src]

Converts the given logicalValue to a pixel position. The min parameter maps to 0, max maps to span and other values are distributed evenly in-between.

Calls C++ function: static int QStyle::sliderPositionFromValue(int min, int max, int val, int space).

C++ documentation:

Converts the given logicalValue to a pixel position. The min parameter maps to 0, max maps to span and other values are distributed evenly in-between.

This function can handle the entire integer range without overflow, providing that span is less than 4096.

By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.

See also sliderValueFromPosition().

pub unsafe fn slider_value_from_position_5a(
    min: c_int,
    max: c_int,
    pos: c_int,
    space: c_int,
    upside_down: bool
) -> c_int
[src]

Converts the given pixel position to a logical value. 0 maps to the min parameter, span maps to max and other values are distributed evenly in-between.

Calls C++ function: static int QStyle::sliderValueFromPosition(int min, int max, int pos, int space, bool upsideDown = …).

C++ documentation:

Converts the given pixel position to a logical value. 0 maps to the min parameter, span maps to max and other values are distributed evenly in-between.

This function can handle the entire integer range without overflow.

By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.

See also sliderPositionFromValue().

pub unsafe fn slider_value_from_position_4a(
    min: c_int,
    max: c_int,
    pos: c_int,
    space: c_int
) -> c_int
[src]

Converts the given pixel position to a logical value. 0 maps to the min parameter, span maps to max and other values are distributed evenly in-between.

Calls C++ function: static int QStyle::sliderValueFromPosition(int min, int max, int pos, int space).

C++ documentation:

Converts the given pixel position to a logical value. 0 maps to the min parameter, span maps to max and other values are distributed evenly in-between.

This function can handle the entire integer range without overflow.

By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.

See also sliderPositionFromValue().

pub unsafe fn standard_icon_3a(
    &self,
    standard_icon: StandardPixmap,
    option: impl CastInto<Ptr<QStyleOption>>,
    widget: impl CastInto<Ptr<QWidget>>
) -> CppBox<QIcon>
[src]

Returns an icon for the given standardIcon.

Calls C++ function: pure virtual QIcon QStyle::standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* option = …, const QWidget* widget = …) const.

C++ documentation:

Returns an icon for the given standardIcon.

The standardIcon is a standard pixmap which can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate icon. The widget argument is optional and can also be used to aid the determination of the icon.

This function was introduced in Qt 4.1.

pub unsafe fn standard_icon_2a(
    &self,
    standard_icon: StandardPixmap,
    option: impl CastInto<Ptr<QStyleOption>>
) -> CppBox<QIcon>
[src]

Returns an icon for the given standardIcon.

Calls C++ function: pure virtual QIcon QStyle::standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* option = …) const.

C++ documentation:

Returns an icon for the given standardIcon.

The standardIcon is a standard pixmap which can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate icon. The widget argument is optional and can also be used to aid the determination of the icon.

This function was introduced in Qt 4.1.

pub unsafe fn standard_icon_1a(
    &self,
    standard_icon: StandardPixmap
) -> CppBox<QIcon>
[src]

Returns an icon for the given standardIcon.

Calls C++ function: pure virtual QIcon QStyle::standardIcon(QStyle::StandardPixmap standardIcon) const.

C++ documentation:

Returns an icon for the given standardIcon.

The standardIcon is a standard pixmap which can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate icon. The widget argument is optional and can also be used to aid the determination of the icon.

This function was introduced in Qt 4.1.

pub unsafe fn standard_palette(&self) -> CppBox<QPalette>[src]

Returns the style's standard palette.

Calls C++ function: virtual QPalette QStyle::standardPalette() const.

C++ documentation:

Returns the style's standard palette.

Note that on systems that support system colors, the style's standard palette is not used. In particular, the Windows XP, Vista, and Mac styles do not use the standard palette, but make use of native theme engines. With these styles, you should not set the palette with QApplication::setPalette().

See also QApplication::setPalette().

pub unsafe fn standard_pixmap_3a(
    &self,
    standard_pixmap: StandardPixmap,
    opt: impl CastInto<Ptr<QStyleOption>>,
    widget: impl CastInto<Ptr<QWidget>>
) -> CppBox<QPixmap>
[src]

Returns a pixmap for the given standardPixmap.

Calls C++ function: pure virtual QPixmap QStyle::standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption* opt = …, const QWidget* widget = …) const.

C++ documentation:

Returns a pixmap for the given standardPixmap.

A standard pixmap is a pixmap that can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate pixmap. The widget argument is optional and can also be used to aid the determination of the pixmap.

Developers calling standardPixmap() should instead call standardIcon() Developers who re-implemented standardPixmap() should instead re-implement standardIcon().

See also standardIcon().

pub unsafe fn standard_pixmap_2a(
    &self,
    standard_pixmap: StandardPixmap,
    opt: impl CastInto<Ptr<QStyleOption>>
) -> CppBox<QPixmap>
[src]

Returns a pixmap for the given standardPixmap.

Calls C++ function: pure virtual QPixmap QStyle::standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption* opt = …) const.

C++ documentation:

Returns a pixmap for the given standardPixmap.

A standard pixmap is a pixmap that can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate pixmap. The widget argument is optional and can also be used to aid the determination of the pixmap.

Developers calling standardPixmap() should instead call standardIcon() Developers who re-implemented standardPixmap() should instead re-implement standardIcon().

See also standardIcon().

pub unsafe fn standard_pixmap_1a(
    &self,
    standard_pixmap: StandardPixmap
) -> CppBox<QPixmap>
[src]

Returns a pixmap for the given standardPixmap.

Calls C++ function: pure virtual QPixmap QStyle::standardPixmap(QStyle::StandardPixmap standardPixmap) const.

C++ documentation:

Returns a pixmap for the given standardPixmap.

A standard pixmap is a pixmap that can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate pixmap. The widget argument is optional and can also be used to aid the determination of the pixmap.

Developers calling standardPixmap() should instead call standardIcon() Developers who re-implemented standardPixmap() should instead re-implement standardIcon().

See also standardIcon().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn style_hint_4a(
    &self,
    stylehint: StyleHint,
    opt: impl CastInto<Ptr<QStyleOption>>,
    widget: impl CastInto<Ptr<QWidget>>,
    return_data: impl CastInto<MutPtr<QStyleHintReturn>>
) -> c_int
[src]

Returns an integer representing the specified style hint for the given widget described by the provided style option.

Calls C++ function: pure virtual int QStyle::styleHint(QStyle::StyleHint stylehint, const QStyleOption* opt = …, const QWidget* widget = …, QStyleHintReturn* returnData = …) const.

C++ documentation:

Returns an integer representing the specified style hint for the given widget described by the provided style option.

returnData is used when the querying widget needs more detailed data than the integer that styleHint() returns. See the QStyleHintReturn class description for details.

pub unsafe fn style_hint_3a(
    &self,
    stylehint: StyleHint,
    opt: impl CastInto<Ptr<QStyleOption>>,
    widget: impl CastInto<Ptr<QWidget>>
) -> c_int
[src]

Returns an integer representing the specified style hint for the given widget described by the provided style option.

Calls C++ function: pure virtual int QStyle::styleHint(QStyle::StyleHint stylehint, const QStyleOption* opt = …, const QWidget* widget = …) const.

C++ documentation:

Returns an integer representing the specified style hint for the given widget described by the provided style option.

returnData is used when the querying widget needs more detailed data than the integer that styleHint() returns. See the QStyleHintReturn class description for details.

pub unsafe fn style_hint_2a(
    &self,
    stylehint: StyleHint,
    opt: impl CastInto<Ptr<QStyleOption>>
) -> c_int
[src]

Returns an integer representing the specified style hint for the given widget described by the provided style option.

Calls C++ function: pure virtual int QStyle::styleHint(QStyle::StyleHint stylehint, const QStyleOption* opt = …) const.

C++ documentation:

Returns an integer representing the specified style hint for the given widget described by the provided style option.

returnData is used when the querying widget needs more detailed data than the integer that styleHint() returns. See the QStyleHintReturn class description for details.

pub unsafe fn style_hint_1a(&self, stylehint: StyleHint) -> c_int[src]

Returns an integer representing the specified style hint for the given widget described by the provided style option.

Calls C++ function: pure virtual int QStyle::styleHint(QStyle::StyleHint stylehint) const.

C++ documentation:

Returns an integer representing the specified style hint for the given widget described by the provided style option.

returnData is used when the querying widget needs more detailed data than the integer that styleHint() returns. See the QStyleHintReturn class description for details.

pub unsafe fn sub_control_rect_4a(
    &self,
    cc: ComplexControl,
    opt: impl CastInto<Ptr<QStyleOptionComplex>>,
    sc: SubControl,
    widget: impl CastInto<Ptr<QWidget>>
) -> CppBox<QRect>
[src]

Returns the rectangle containing the specified subControl of the given complex control (with the style specified by option). The rectangle is defined in screen coordinates.

Calls C++ function: pure virtual QRect QStyle::subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* widget = …) const.

C++ documentation:

Returns the rectangle containing the specified subControl of the given complex control (with the style specified by option). The rectangle is defined in screen coordinates.

The option argument is a pointer to QStyleOptionComplex or one of its subclasses, and can be cast to the appropriate type using the qstyleoption_cast() function. See drawComplexControl() for details. The widget is optional and can contain additional information for the function.

See also drawComplexControl().

pub unsafe fn sub_control_rect_3a(
    &self,
    cc: ComplexControl,
    opt: impl CastInto<Ptr<QStyleOptionComplex>>,
    sc: SubControl
) -> CppBox<QRect>
[src]

Returns the rectangle containing the specified subControl of the given complex control (with the style specified by option). The rectangle is defined in screen coordinates.

Calls C++ function: pure virtual QRect QStyle::subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc) const.

C++ documentation:

Returns the rectangle containing the specified subControl of the given complex control (with the style specified by option). The rectangle is defined in screen coordinates.

The option argument is a pointer to QStyleOptionComplex or one of its subclasses, and can be cast to the appropriate type using the qstyleoption_cast() function. See drawComplexControl() for details. The widget is optional and can contain additional information for the function.

See also drawComplexControl().

pub unsafe fn sub_element_rect_3a(
    &self,
    sub_element: SubElement,
    option: impl CastInto<Ptr<QStyleOption>>,
    widget: impl CastInto<Ptr<QWidget>>
) -> CppBox<QRect>
[src]

Returns the sub-area for the given element as described in the provided style option. The returned rectangle is defined in screen coordinates.

Calls C++ function: pure virtual QRect QStyle::subElementRect(QStyle::SubElement subElement, const QStyleOption* option, const QWidget* widget = …) const.

C++ documentation:

Returns the sub-area for the given element as described in the provided style option. The returned rectangle is defined in screen coordinates.

The widget argument is optional and can be used to aid determining the area. The QStyleOption object can be cast to the appropriate type using the qstyleoption_cast() function. See the table below for the appropriate option casts:

pub unsafe fn sub_element_rect_2a(
    &self,
    sub_element: SubElement,
    option: impl CastInto<Ptr<QStyleOption>>
) -> CppBox<QRect>
[src]

Returns the sub-area for the given element as described in the provided style option. The returned rectangle is defined in screen coordinates.

Calls C++ function: pure virtual QRect QStyle::subElementRect(QStyle::SubElement subElement, const QStyleOption* option) const.

C++ documentation:

Returns the sub-area for the given element as described in the provided style option. The returned rectangle is defined in screen coordinates.

The widget argument is optional and can be used to aid determining the area. The QStyleOption object can be cast to the appropriate type using the qstyleoption_cast() function. See the table below for the appropriate option casts:

pub unsafe fn tr(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QStyle::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QStyle::trUtf8(const char* s, const char* c, int n).

pub unsafe fn unpolish_q_widget(
    &mut self,
    widget: impl CastInto<MutPtr<QWidget>>
)
[src]

Uninitialize the given widget's appearance.

Calls C++ function: virtual void QStyle::unpolish(QWidget* widget).

C++ documentation:

Uninitialize the given widget's appearance.

This function is the counterpart to polish(). It is called for every polished widget whenever the style is dynamically changed; the former style has to unpolish its settings before the new style can polish them again.

Note that unpolish() will only be called if the widget is destroyed. This can cause problems in some cases, e.g, if you remove a widget from the UI, cache it, and then reinsert it after the style has changed; some of Qt's classes cache their widgets.

See also polish().

pub unsafe fn unpolish_q_application(
    &mut self,
    application: impl CastInto<MutPtr<QApplication>>
)
[src]

This is an overloaded function.

Calls C++ function: virtual void QStyle::unpolish(QApplication* application).

C++ documentation:

This is an overloaded function.

Uninitialize the given application.

pub unsafe fn visual_alignment(
    direction: LayoutDirection,
    alignment: QFlags<AlignmentFlag>
) -> QFlags<AlignmentFlag>
[src]

Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLeft or Qt::AlignRight with Qt::AlignAbsolute according to the layout direction. The other alignment flags are left untouched.

Calls C++ function: static QFlags<Qt::AlignmentFlag> QStyle::visualAlignment(Qt::LayoutDirection direction, QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLeft or Qt::AlignRight with Qt::AlignAbsolute according to the layout direction. The other alignment flags are left untouched.

If no horizontal alignment was specified, the function returns the default alignment for the given layout direction.

QWidget::layoutDirection

pub unsafe fn visual_pos(
    direction: LayoutDirection,
    bounding_rect: impl CastInto<Ref<QRect>>,
    logical_pos: impl CastInto<Ref<QPoint>>
) -> CppBox<QPoint>
[src]

Returns the given logicalPosition converted to screen coordinates based on the specified direction. The boundingRectangle is used when performing the translation.

Calls C++ function: static QPoint QStyle::visualPos(Qt::LayoutDirection direction, const QRect& boundingRect, const QPoint& logicalPos).

C++ documentation:

Returns the given logicalPosition converted to screen coordinates based on the specified direction. The boundingRectangle is used when performing the translation.

See also QWidget::layoutDirection.

pub unsafe fn visual_rect(
    direction: LayoutDirection,
    bounding_rect: impl CastInto<Ref<QRect>>,
    logical_rect: impl CastInto<Ref<QRect>>
) -> CppBox<QRect>
[src]

Returns the given logicalRectangle converted to screen coordinates based on the specified direction. The boundingRectangle is used when performing the translation.

Calls C++ function: static QRect QStyle::visualRect(Qt::LayoutDirection direction, const QRect& boundingRect, const QRect& logicalRect).

C++ documentation:

Returns the given logicalRectangle converted to screen coordinates based on the specified direction. The boundingRectangle is used when performing the translation.

This function is provided to support right-to-left desktops, and is typically used in implementations of the subControlRect() function.

See also QWidget::layoutDirection.

Trait Implementations

impl Deref for QStyle[src]

type Target = QObject

The resulting type after dereferencing.

fn deref(&self) -> &QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(QStyle* ptr).

impl DerefMut for QStyle[src]

fn deref_mut(&mut self) -> &mut QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(QStyle* ptr).

impl StaticUpcast<QObject> for QStyle[src]

unsafe fn static_upcast(ptr: Ptr<QStyle>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QStyle* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QStyle>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QStyle* ptr).

impl StaticUpcast<QStyle> for QCommonStyle[src]

unsafe fn static_upcast(ptr: Ptr<QCommonStyle>) -> Ptr<QStyle>[src]

Calls C++ function: QStyle* static_cast<QStyle*>(QCommonStyle* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QCommonStyle>) -> MutPtr<QStyle>[src]

Calls C++ function: QStyle* static_cast<QStyle*>(QCommonStyle* ptr).

impl StaticUpcast<QStyle> for QProxyStyle[src]

unsafe fn static_upcast(ptr: Ptr<QProxyStyle>) -> Ptr<QStyle>[src]

Calls C++ function: QStyle* static_cast<QStyle*>(QProxyStyle* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QProxyStyle>) -> MutPtr<QStyle>[src]

Calls C++ function: QStyle* static_cast<QStyle*>(QProxyStyle* ptr).

impl StaticDowncast<QStyle> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QStyle>[src]

Calls C++ function: QStyle* static_cast<QStyle*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QStyle>[src]

Calls C++ function: QStyle* static_cast<QStyle*>(QObject* ptr).

impl StaticDowncast<QCommonStyle> for QStyle[src]

unsafe fn static_downcast(ptr: Ptr<QStyle>) -> Ptr<QCommonStyle>[src]

Calls C++ function: QCommonStyle* static_cast<QCommonStyle*>(QStyle* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QStyle>) -> MutPtr<QCommonStyle>[src]

Calls C++ function: QCommonStyle* static_cast<QCommonStyle*>(QStyle* ptr).

impl StaticDowncast<QProxyStyle> for QStyle[src]

unsafe fn static_downcast(ptr: Ptr<QStyle>) -> Ptr<QProxyStyle>[src]

Calls C++ function: QProxyStyle* static_cast<QProxyStyle*>(QStyle* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QStyle>) -> MutPtr<QProxyStyle>[src]

Calls C++ function: QProxyStyle* static_cast<QProxyStyle*>(QStyle* ptr).

impl DynamicCast<QStyle> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QStyle>[src]

Calls C++ function: QStyle* dynamic_cast<QStyle*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QStyle>[src]

Calls C++ function: QStyle* dynamic_cast<QStyle*>(QObject* ptr).

impl DynamicCast<QCommonStyle> for QStyle[src]

unsafe fn dynamic_cast(ptr: Ptr<QStyle>) -> Ptr<QCommonStyle>[src]

Calls C++ function: QCommonStyle* dynamic_cast<QCommonStyle*>(QStyle* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QStyle>) -> MutPtr<QCommonStyle>[src]

Calls C++ function: QCommonStyle* dynamic_cast<QCommonStyle*>(QStyle* ptr).

impl DynamicCast<QProxyStyle> for QStyle[src]

unsafe fn dynamic_cast(ptr: Ptr<QStyle>) -> Ptr<QProxyStyle>[src]

Calls C++ function: QProxyStyle* dynamic_cast<QProxyStyle*>(QStyle* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QStyle>) -> MutPtr<QProxyStyle>[src]

Calls C++ function: QProxyStyle* dynamic_cast<QProxyStyle*>(QStyle* ptr).

impl CppDeletable for QStyle[src]

unsafe fn delete(&mut self)[src]

Destroys the style object.

Calls C++ function: virtual [destructor] void QStyle::~QStyle().

C++ documentation:

Destroys the style object.

Auto Trait Implementations

impl Send for QStyle

impl Sync for QStyle

impl Unpin for QStyle

impl UnwindSafe for QStyle

impl RefUnwindSafe for QStyle

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]