[][src]Struct qt_gui::QTextItem

#[repr(C)]
pub struct QTextItem { /* fields omitted */ }

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.

Methods

impl QTextItem[src]

pub unsafe fn ascent(&self) -> c_double[src]

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.

pub unsafe fn copy_from(
    &mut self,
    other: impl CastInto<Ref<QTextItem>>
) -> MutRef<QTextItem>
[src]

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.

pub unsafe fn descent(&self) -> c_double[src]

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.

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

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.

pub unsafe fn new() -> CppBox<QTextItem>[src]

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.

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

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.

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

Returns the render flags used.

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

C++ documentation:

Returns the render flags used.

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

Returns the text that should be drawn.

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

C++ documentation:

Returns the text that should be drawn.

pub unsafe fn width(&self) -> c_double[src]

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

impl CppDeletable for QTextItem[src]

unsafe fn delete(&mut self)[src]

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

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