- All Implemented Interfaces:
QtObjectInterface
,Cloneable
public class QStyleOptionMenuItem extends QStyleOption implements Cloneable
Used to describe the parameter necessary for drawing a menu item
Java wrapper for Qt class QStyleOptionMenuItem
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QStyleOptionMenuItem.CheckType
Java wrapper for Qt enum QStyleOptionMenuItem::CheckTypestatic class
QStyleOptionMenuItem.MenuItemType
Java wrapper for Qt enum QStyleOptionMenuItem::MenuItemType -
Constructor Summary
Constructors Modifier Constructor Description QStyleOptionMenuItem()
protected
QStyleOptionMenuItem(QtObject.QPrivateConstructor p)
Constructor for internal use only.QStyleOptionMenuItem(QStyleOptionMenuItem other)
-
Method Summary
Modifier and Type Method Description boolean
checked()
Whether the menu item is checked or notQStyleOptionMenuItem.CheckType
checkType()
The type of checkmark of the menu itemQStyleOptionMenuItem
clone()
QFont
font()
The font used for the menu item textQIcon
icon()
The icon for the menu itemint
maxIconWidth()
The maximum icon width for the icon in the menu itemboolean
menuHasCheckableItems()
Whether the menu as a whole has checkable items or notQStyleOptionMenuItem.MenuItemType
menuItemType()
The type of menu itemQRect
menuRect()
The rectangle for the entire menuint
reservedShortcutWidth()
The reserved width for the menu item's shortcutvoid
set(QStyleOptionMenuItem arg__1)
void
setChecked(boolean checked)
Whether the menu item is checked or notvoid
setCheckType(QStyleOptionMenuItem.CheckType checkType)
The type of checkmark of the menu itemvoid
setFont(QFont font)
The font used for the menu item textvoid
setIcon(QIcon icon)
The icon for the menu itemvoid
setMaxIconWidth(int maxIconWidth)
The maximum icon width for the icon in the menu itemvoid
setMenuHasCheckableItems(boolean menuHasCheckableItems)
Whether the menu as a whole has checkable items or notvoid
setMenuItemType(QStyleOptionMenuItem.MenuItemType menuItemType)
The type of menu itemvoid
setMenuRect(QRect menuRect)
The rectangle for the entire menuvoid
setReservedShortcutWidth(int reservedShortcutWidth)
The reserved width for the menu item's shortcutvoid
setText(String text)
The text for the menu itemString
text()
The text for the menu itemMethods inherited from class io.qt.widgets.QStyleOption
direction, fontMetrics, initFrom, palette, rect, set, setDirection, setFontMetrics, setPalette, setRect, setState, setState, setStyleObject, state, styleObject, toString
-
Constructor Details
-
QStyleOptionMenuItem
public QStyleOptionMenuItem() -
QStyleOptionMenuItem
-
QStyleOptionMenuItem
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
-
Method Details
-
set
-
setCheckType
The type of checkmark of the menu item
-
checkType
The type of checkmark of the menu item
-
setChecked
Whether the menu item is checked or not
-
checked
Whether the menu item is checked or not
-
setFont
The font used for the menu item text
-
font
The font used for the menu item text
-
setIcon
The icon for the menu item
-
icon
The icon for the menu item
-
setMaxIconWidth
The maximum icon width for the icon in the menu item
-
maxIconWidth
The maximum icon width for the icon in the menu item
-
setMenuHasCheckableItems
Whether the menu as a whole has checkable items or not
-
menuHasCheckableItems
Whether the menu as a whole has checkable items or not
-
setMenuItemType
The type of menu item
-
menuItemType
The type of menu item
-
setMenuRect
The rectangle for the entire menu
-
menuRect
The rectangle for the entire menu
-
setReservedShortcutWidth
The reserved width for the menu item's shortcut
-
reservedShortcutWidth
The reserved width for the menu item's shortcut
-
setText
The text for the menu item
-
text
The text for the menu item
-
clone
- Overrides:
clone
in classQStyleOption
-