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

The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.

C++ class: QTextInlineObject.

C++ documentation:

The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.

Normally, you do not need to create a QTextInlineObject. It is used by QAbstractTextDocumentLayout to handle inline objects when implementing a custom layout.

The inline object has various attributes that can be set, for example using, setWidth(), setAscent(), and setDescent(). The rectangle it occupies is given by rect(), and its direction by textDirection(). Its position in the text layout is given by textPosition(), and its format is given by format().

Implementations§

source§

impl QTextInlineObject

source

pub unsafe fn ascent(&self) -> c_double

Returns the inline object's ascent.

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

C++ documentation:

Returns the inline object’s ascent.

See also setAscent(), descent(), width(), and rect().

source

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

The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.

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

C++ documentation:

The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.

Normally, you do not need to create a QTextInlineObject. It is used by QAbstractTextDocumentLayout to handle inline objects when implementing a custom layout.

The inline object has various attributes that can be set, for example using, setWidth(), setAscent(), and setDescent(). The rectangle it occupies is given by rect(), and its direction by textDirection(). Its position in the text layout is given by textPosition(), and its format is given by format().

source

pub unsafe fn descent(&self) -> c_double

Returns the inline object's descent.

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

C++ documentation:

Returns the inline object’s descent.

See also setDescent(), ascent(), width(), and rect().

source

pub unsafe fn format(&self) -> CppBox<QTextFormat>

Returns format of the inline object within the text layout.

Calls C++ function: QTextFormat QTextInlineObject::format() const.

C++ documentation:

Returns format of the inline object within the text layout.

source

pub unsafe fn format_index(&self) -> c_int

Returns an integer describing the format of the inline object within the text layout.

Calls C++ function: int QTextInlineObject::formatIndex() const.

C++ documentation:

Returns an integer describing the format of the inline object within the text layout.

source

pub unsafe fn height(&self) -> c_double

Returns the inline object's total height. This is equal to ascent() + descent() + 1.

Calls C++ function: double QTextInlineObject::height() const.

C++ documentation:

Returns the inline object’s total height. This is equal to ascent() + descent() + 1.

See also ascent(), descent(), width(), and rect().

source

pub unsafe fn is_valid(&self) -> bool

Returns true if this inline object is valid; otherwise returns false.

Calls C++ function: bool QTextInlineObject::isValid() const.

C++ documentation:

Returns true if this inline object is valid; otherwise returns false.

source

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

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

source

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

The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.

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

C++ documentation:

The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.

Normally, you do not need to create a QTextInlineObject. It is used by QAbstractTextDocumentLayout to handle inline objects when implementing a custom layout.

The inline object has various attributes that can be set, for example using, setWidth(), setAscent(), and setDescent(). The rectangle it occupies is given by rect(), and its direction by textDirection(). Its position in the text layout is given by textPosition(), and its format is given by format().

source

pub unsafe fn rect(&self) -> CppBox<QRectF>

Returns the inline object's rectangle.

Calls C++ function: QRectF QTextInlineObject::rect() const.

C++ documentation:

Returns the inline object’s rectangle.

See also ascent(), descent(), and width().

source

pub unsafe fn set_ascent(&self, a: c_double)

Sets the inline object's ascent to a.

Calls C++ function: void QTextInlineObject::setAscent(double a).

C++ documentation:

Sets the inline object’s ascent to a.

See also ascent(), setDescent(), width(), and rect().

source

pub unsafe fn set_descent(&self, d: c_double)

Sets the inline object's descent to d.

Calls C++ function: void QTextInlineObject::setDescent(double d).

C++ documentation:

Sets the inline object’s descent to d.

See also descent(), setAscent(), width(), and rect().

source

pub unsafe fn set_width(&self, w: c_double)

Sets the inline object's width to w.

Calls C++ function: void QTextInlineObject::setWidth(double w).

C++ documentation:

Sets the inline object’s width to w.

See also width(), ascent(), descent(), and rect().

source

pub unsafe fn text_direction(&self) -> LayoutDirection

Returns if the object should be laid out right-to-left or left-to-right.

Calls C++ function: Qt::LayoutDirection QTextInlineObject::textDirection() const.

C++ documentation:

Returns if the object should be laid out right-to-left or left-to-right.

source

pub unsafe fn text_position(&self) -> c_int

The position of the inline object within the text layout.

Calls C++ function: int QTextInlineObject::textPosition() const.

C++ documentation:

The position of the inline object within the text layout.

source

pub unsafe fn width(&self) -> c_double

Returns the inline object's width.

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

C++ documentation:

Returns the inline object’s width.

See also setWidth(), ascent(), descent(), and rect().

Trait Implementations§

source§

impl CppDeletable for QTextInlineObject

source§

unsafe fn delete(&self)

The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.

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

C++ documentation:

The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.

Normally, you do not need to create a QTextInlineObject. It is used by QAbstractTextDocumentLayout to handle inline objects when implementing a custom layout.

The inline object has various attributes that can be set, for example using, setWidth(), setAscent(), and setDescent(). The rectangle it occupies is given by rect(), and its direction by textDirection(). Its position in the text layout is given by textPosition(), and its format is given by format().

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.