Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QStyleOptionMenuItem class is used to describe the parameter necessary for drawing a menu item. More...
Public Member Functions | |
QStyleOptionMenuItem () | |
| |
QStyleOptionMenuItem (QStyleOptionMenuItem other) | |
| |
override void | CreateProxy () |
new void | Dispose () |
Public Member Functions inherited from QtGui.QStyleOption | |
QStyleOption (QStyleOption other) | |
| |
QStyleOption (int version=(int) QStyleOption.StyleOptionVersion.Version, int type=(int) QStyleOption.OptionType.SO_Default) | |
| |
new void | Init (QWidget w) |
| |
new void | InitFrom (QWidget w) |
| |
new void | Dispose () |
Protected Member Functions | |
QStyleOptionMenuItem (System.Type dummy) | |
QStyleOptionMenuItem (int version) | |
| |
Protected Member Functions inherited from QtGui.QStyleOption | |
QStyleOption (System.Type dummy) | |
Properties | |
new QStyleOptionMenuItem.CheckType | checkType [get, set] |
| |
new bool | Checked [get, set] |
| |
new QFont | Font [get, set] |
| |
new QIcon | Icon [get, set] |
| |
new int | MaxIconWidth [get, set] |
| |
new bool | MenuHasCheckableItems [get, set] |
| |
new QStyleOptionMenuItem.MenuItemType | menuItemType [get, set] |
| |
new QRect | MenuRect [get, set] |
| |
new int | TabWidth [get, set] |
| |
new string | Text [get, set] |
| |
Properties inherited from QtGui.QStyleOption | |
virtual System.IntPtr | SmokeObject [get, set] |
new Qt.LayoutDirection | Direction [get, set] |
| |
new QFontMetrics | FontMetrics [get, set] |
| |
new QPalette | Palette [get, set] |
| |
new QRect | Rect [get, set] |
| |
new QStyle.StateFlag | State [get, set] |
| |
new int | Type [get, set] |
| |
new int | Version [get, set] |
| |
Additional Inherited Members | |
Protected Attributes inherited from QtGui.QStyleOption | |
SmokeInvocation | interceptor |
The QStyleOptionMenuItem class is used to describe the parameter necessary for drawing a menu item.
QStyleOptionMenuItem contains all the information that QStyle functions need to draw the menu items from QMenu. It is also used for drawing other menu-related widgets.
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.
See also QStyleOption.
This enum is used to indicate whether or not a check mark should be drawn for the item, or even if it should be drawn at all.
See also checkType, QAction::checkable, QAction::checked, and QActionGroup::exclusive.
This enum indicates the type of menu item that the structure describes.
See also menuItemType.
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
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.
See also StyleOptionVersion.
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.
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.
See also StyleOptionType.
|
protected |
QtGui.QStyleOptionMenuItem.QStyleOptionMenuItem | ( | ) |
Constructs a QStyleOptionMenuItem, initializing the members variables to their default values.
QtGui.QStyleOptionMenuItem.QStyleOptionMenuItem | ( | QStyleOptionMenuItem | other | ) |
Constructs a copy of the other style option.
|
protected |
Constructs a QStyleOptionMenuItem, initializing the members variables to their default values.
|
virtual |
Reimplemented from QtGui.QStyleOption.
new void QtGui.QStyleOptionMenuItem.Dispose | ( | ) |
|
getset |
This variable holds whether the menu item is checked or not.
The default value is false.
|
getset |
This variable holds the type of checkmark of the menu item.
The default value is NotCheckable.
See also CheckType.
|
getset |
This variable holds the font used for the menu item text.
This is the font that should be used for drawing the menu text minus the shortcut. The shortcut is usually drawn using the painter's font. By default, the application's default font is used.
|
getset |
This variable holds the icon for the menu item.
The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.
|
getset |
This variable holds the maximum icon width for the icon in the menu item.
This can be used for drawing the icon into the correct place or properly aligning items. The variable must be set regardless of whether or not the menu item has an icon. The default value is 0.
|
getset |
This variable holds whether the menu as a whole has checkable items or not.
The default value is true.
If this option is set to false, then the menu has no checkable items. This makes it possible for GUI styles to save some horizontal space that would normally be used for the check column.
|
getset |
This variable holds the type of menu item.
The default value is Normal.
See also MenuItemType.
|
getset |
This variable holds the rectangle for the entire menu.
The default value is a null rectangle, i.e. a rectangle with both the width and the height set to 0.
|
getset |
This variable holds the tab width for the menu item.
The tab width is the distance between the text of the menu item and the shortcut. The default value is 0.
|
getset |
This variable holds the text for the menu item.
Note that the text format is something like this "Menu text\tShortcut".
If the menu item doesn't have a shortcut, it will just contain the menu item's text. The default value is an empty string.