[][src]Struct qt_widgets::q_action::MenuRole

#[repr(transparent)]
pub struct MenuRole(_);

This enum describes how an action should be moved into the application menu on macOS.

C++ enum: QAction::MenuRole.

C++ documentation:

This enum describes how an action should be moved into the application menu on macOS.

Setting this value only has effect on items that are in the immediate menus of the menubar, not the submenus of those menus. For example, if you have File menu in your menubar and the File menu has a submenu, setting the MenuRole for the actions in that submenu have no effect. They will never be moved.

Methods

impl MenuRole[src]

pub fn to_int(&self) -> c_int[src]

impl MenuRole[src]

pub const NoRole: MenuRole[src]

This action should not be put into the application menu (C++ enum variant: NoRole = 0)

pub const TextHeuristicRole: MenuRole[src]

This action should be put in the application menu based on the action's text as described in the QMenuBar documentation. (C++ enum variant: TextHeuristicRole = 1)

pub const ApplicationSpecificRole: MenuRole[src]

This action should be put in the application menu with an application specific role (C++ enum variant: ApplicationSpecificRole = 2)

pub const AboutQtRole: MenuRole[src]

This action handles the "About Qt" menu item. (C++ enum variant: AboutQtRole = 3)

pub const AboutRole: MenuRole[src]

This action should be placed where the "About" menu item is in the application menu. The text of the menu item will be set to "About <application name>". The application name is fetched from the Info.plist file in the application's bundle (See Qt for macOS - Deployment). (C++ enum variant: AboutRole = 4)

pub const PreferencesRole: MenuRole[src]

This action should be placed where the "Preferences..." menu item is in the application menu. (C++ enum variant: PreferencesRole = 5)

pub const QuitRole: MenuRole[src]

This action should be placed where the Quit menu item is in the application menu. (C++ enum variant: QuitRole = 6)

Trait Implementations

impl Eq for MenuRole[src]

impl Clone for MenuRole[src]

impl PartialEq<MenuRole> for MenuRole[src]

impl From<i32> for MenuRole[src]

impl From<MenuRole> for c_int[src]

impl Copy for MenuRole[src]

impl Debug for MenuRole[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<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]