[][src]Struct qt_gui::QTextInlineObject

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

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().

Methods

impl QTextInlineObject[src]

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

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().

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

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().

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

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().

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

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.

pub unsafe fn format_index(&self) -> c_int[src]

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.

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

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().

pub unsafe fn is_valid(&self) -> bool[src]

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.

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

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

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

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().

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

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().

pub unsafe fn set_ascent(&mut self, a: c_double)[src]

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().

pub unsafe fn set_descent(&mut self, d: c_double)[src]

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().

pub unsafe fn set_width(&mut self, w: c_double)[src]

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().

pub unsafe fn text_direction(&self) -> LayoutDirection[src]

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.

pub unsafe fn text_position(&self) -> c_int[src]

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.

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

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

impl CppDeletable for QTextInlineObject[src]

unsafe fn delete(&mut self)[src]

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

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.