Struct qt_gui::QTextInlineObject
source · #[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
.
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
impl QTextInlineObject
sourcepub unsafe fn ascent(&self) -> c_double
pub unsafe fn ascent(&self) -> c_double
Returns the inline object's ascent.
Calls C++ function: double QTextInlineObject::ascent() const
.
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QTextInlineObject>>
) -> Ref<QTextInlineObject>
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)
.
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().
sourcepub unsafe fn descent(&self) -> c_double
pub unsafe fn descent(&self) -> c_double
Returns the inline object's descent.
Calls C++ function: double QTextInlineObject::descent() const
.
Returns the inline object’s descent.
See also setDescent(), ascent(), width(), and rect().
sourcepub unsafe fn format(&self) -> CppBox<QTextFormat>
pub unsafe fn format(&self) -> CppBox<QTextFormat>
Returns format of the inline object within the text layout.
Calls C++ function: QTextFormat QTextInlineObject::format() const
.
Returns format of the inline object within the text layout.
sourcepub unsafe fn format_index(&self) -> c_int
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
.
Returns an integer describing the format of the inline object within the text layout.
sourcepub unsafe fn height(&self) -> c_double
pub unsafe fn height(&self) -> c_double
sourcepub unsafe fn is_valid(&self) -> bool
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
.
Returns true
if this inline object is valid; otherwise returns false.
sourcepub unsafe fn new() -> CppBox<QTextInlineObject>
pub unsafe fn new() -> CppBox<QTextInlineObject>
Calls C++ function: [constructor] void QTextInlineObject::QTextInlineObject()
.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QTextInlineObject>>
) -> CppBox<QTextInlineObject>
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)
.
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().
sourcepub unsafe fn rect(&self) -> CppBox<QRectF>
pub unsafe fn rect(&self) -> CppBox<QRectF>
Returns the inline object's rectangle.
Calls C++ function: QRectF QTextInlineObject::rect() const
.
sourcepub unsafe fn set_ascent(&self, a: c_double)
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)
.
Sets the inline object’s ascent to a.
See also ascent(), setDescent(), width(), and rect().
sourcepub unsafe fn set_descent(&self, d: c_double)
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)
.
sourcepub unsafe fn set_width(&self, w: c_double)
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)
.
sourcepub unsafe fn text_direction(&self) -> LayoutDirection
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
.
Returns if the object should be laid out right-to-left or left-to-right.
sourcepub unsafe fn text_position(&self) -> c_int
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
.
The position of the inline object within the text layout.
Trait Implementations§
source§impl CppDeletable for QTextInlineObject
impl CppDeletable for QTextInlineObject
source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations.
Calls C++ function: [destructor] void QTextInlineObject::~QTextInlineObject()
.
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().