Skip to main content

QFontMetrics

Struct QFontMetrics 

Source
pub struct QFontMetrics { /* private fields */ }
Expand description

C++ class: QFontMetrics.

Implementations§

Source§

impl QFontMetrics

Source

pub unsafe fn ascent(&self) -> c_int

Calls C++ function: int QFontMetrics::ascent() const.

Source

pub unsafe fn average_char_width(&self) -> c_int

Calls C++ function: int QFontMetrics::averageCharWidth() const.

Source

pub unsafe fn bounding_rect_q_char( &self, arg1: impl CastInto<Ref<QChar>>, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::boundingRect(QChar arg1) const.

Source

pub unsafe fn bounding_rect_q_string( &self, text: impl CastInto<Ref<QString>>, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::boundingRect(const QString& text) const.

Source

pub unsafe fn bounding_rect_q_rect_int_q_string_int_int( &self, r: impl CastInto<Ref<QRect>>, flags: c_int, text: impl CastInto<Ref<QString>>, tabstops: c_int, tabarray: *mut c_int, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::boundingRect(const QRect& r, int flags, const QString& text, int tabstops = …, int* tabarray = …) const.

Source

pub unsafe fn bounding_rect_5_int_q_string_int_int( &self, x: c_int, y: c_int, w: c_int, h: c_int, flags: c_int, text: impl CastInto<Ref<QString>>, tabstops: c_int, tabarray: *mut c_int, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::boundingRect(int x, int y, int w, int h, int flags, const QString& text, int tabstops = …, int* tabarray = …) const.

Source

pub unsafe fn bounding_rect_q_rect_int_q_string_int( &self, r: impl CastInto<Ref<QRect>>, flags: c_int, text: impl CastInto<Ref<QString>>, tabstops: c_int, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::boundingRect(const QRect& r, int flags, const QString& text, int tabstops = …) const.

Source

pub unsafe fn bounding_rect_q_rect_int_q_string( &self, r: impl CastInto<Ref<QRect>>, flags: c_int, text: impl CastInto<Ref<QString>>, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::boundingRect(const QRect& r, int flags, const QString& text) const.

Source

pub unsafe fn bounding_rect_5_int_q_string_int( &self, x: c_int, y: c_int, w: c_int, h: c_int, flags: c_int, text: impl CastInto<Ref<QString>>, tabstops: c_int, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::boundingRect(int x, int y, int w, int h, int flags, const QString& text, int tabstops = …) const.

Source

pub unsafe fn bounding_rect_5_int_q_string( &self, x: c_int, y: c_int, w: c_int, h: c_int, flags: c_int, text: impl CastInto<Ref<QString>>, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::boundingRect(int x, int y, int w, int h, int flags, const QString& text) const.

Source

pub unsafe fn cap_height(&self) -> c_int

Calls C++ function: int QFontMetrics::capHeight() const.

Source

pub unsafe fn char_width( &self, str: impl CastInto<Ref<QString>>, pos: c_int, ) -> c_int

Calls C++ function: int QFontMetrics::charWidth(const QString& str, int pos) const.

Source

pub unsafe fn copy_from( &self, arg1: impl CastInto<Ref<QFontMetrics>>, ) -> Ref<QFontMetrics>

Calls C++ function: QFontMetrics& QFontMetrics::operator=(const QFontMetrics& arg1).

Source

pub unsafe fn descent(&self) -> c_int

Calls C++ function: int QFontMetrics::descent() const.

Source

pub unsafe fn elided_text_4a( &self, text: impl CastInto<Ref<QString>>, mode: TextElideMode, width: c_int, flags: c_int, ) -> CppBox<QString>

Calls C++ function: QString QFontMetrics::elidedText(const QString& text, Qt::TextElideMode mode, int width, int flags = …) const.

Source

pub unsafe fn elided_text_3a( &self, text: impl CastInto<Ref<QString>>, mode: TextElideMode, width: c_int, ) -> CppBox<QString>

Calls C++ function: QString QFontMetrics::elidedText(const QString& text, Qt::TextElideMode mode, int width) const.

Source

pub unsafe fn font_dpi(&self) -> c_double

Calls C++ function: double QFontMetrics::fontDpi() const.

Source

pub unsafe fn height(&self) -> c_int

Calls C++ function: int QFontMetrics::height() const.

Source

pub unsafe fn horizontal_advance_q_string_int( &self, arg1: impl CastInto<Ref<QString>>, len: c_int, ) -> c_int

Calls C++ function: int QFontMetrics::horizontalAdvance(const QString& arg1, int len = …) const.

Source

pub unsafe fn horizontal_advance_q_char( &self, arg1: impl CastInto<Ref<QChar>>, ) -> c_int

Calls C++ function: int QFontMetrics::horizontalAdvance(QChar arg1) const.

Source

pub unsafe fn horizontal_advance_q_string( &self, arg1: impl CastInto<Ref<QString>>, ) -> c_int

Calls C++ function: int QFontMetrics::horizontalAdvance(const QString& arg1) const.

Source

pub unsafe fn in_font(&self, arg1: impl CastInto<Ref<QChar>>) -> bool

Calls C++ function: bool QFontMetrics::inFont(QChar arg1) const.

Source

pub unsafe fn in_font_ucs4(&self, ucs4: c_uint) -> bool

Calls C++ function: bool QFontMetrics::inFontUcs4(unsigned int ucs4) const.

Source

pub unsafe fn leading(&self) -> c_int

Calls C++ function: int QFontMetrics::leading() const.

Source

pub unsafe fn left_bearing(&self, arg1: impl CastInto<Ref<QChar>>) -> c_int

Calls C++ function: int QFontMetrics::leftBearing(QChar arg1) const.

Source

pub unsafe fn line_spacing(&self) -> c_int

Calls C++ function: int QFontMetrics::lineSpacing() const.

Source

pub unsafe fn line_width(&self) -> c_int

Calls C++ function: int QFontMetrics::lineWidth() const.

Source

pub unsafe fn max_width(&self) -> c_int

Calls C++ function: int QFontMetrics::maxWidth() const.

Source

pub unsafe fn min_left_bearing(&self) -> c_int

Calls C++ function: int QFontMetrics::minLeftBearing() const.

Source

pub unsafe fn min_right_bearing(&self) -> c_int

Calls C++ function: int QFontMetrics::minRightBearing() const.

Source

pub unsafe fn new_1a(arg1: impl CastInto<Ref<QFont>>) -> CppBox<QFontMetrics>

Calls C++ function: [constructor] void QFontMetrics::QFontMetrics(const QFont& arg1).

Source

pub unsafe fn new_2a( font: impl CastInto<Ref<QFont>>, pd: impl CastInto<Ptr<QPaintDevice>>, ) -> CppBox<QFontMetrics>

Calls C++ function: [constructor] void QFontMetrics::QFontMetrics(const QFont& font, QPaintDevice* pd).

Source

pub unsafe fn new_copy( arg1: impl CastInto<Ref<QFontMetrics>>, ) -> CppBox<QFontMetrics>

Calls C++ function: [constructor] void QFontMetrics::QFontMetrics(const QFontMetrics& arg1).

Source

pub unsafe fn overline_pos(&self) -> c_int

Calls C++ function: int QFontMetrics::overlinePos() const.

Source

pub unsafe fn right_bearing(&self, arg1: impl CastInto<Ref<QChar>>) -> c_int

Calls C++ function: int QFontMetrics::rightBearing(QChar arg1) const.

Source

pub unsafe fn size_4a( &self, flags: c_int, str: impl CastInto<Ref<QString>>, tabstops: c_int, tabarray: *mut c_int, ) -> CppBox<QSize>

Calls C++ function: QSize QFontMetrics::size(int flags, const QString& str, int tabstops = …, int* tabarray = …) const.

Source

pub unsafe fn size_3a( &self, flags: c_int, str: impl CastInto<Ref<QString>>, tabstops: c_int, ) -> CppBox<QSize>

Calls C++ function: QSize QFontMetrics::size(int flags, const QString& str, int tabstops = …) const.

Source

pub unsafe fn size_2a( &self, flags: c_int, str: impl CastInto<Ref<QString>>, ) -> CppBox<QSize>

Calls C++ function: QSize QFontMetrics::size(int flags, const QString& str) const.

Source

pub unsafe fn strike_out_pos(&self) -> c_int

Calls C++ function: int QFontMetrics::strikeOutPos() const.

Source

pub unsafe fn swap(&self, other: impl CastInto<Ref<QFontMetrics>>)

Calls C++ function: void QFontMetrics::swap(QFontMetrics& other).

Source

pub unsafe fn tight_bounding_rect( &self, text: impl CastInto<Ref<QString>>, ) -> CppBox<QRect>

Calls C++ function: QRect QFontMetrics::tightBoundingRect(const QString& text) const.

Source

pub unsafe fn underline_pos(&self) -> c_int

Calls C++ function: int QFontMetrics::underlinePos() const.

Source

pub unsafe fn width_q_string_int( &self, arg1: impl CastInto<Ref<QString>>, len: c_int, ) -> c_int

Calls C++ function: int QFontMetrics::width(const QString& arg1, int len = …) const.

Source

pub unsafe fn width_q_string2_int( &self, arg1: impl CastInto<Ref<QString>>, len: c_int, flags: c_int, ) -> c_int

Calls C++ function: int QFontMetrics::width(const QString& arg1, int len, int flags) const.

Source

pub unsafe fn width_q_char(&self, arg1: impl CastInto<Ref<QChar>>) -> c_int

Calls C++ function: int QFontMetrics::width(QChar arg1) const.

Source

pub unsafe fn width_q_string(&self, arg1: impl CastInto<Ref<QString>>) -> c_int

Calls C++ function: int QFontMetrics::width(const QString& arg1) const.

Source

pub unsafe fn x_height(&self) -> c_int

Calls C++ function: int QFontMetrics::xHeight() const.

Trait Implementations§

Source§

impl CppDeletable for QFontMetrics

Source§

unsafe fn delete(&self)

Calls C++ function: [destructor] void QFontMetrics::~QFontMetrics().

Source§

impl PartialEq<Ref<QFontMetrics>> for QFontMetrics

Source§

fn eq(&self, other: &Ref<QFontMetrics>) -> bool

Calls C++ function: bool QFontMetrics::operator==(const QFontMetrics& other) const.

1.0.0 (const: unstable) · 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.

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