Struct qt_gui::QTextItem

source ·
#[repr(C)]
pub struct QTextItem { /* private fields */ }
Expand description

The QTextItem class provides all the information required to draw text in a custom paint engine.

C++ class: QTextItem.

C++ documentation:

The QTextItem class provides all the information required to draw text in a custom paint engine.

When you reimplement your own paint engine, you must reimplement QPaintEngine::drawTextItem(), a function that takes a QTextItem as one of its arguments.

Implementations§

source§

impl QTextItem

source

pub unsafe fn ascent(&self) -> c_double

Corresponds to the ascent of the piece of text that is drawn.

Calls C++ function: double QTextItem::ascent() const.

C++ documentation:

Corresponds to the ascent of the piece of text that is drawn.

source

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

The QTextItem class provides all the information required to draw text in a custom paint engine.

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

C++ documentation:

The QTextItem class provides all the information required to draw text in a custom paint engine.

When you reimplement your own paint engine, you must reimplement QPaintEngine::drawTextItem(), a function that takes a QTextItem as one of its arguments.

source

pub unsafe fn descent(&self) -> c_double

Corresponds to the descent of the piece of text that is drawn.

Calls C++ function: double QTextItem::descent() const.

C++ documentation:

Corresponds to the descent of the piece of text that is drawn.

source

pub unsafe fn font(&self) -> CppBox<QFont>

Returns the font that should be used to draw the text.

Calls C++ function: QFont QTextItem::font() const.

C++ documentation:

Returns the font that should be used to draw the text.

source

pub unsafe fn new() -> CppBox<QTextItem>

The QTextItem class provides all the information required to draw text in a custom paint engine.

Calls C++ function: [constructor] void QTextItem::QTextItem().

C++ documentation:

The QTextItem class provides all the information required to draw text in a custom paint engine.

When you reimplement your own paint engine, you must reimplement QPaintEngine::drawTextItem(), a function that takes a QTextItem as one of its arguments.

source

pub unsafe fn new_copy( other: impl CastInto<Ref<QTextItem>> ) -> CppBox<QTextItem>

The QTextItem class provides all the information required to draw text in a custom paint engine.

Calls C++ function: [constructor] void QTextItem::QTextItem(const QTextItem& other).

C++ documentation:

The QTextItem class provides all the information required to draw text in a custom paint engine.

When you reimplement your own paint engine, you must reimplement QPaintEngine::drawTextItem(), a function that takes a QTextItem as one of its arguments.

source

pub unsafe fn render_flags(&self) -> QFlags<RenderFlag>

Returns the render flags used.

Calls C++ function: QFlags<QTextItem::RenderFlag> QTextItem::renderFlags() const.

C++ documentation:

Returns the render flags used.

source

pub unsafe fn text(&self) -> CppBox<QString>

Returns the text that should be drawn.

Calls C++ function: QString QTextItem::text() const.

C++ documentation:

Returns the text that should be drawn.

source

pub unsafe fn width(&self) -> c_double

Specifies the total width of the text to be drawn.

Calls C++ function: double QTextItem::width() const.

C++ documentation:

Specifies the total width of the text to be drawn.

Trait Implementations§

source§

impl CppDeletable for QTextItem

source§

unsafe fn delete(&self)

The QTextItem class provides all the information required to draw text in a custom paint engine.

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

C++ documentation:

The QTextItem class provides all the information required to draw text in a custom paint engine.

When you reimplement your own paint engine, you must reimplement QPaintEngine::drawTextItem(), a function that takes a QTextItem as one of its arguments.

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

§

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.