Skip to main content

StandardButton

Struct StandardButton 

Source
pub struct StandardButton(/* private fields */);
Expand description

These enums describe flags for standard buttons. Each button has a defined ButtonRole.

C++ enum: QMessageBox::StandardButton.

C++ documentation:

These enums describe flags for standard buttons. Each button has a defined ButtonRole.

The following values are obsolete:

This enum was introduced or modified in Qt 4.2.

The StandardButtons type is a typedef for QFlags<StandardButton>. It stores an OR combination of StandardButton values.

See also ButtonRole and standardButtons.

Implementations§

Source§

impl StandardButton

Source

pub fn to_int(&self) -> c_int

Source§

impl StandardButton

Source

pub const NoButton: StandardButton

An invalid button. (C++ enum variant: NoButton = 0)

Source

pub const Ok: StandardButton

An “OK” button defined with the AcceptRole. (C++ enum variant: Ok = 1024)

Source

pub const Save: StandardButton

A “Save” button defined with the AcceptRole. (C++ enum variant: Save = 2048)

Source

pub const SaveAll: StandardButton

A “Save All” button defined with the AcceptRole. (C++ enum variant: SaveAll = 4096)

Source

pub const Open: StandardButton

An “Open” button defined with the AcceptRole. (C++ enum variant: Open = 8192)

Source

pub const Yes: StandardButton

A “Yes” button defined with the YesRole. (C++ enum variant: Yes = 16384)

Source

pub const YesToAll: StandardButton

A “Yes to All” button defined with the YesRole. (C++ enum variant: YesToAll = 32768)

Source

pub const No: StandardButton

A “No” button defined with the NoRole. (C++ enum variant: No = 65536)

Source

pub const NoToAll: StandardButton

A “No to All” button defined with the NoRole. (C++ enum variant: NoToAll = 131072)

Source

pub const Abort: StandardButton

An “Abort” button defined with the RejectRole. (C++ enum variant: Abort = 262144)

Source

pub const Retry: StandardButton

A “Retry” button defined with the AcceptRole. (C++ enum variant: Retry = 524288)

Source

pub const Ignore: StandardButton

An “Ignore” button defined with the AcceptRole. (C++ enum variant: Ignore = 1048576)

Source

pub const Close: StandardButton

A “Close” button defined with the RejectRole. (C++ enum variant: Close = 2097152)

Source

pub const Cancel: StandardButton

A “Cancel” button defined with the RejectRole. (C++ enum variant: Cancel = 4194304)

Source

pub const Discard: StandardButton

A “Discard” or “Don’t Save” button, depending on the platform, defined with the DestructiveRole. (C++ enum variant: Discard = 8388608)

Source

pub const Help: StandardButton

A “Help” button defined with the HelpRole. (C++ enum variant: Help = 16777216)

Source

pub const Apply: StandardButton

An “Apply” button defined with the ApplyRole. (C++ enum variant: Apply = 33554432)

Source

pub const Reset: StandardButton

A “Reset” button defined with the ResetRole. (C++ enum variant: Reset = 67108864)

Source

pub const RestoreDefaults: StandardButton

A “Restore Defaults” button defined with the ResetRole. (C++ enum variant: RestoreDefaults = 134217728)

Source

pub const FirstButton: StandardButton

C++ enum variant: FirstButton = 1024

Source

pub const LastButton: StandardButton

C++ enum variant: LastButton = 134217728

Source

pub const YesAll: StandardButton

Use YesToAll instead. (C++ enum variant: YesAll = 32768)

Source

pub const NoAll: StandardButton

Use NoToAll instead. (C++ enum variant: NoAll = 131072)

Source

pub const Default: StandardButton

Use the defaultButton argument of information(), warning(), etc. instead, or call setDefaultButton(). (C++ enum variant: Default = 256)

Source

pub const Escape: StandardButton

Call setEscapeButton() instead. (C++ enum variant: Escape = 512)

Source

pub const FlagMask: StandardButton

  (C++ enum variant: FlagMask = 768)

Source

pub const ButtonMask: StandardButton

  (C++ enum variant: ButtonMask = -769)

Trait Implementations§

Source§

impl<T: Into<QFlags<StandardButton>>> BitOr<T> for StandardButton

Source§

type Output = QFlags<StandardButton>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: T) -> QFlags<StandardButton>

Performs the | operation. Read more
Source§

impl Clone for StandardButton

Source§

fn clone(&self) -> StandardButton

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StandardButton

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<StandardButton> for QFlags<StandardButton>

Source§

fn from(value: StandardButton) -> Self

Converts to this type from the input type.
Source§

impl From<StandardButton> for c_int

Source§

fn from(value: StandardButton) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for StandardButton

Source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for StandardButton

Source§

fn eq(&self, other: &StandardButton) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for StandardButton

Source§

impl Eq for StandardButton

Source§

impl StructuralPartialEq for StandardButton

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.