[−][src]Struct qt_gui::QTextInlineObject
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().
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
.
pub unsafe fn copy_from(
&mut self,
other: impl CastInto<Ref<QTextInlineObject>>
) -> MutRef<QTextInlineObject>
[src]
&mut self,
other: impl CastInto<Ref<QTextInlineObject>>
) -> MutRef<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().
pub unsafe fn descent(&self) -> c_double
[src]
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().
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
.
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
.
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
.
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
.
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]
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().
pub unsafe fn rect(&self) -> CppBox<QRectF>
[src]
Returns the inline object's rectangle.
Calls C++ function: QRectF QTextInlineObject::rect() const
.
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)
.
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)
.
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)
.
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
.
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
.
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
.
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()
.
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
impl RefUnwindSafe for QTextInlineObject
impl Send for QTextInlineObject
impl Sync for QTextInlineObject
impl Unpin for QTextInlineObject
impl UnwindSafe for QTextInlineObject
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,