[−][src]Struct qt_gui::QTextObject
The QTextObject class is a base class for different kinds of objects that can group parts of a QTextDocument together.
C++ class: QTextObject
.
The QTextObject class is a base class for different kinds of objects that can group parts of a QTextDocument together.
The common grouping text objects are lists (QTextList), frames (QTextFrame), and tables (QTextTable). A text object has an associated format() and document().
There are essentially two kinds of text objects: those that are used with blocks (block formats), and those that are used with characters (character formats). The first kind are derived from QTextBlockGroup, and the second kind from QTextFrame.
You rarely need to use this class directly. When creating custom text objects, you will also need to reimplement QTextDocument::createObject() which acts as a factory method for creating text objects.
Methods
impl QTextObject
[src]
pub unsafe fn document(&self) -> QPtr<QTextDocument>
[src]
Returns the document this object belongs to.
Calls C++ function: QTextDocument* QTextObject::document() const
.
Returns the document this object belongs to.
See also format().
pub unsafe fn format(&self) -> CppBox<QTextFormat>
[src]
Returns the text object's format.
Calls C++ function: QTextFormat QTextObject::format() const
.
pub unsafe fn format_index(&self) -> c_int
[src]
Returns the index of the object's format in the document's internal list of formats.
Calls C++ function: int QTextObject::formatIndex() const
.
Returns the index of the object's format in the document's internal list of formats.
See also QTextDocument::allFormats().
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QTextObject::metaObject() const
.
pub unsafe fn object_index(&self) -> c_int
[src]
Returns the object index of this object. This can be used together with QTextFormat::setObjectIndex().
Calls C++ function: int QTextObject::objectIndex() const
.
Returns the object index of this object. This can be used together with QTextFormat::setObjectIndex().
pub unsafe fn qt_metacall(
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
[src]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
Calls C++ function: virtual int QTextObject::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void
[src]
Calls C++ function: virtual void* QTextObject::qt_metacast(const char* arg1)
.
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
pub unsafe fn tr(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QTextObject::tr(const char* s, const char* c, int n)
.
pub unsafe fn tr_utf8(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QTextObject::trUtf8(const char* s, const char* c, int n)
.
Trait Implementations
impl Deref for QTextObject
[src]
type Target = QObject
The resulting type after dereferencing.
fn deref(&self) -> &QObject
[src]
Calls C++ function: QObject* static_cast<QObject*>(QTextObject* ptr)
.
impl DynamicCast<QTextBlockGroup> for QTextObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QTextObject>) -> Ptr<QTextBlockGroup>
[src]
Calls C++ function: QTextBlockGroup* dynamic_cast<QTextBlockGroup*>(QTextObject* ptr)
.
impl DynamicCast<QTextFrame> for QTextObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QTextObject>) -> Ptr<QTextFrame>
[src]
Calls C++ function: QTextFrame* dynamic_cast<QTextFrame*>(QTextObject* ptr)
.
impl DynamicCast<QTextList> for QTextObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QTextObject>) -> Ptr<QTextList>
[src]
Calls C++ function: QTextList* dynamic_cast<QTextList*>(QTextObject* ptr)
.
impl DynamicCast<QTextObject> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QTextObject>
[src]
Calls C++ function: QTextObject* dynamic_cast<QTextObject*>(QObject* ptr)
.
impl DynamicCast<QTextTable> for QTextObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QTextObject>) -> Ptr<QTextTable>
[src]
Calls C++ function: QTextTable* dynamic_cast<QTextTable*>(QTextObject* ptr)
.
impl StaticDowncast<QTextBlockGroup> for QTextObject
[src]
unsafe fn static_downcast(ptr: Ptr<QTextObject>) -> Ptr<QTextBlockGroup>
[src]
Calls C++ function: QTextBlockGroup* static_cast<QTextBlockGroup*>(QTextObject* ptr)
.
impl StaticDowncast<QTextFrame> for QTextObject
[src]
unsafe fn static_downcast(ptr: Ptr<QTextObject>) -> Ptr<QTextFrame>
[src]
Calls C++ function: QTextFrame* static_cast<QTextFrame*>(QTextObject* ptr)
.
impl StaticDowncast<QTextList> for QTextObject
[src]
unsafe fn static_downcast(ptr: Ptr<QTextObject>) -> Ptr<QTextList>
[src]
Calls C++ function: QTextList* static_cast<QTextList*>(QTextObject* ptr)
.
impl StaticDowncast<QTextObject> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QTextObject>
[src]
Calls C++ function: QTextObject* static_cast<QTextObject*>(QObject* ptr)
.
impl StaticDowncast<QTextTable> for QTextObject
[src]
unsafe fn static_downcast(ptr: Ptr<QTextObject>) -> Ptr<QTextTable>
[src]
Calls C++ function: QTextTable* static_cast<QTextTable*>(QTextObject* ptr)
.
impl StaticUpcast<QObject> for QTextObject
[src]
unsafe fn static_upcast(ptr: Ptr<QTextObject>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QTextObject* ptr)
.
impl StaticUpcast<QTextObject> for QTextBlockGroup
[src]
unsafe fn static_upcast(ptr: Ptr<QTextBlockGroup>) -> Ptr<QTextObject>
[src]
Calls C++ function: QTextObject* static_cast<QTextObject*>(QTextBlockGroup* ptr)
.
impl StaticUpcast<QTextObject> for QTextFrame
[src]
unsafe fn static_upcast(ptr: Ptr<QTextFrame>) -> Ptr<QTextObject>
[src]
Calls C++ function: QTextObject* static_cast<QTextObject*>(QTextFrame* ptr)
.
impl StaticUpcast<QTextObject> for QTextList
[src]
unsafe fn static_upcast(ptr: Ptr<QTextList>) -> Ptr<QTextObject>
[src]
Calls C++ function: QTextObject* static_cast<QTextObject*>(QTextList* ptr)
.
impl StaticUpcast<QTextObject> for QTextTable
[src]
unsafe fn static_upcast(ptr: Ptr<QTextTable>) -> Ptr<QTextObject>
[src]
Calls C++ function: QTextObject* static_cast<QTextObject*>(QTextTable* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QTextObject
impl Send for QTextObject
impl Sync for QTextObject
impl Unpin for QTextObject
impl UnwindSafe for QTextObject
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]
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>,