[][src]Struct qt_core::AlignmentFlag

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

This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.

C++ enum: Qt::AlignmentFlag.

C++ documentation:

This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.

The TextElideMode enum can also be used in many situations to fine-tune the appearance of aligned text.

The horizontal flags are:

The vertical flags are:

You can use only one of the horizontal flags at a time. There is one two-dimensional flag:

You can use at most one horizontal and one vertical flag at a time. Qt::AlignCenter counts as both horizontal and vertical.

Three enum values are useful in applications that can be run in right-to-left mode:

Masks:

Conflicting combinations of flags have undefined meanings.

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

Methods

impl AlignmentFlag[src]

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

impl AlignmentFlag[src]

pub const AlignLeft: AlignmentFlag[src]

Aligns with the left edge. (C++ enum variant: AlignLeft = 1)

pub const AlignLeading: AlignmentFlag[src]

Synonym for Qt::AlignLeft. (C++ enum variant: AlignLeading = 1)

pub const AlignRight: AlignmentFlag[src]

Aligns with the right edge. (C++ enum variant: AlignRight = 2)

pub const AlignTrailing: AlignmentFlag[src]

Synonym for Qt::AlignRight. (C++ enum variant: AlignTrailing = 2)

pub const AlignHCenter: AlignmentFlag[src]

Centers horizontally in the available space. (C++ enum variant: AlignHCenter = 4)

pub const AlignJustify: AlignmentFlag[src]

Justifies the text in the available space. (C++ enum variant: AlignJustify = 8)

pub const AlignAbsolute: AlignmentFlag[src]

If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge. This is normally the desired behavior. If you want Qt::AlignLeft to always mean "left" and Qt::AlignRight to always mean "right", combine the flag with Qt::AlignAbsolute. (C++ enum variant: AlignAbsolute = 16)

pub const AlignHorizontalMask: AlignmentFlag[src]

C++ enum variant: AlignHorizontal_Mask = 31

pub const AlignTop: AlignmentFlag[src]

Aligns with the top. (C++ enum variant: AlignTop = 32)

pub const AlignBottom: AlignmentFlag[src]

Aligns with the bottom. (C++ enum variant: AlignBottom = 64)

pub const AlignVCenter: AlignmentFlag[src]

Centers vertically in the available space. (C++ enum variant: AlignVCenter = 128)

pub const AlignBaseline: AlignmentFlag[src]

Aligns with the baseline. (C++ enum variant: AlignBaseline = 256)

pub const AlignVerticalMask: AlignmentFlag[src]

C++ enum variant: AlignVertical_Mask = 480

pub const AlignCenter: AlignmentFlag[src]

Centers in both dimensions. (C++ enum variant: AlignCenter = 132)

Trait Implementations

impl<T: Into<QFlags<AlignmentFlag>>> BitOr<T> for AlignmentFlag[src]

type Output = QFlags<AlignmentFlag>

The resulting type after applying the | operator.

impl Clone for AlignmentFlag[src]

impl Copy for AlignmentFlag[src]

impl Debug for AlignmentFlag[src]

impl Eq for AlignmentFlag[src]

impl From<AlignmentFlag> for c_int[src]

impl From<AlignmentFlag> for QFlags<AlignmentFlag>[src]

impl From<i32> for AlignmentFlag[src]

impl PartialEq<AlignmentFlag> for AlignmentFlag[src]

impl StructuralEq for AlignmentFlag[src]

impl StructuralPartialEq for AlignmentFlag[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.