Struct qt_gui::q_font::StyleHint

source ·
pub struct StyleHint(/* private fields */);
Expand description

Style hints are used by the font matching algorithm to find an appropriate default family if a selected font family is not available.

C++ enum: QFont::StyleHint.

C++ documentation:

Style hints are used by the font matching algorithm to find an appropriate default family if a selected font family is not available.

Implementations§

source§

impl StyleHint

source

pub fn to_int(&self) -> c_int

source§

impl StyleHint

source

pub const Helvetica: StyleHint = _

is a synonym for SansSerif. (C++ enum variant: Helvetica = 0)

source

pub const SansSerif: StyleHint = _

the font matcher prefer sans serif fonts. (C++ enum variant: SansSerif = 0)

source

pub const Times: StyleHint = _

is a synonym for Serif. (C++ enum variant: Times = 1)

source

pub const Serif: StyleHint = _

the font matcher prefers serif fonts. (C++ enum variant: Serif = 1)

source

pub const Courier: StyleHint = _

a synonym for TypeWriter. (C++ enum variant: Courier = 2)

source

pub const TypeWriter: StyleHint = _

the font matcher prefers fixed pitch fonts. (C++ enum variant: TypeWriter = 2)

source

pub const OldEnglish: StyleHint = _

the font matcher prefers decorative fonts. (C++ enum variant: OldEnglish = 3)

source

pub const Decorative: StyleHint = _

is a synonym for OldEnglish. (C++ enum variant: Decorative = 3)

source

pub const System: StyleHint = _

the font matcher prefers system fonts. (C++ enum variant: System = 4)

source

pub const AnyStyle: StyleHint = _

leaves the font matching algorithm to choose the family. This is the default. (C++ enum variant: AnyStyle = 5)

source

pub const Cursive: StyleHint = _

the font matcher prefers fonts that map to the CSS generic font-family ‘cursive’. (C++ enum variant: Cursive = 6)

source

pub const Monospace: StyleHint = _

the font matcher prefers fonts that map to the CSS generic font-family ‘monospace’. (C++ enum variant: Monospace = 7)

source

pub const Fantasy: StyleHint = _

the font matcher prefers fonts that map to the CSS generic font-family ‘fantasy’. (C++ enum variant: Fantasy = 8)

Trait Implementations§

source§

impl Clone for StyleHint

source§

fn clone(&self) -> StyleHint

Returns a copy 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 StyleHint

source§

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

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

impl From<StyleHint> for c_int

source§

fn from(value: StyleHint) -> Self

Converts to this type from the input type.
source§

impl From<i32> for StyleHint

source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
source§

impl PartialEq for StyleHint

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for StyleHint

source§

impl Eq for StyleHint

source§

impl StructuralEq for StyleHint

source§

impl StructuralPartialEq for StyleHint

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> 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,

§

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>,

§

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>,

§

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.