[][src]Struct qt_widgets::QGraphicsTextItem

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

The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display formatted text.

C++ class: QGraphicsTextItem.

C++ documentation:

The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display formatted text.

If you only need to show plain text in an item, consider using QGraphicsSimpleTextItem instead.

To set the item's text, pass a QString to QGraphicsTextItem's constructor, or call setHtml()/setPlainText().

QGraphicsTextItem uses the text's formatted size and the associated font to provide a reasonable implementation of boundingRect(), shape(), and contains(). You can set the font by calling setFont().

It is possible to make the item editable by setting the Qt::TextEditorInteraction flag using setTextInteractionFlags().

The item's preferred text width can be set using setTextWidth() and obtained using textWidth().

Note: In order to align HTML text in the center, the item's text width must be set. Otherwise, you can call adjustSize() after setting the item's text.

Note: QGraphicsTextItem accepts hover events by default. You can change this with setAcceptHoverEvents().

Methods

impl QGraphicsTextItem[src]

This signal is emitted when the user clicks on a link on a text item that enables Qt::LinksAccessibleByMouse or Qt::LinksAccessibleByKeyboard. link is the link that was clicked.

Returns a built-in Qt signal QGraphicsTextItem::linkActivated that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user clicks on a link on a text item that enables Qt::LinksAccessibleByMouse or Qt::LinksAccessibleByKeyboard. link is the link that was clicked.

See also setTextInteractionFlags().

This signal is emitted when the user hovers over a link on a text item that enables Qt::LinksAccessibleByMouse. link is the link that was hovered over.

Returns a built-in Qt signal QGraphicsTextItem::linkHovered that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user hovers over a link on a text item that enables Qt::LinksAccessibleByMouse. link is the link that was hovered over.

See also setTextInteractionFlags().

pub unsafe fn adjust_size(&self)[src]

Adjusts the text item to a reasonable size.

Calls C++ function: void QGraphicsTextItem::adjustSize().

C++ documentation:

Adjusts the text item to a reasonable size.

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

Reimplemented from QGraphicsItem::boundingRect().

Calls C++ function: virtual QRectF QGraphicsTextItem::boundingRect() const.

C++ documentation:

Reimplemented from QGraphicsItem::boundingRect().

pub unsafe fn contains(&self, point: impl CastInto<Ref<QPointF>>) -> bool[src]

Reimplemented from QGraphicsItem::contains().

Calls C++ function: virtual bool QGraphicsTextItem::contains(const QPointF& point) const.

C++ documentation:

Reimplemented from QGraphicsItem::contains().

pub unsafe fn default_text_color(&self) -> CppBox<QColor>[src]

Returns the default text color that is used for unformatted text.

Calls C++ function: QColor QGraphicsTextItem::defaultTextColor() const.

C++ documentation:

Returns the default text color that is used for unformatted text.

See also setDefaultTextColor().

pub unsafe fn document(&self) -> QPtr<QTextDocument>[src]

Returns the item's text document.

Calls C++ function: QTextDocument* QGraphicsTextItem::document() const.

C++ documentation:

Returns the item's text document.

See also setDocument().

pub unsafe fn font(&self) -> CppBox<QFont>[src]

Returns the item's font, which is used to render the text.

Calls C++ function: QFont QGraphicsTextItem::font() const.

C++ documentation:

Returns the item's font, which is used to render the text.

See also setFont().

pub unsafe fn is_obscured_by(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>
) -> bool
[src]

Reimplemented from QGraphicsItem::isObscuredBy().

Calls C++ function: virtual bool QGraphicsTextItem::isObscuredBy(const QGraphicsItem* item) const.

C++ documentation:

Reimplemented from QGraphicsItem::isObscuredBy().

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QGraphicsTextItem::metaObject() const.

pub unsafe fn from_q_graphics_item(
    parent: impl CastInto<Ptr<QGraphicsItem>>
) -> QBox<QGraphicsTextItem>
[src]

Constructs a QGraphicsTextItem. parent is passed to QGraphicsItem's constructor.

Calls C++ function: [constructor] void QGraphicsTextItem::QGraphicsTextItem(QGraphicsItem* parent = …).

C++ documentation:

Constructs a QGraphicsTextItem. parent is passed to QGraphicsItem's constructor.

See also QGraphicsScene::addItem().

pub unsafe fn from_q_string_q_graphics_item(
    text: impl CastInto<Ref<QString>>,
    parent: impl CastInto<Ptr<QGraphicsItem>>
) -> QBox<QGraphicsTextItem>
[src]

Constructs a QGraphicsTextItem, using text as the default plain text. parent is passed to QGraphicsItem's constructor.

Calls C++ function: [constructor] void QGraphicsTextItem::QGraphicsTextItem(const QString& text, QGraphicsItem* parent = …).

C++ documentation:

Constructs a QGraphicsTextItem, using text as the default plain text. parent is passed to QGraphicsItem's constructor.

See also QGraphicsScene::addItem().

pub unsafe fn new() -> QBox<QGraphicsTextItem>[src]

The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display formatted text.

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

C++ documentation:

The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display formatted text.

If you only need to show plain text in an item, consider using QGraphicsSimpleTextItem instead.

To set the item's text, pass a QString to QGraphicsTextItem's constructor, or call setHtml()/setPlainText().

QGraphicsTextItem uses the text's formatted size and the associated font to provide a reasonable implementation of boundingRect(), shape(), and contains(). You can set the font by calling setFont().

It is possible to make the item editable by setting the Qt::TextEditorInteraction flag using setTextInteractionFlags().

The item's preferred text width can be set using setTextWidth() and obtained using textWidth().

Note: In order to align HTML text in the center, the item's text width must be set. Otherwise, you can call adjustSize() after setting the item's text.

Note: QGraphicsTextItem accepts hover events by default. You can change this with setAcceptHoverEvents().

pub unsafe fn from_q_string(
    text: impl CastInto<Ref<QString>>
) -> QBox<QGraphicsTextItem>
[src]

Constructs a QGraphicsTextItem, using text as the default plain text. parent is passed to QGraphicsItem's constructor.

Calls C++ function: [constructor] void QGraphicsTextItem::QGraphicsTextItem(const QString& text).

C++ documentation:

Constructs a QGraphicsTextItem, using text as the default plain text. parent is passed to QGraphicsItem's constructor.

See also QGraphicsScene::addItem().

pub unsafe fn opaque_area(&self) -> CppBox<QPainterPath>[src]

Reimplemented from QGraphicsItem::opaqueArea().

Calls C++ function: virtual QPainterPath QGraphicsTextItem::opaqueArea() const.

C++ documentation:

Reimplemented from QGraphicsItem::opaqueArea().

Specifies whether QGraphicsTextItem should automatically open links using QDesktopServices::openUrl() instead of emitting the linkActivated signal.

Calls C++ function: bool QGraphicsTextItem::openExternalLinks() const.

C++ documentation:

Specifies whether QGraphicsTextItem should automatically open links using QDesktopServices::openUrl() instead of emitting the linkActivated signal.

The default value is false.

Access functions:

bool openExternalLinks() const
void setOpenExternalLinks(bool open)

pub unsafe fn paint(
    &self,
    painter: impl CastInto<Ptr<QPainter>>,
    option: impl CastInto<Ptr<QStyleOptionGraphicsItem>>,
    widget: impl CastInto<Ptr<QWidget>>
)
[src]

Reimplemented from QGraphicsItem::paint().

Calls C++ function: virtual void QGraphicsTextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget).

C++ documentation:

Reimplemented from QGraphicsItem::paint().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QGraphicsTextItem::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* QGraphicsTextItem::qt_metacast(const char* arg1).

pub unsafe fn set_default_text_color(&self, c: impl CastInto<Ref<QColor>>)[src]

Sets the color for unformatted text to col.

Calls C++ function: void QGraphicsTextItem::setDefaultTextColor(const QColor& c).

C++ documentation:

Sets the color for unformatted text to col.

See also defaultTextColor().

pub unsafe fn set_document(&self, document: impl CastInto<Ptr<QTextDocument>>)[src]

Sets the text document document on the item.

Calls C++ function: void QGraphicsTextItem::setDocument(QTextDocument* document).

C++ documentation:

Sets the text document document on the item.

See also document().

pub unsafe fn set_font(&self, font: impl CastInto<Ref<QFont>>)[src]

Sets the font used to render the text item to font.

Calls C++ function: void QGraphicsTextItem::setFont(const QFont& font).

C++ documentation:

Sets the font used to render the text item to font.

See also font().

pub unsafe fn set_html(&self, html: impl CastInto<Ref<QString>>)[src]

Sets the item's text to text, assuming that text is HTML formatted. If the item has keyboard input focus, this function will also call ensureVisible() to ensure that the text is visible in all viewports.

Calls C++ function: void QGraphicsTextItem::setHtml(const QString& html).

C++ documentation:

Sets the item's text to text, assuming that text is HTML formatted. If the item has keyboard input focus, this function will also call ensureVisible() to ensure that the text is visible in all viewports.

See also toHtml(), hasFocus(), and QGraphicsSimpleTextItem.

Specifies whether QGraphicsTextItem should automatically open links using QDesktopServices::openUrl() instead of emitting the linkActivated signal.

Calls C++ function: void QGraphicsTextItem::setOpenExternalLinks(bool open).

C++ documentation:

Specifies whether QGraphicsTextItem should automatically open links using QDesktopServices::openUrl() instead of emitting the linkActivated signal.

The default value is false.

Access functions:

bool openExternalLinks() const
void setOpenExternalLinks(bool open)

pub unsafe fn set_plain_text(&self, text: impl CastInto<Ref<QString>>)[src]

Sets the item's text to text. If the item has keyboard input focus, this function will also call ensureVisible() to ensure that the text is visible in all viewports.

Calls C++ function: void QGraphicsTextItem::setPlainText(const QString& text).

C++ documentation:

Sets the item's text to text. If the item has keyboard input focus, this function will also call ensureVisible() to ensure that the text is visible in all viewports.

See also toHtml() and hasFocus().

pub unsafe fn set_tab_changes_focus(&self, b: bool)[src]

If b is true, the Tab key will cause the widget to change focus; otherwise, the tab key will insert a tab into the document.

Calls C++ function: void QGraphicsTextItem::setTabChangesFocus(bool b).

C++ documentation:

If b is true, the Tab key will cause the widget to change focus; otherwise, the tab key will insert a tab into the document.

In some occasions text edits should not allow the user to input tabulators or change indentation using the Tab key, as this breaks the focus chain. The default is false.

This function was introduced in Qt 4.5.

See also tabChangesFocus(), ItemIsFocusable, and textInteractionFlags().

pub unsafe fn set_text_cursor(&self, cursor: impl CastInto<Ref<QTextCursor>>)[src]

This property represents the visible text cursor in an editable text item.

Calls C++ function: void QGraphicsTextItem::setTextCursor(const QTextCursor& cursor).

C++ documentation:

This property represents the visible text cursor in an editable text item.

By default, if the item's text has not been set, this property contains a null text cursor; otherwise it contains a text cursor placed at the start of the item's document.

Access functions:

QTextCursor textCursor() const
void setTextCursor(const QTextCursor &cursor)

pub unsafe fn set_text_interaction_flags(
    &self,
    flags: QFlags<TextInteractionFlag>
)
[src]

Sets the flags flags to specify how the text item should react to user input.

Calls C++ function: void QGraphicsTextItem::setTextInteractionFlags(QFlags<Qt::TextInteractionFlag> flags).

C++ documentation:

Sets the flags flags to specify how the text item should react to user input.

The default for a QGraphicsTextItem is Qt::NoTextInteraction. This function also affects the ItemIsFocusable QGraphicsItem flag by setting it if flags is different from Qt::NoTextInteraction and clearing it otherwise.

By default, the text is read-only. To transform the item into an editor, set the Qt::TextEditable flag.

See also textInteractionFlags().

pub unsafe fn set_text_width(&self, width: c_double)[src]

Sets the preferred width for the item's text. If the actual text is wider than the specified width then it will be broken into multiple lines.

Calls C++ function: void QGraphicsTextItem::setTextWidth(double width).

C++ documentation:

Sets the preferred width for the item's text. If the actual text is wider than the specified width then it will be broken into multiple lines.

If width is set to -1 then the text will not be broken into multiple lines unless it is enforced through an explicit line break or a new paragraph.

The default value is -1.

Note that QGraphicsTextItem keeps a QTextDocument internally, which is used to calculate the text width.

See also textWidth() and QTextDocument::setTextWidth().

pub unsafe fn shape(&self) -> CppBox<QPainterPath>[src]

Reimplemented from QGraphicsItem::shape().

Calls C++ function: virtual QPainterPath QGraphicsTextItem::shape() const.

C++ documentation:

Reimplemented from QGraphicsItem::shape().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

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

Returns true if the Tab key will cause the widget to change focus; otherwise, false is returned.

Calls C++ function: bool QGraphicsTextItem::tabChangesFocus() const.

C++ documentation:

Returns true if the Tab key will cause the widget to change focus; otherwise, false is returned.

By default, this behavior is disabled, and this function will return false.

This function was introduced in Qt 4.5.

See also setTabChangesFocus().

pub unsafe fn text_cursor(&self) -> CppBox<QTextCursor>[src]

This property represents the visible text cursor in an editable text item.

Calls C++ function: QTextCursor QGraphicsTextItem::textCursor() const.

C++ documentation:

This property represents the visible text cursor in an editable text item.

By default, if the item's text has not been set, this property contains a null text cursor; otherwise it contains a text cursor placed at the start of the item's document.

Access functions:

QTextCursor textCursor() const
void setTextCursor(const QTextCursor &cursor)

pub unsafe fn text_interaction_flags(&self) -> QFlags<TextInteractionFlag>[src]

Returns the current text interaction flags.

Calls C++ function: QFlags<Qt::TextInteractionFlag> QGraphicsTextItem::textInteractionFlags() const.

C++ documentation:

Returns the current text interaction flags.

See also setTextInteractionFlags().

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

Returns the text width.

Calls C++ function: double QGraphicsTextItem::textWidth() const.

C++ documentation:

Returns the text width.

The width is calculated with the QTextDocument that QGraphicsTextItem keeps internally.

See also setTextWidth() and QTextDocument::textWidth().

pub unsafe fn to_html(&self) -> CppBox<QString>[src]

Returns the item's text converted to HTML, or an empty QString if no text has been set.

Calls C++ function: QString QGraphicsTextItem::toHtml() const.

C++ documentation:

Returns the item's text converted to HTML, or an empty QString if no text has been set.

See also setHtml().

pub unsafe fn to_plain_text(&self) -> CppBox<QString>[src]

Returns the item's text converted to plain text, or an empty QString if no text has been set.

Calls C++ function: QString QGraphicsTextItem::toPlainText() const.

C++ documentation:

Returns the item's text converted to plain text, or an empty QString if no text has been set.

See also setPlainText().

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QGraphicsTextItem::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]

Calls C++ function: static QString QGraphicsTextItem::trUtf8(const char* s, const char* c, int n).

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

Reimplemented from QGraphicsItem::type().

Calls C++ function: virtual int QGraphicsTextItem::type() const.

C++ documentation:

Reimplemented from QGraphicsItem::type().

Methods from Deref<Target = QGraphicsObject>

pub fn slot_update_micro_focus(&self) -> Receiver<()>[src]

Updates the item's micro focus. This is slot for convenience.

Returns a built-in Qt slot QGraphicsObject::updateMicroFocus that can be passed to qt_core::Signal::connect.

C++ documentation:

Updates the item's micro focus. This is slot for convenience.

This function was introduced in Qt 4.7.

See also QInputMethod.

pub fn parent_changed(&self) -> Signal<()>[src]

This signal gets emitted whenever the parent of the item changes

Returns a built-in Qt signal QGraphicsObject::parentChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal gets emitted whenever the parent of the item changes

Note: Notifier signal for property parent.

pub fn opacity_changed(&self) -> Signal<()>[src]

This signal gets emitted whenever the opacity of the item changes

Returns a built-in Qt signal QGraphicsObject::opacityChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal gets emitted whenever the opacity of the item changes

Note: Notifier signal for property opacity.

See also QGraphicsItem::opacity().

pub fn visible_changed(&self) -> Signal<()>[src]

This signal gets emitted whenever the visibility of the item changes

Returns a built-in Qt signal QGraphicsObject::visibleChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal gets emitted whenever the visibility of the item changes

Note: Notifier signal for property visible.

See also visible.

pub fn enabled_changed(&self) -> Signal<()>[src]

This signal gets emitted whenever the item get's enabled or disabled.

Returns a built-in Qt signal QGraphicsObject::enabledChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal gets emitted whenever the item get's enabled or disabled.

Note: Notifier signal for property enabled.

See also isEnabled().

pub fn x_changed(&self) -> Signal<()>[src]

This signal gets emitted whenever the x position of the item changes

Returns a built-in Qt signal QGraphicsObject::xChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal gets emitted whenever the x position of the item changes

Note: Notifier signal for property x.

See also pos().

pub fn y_changed(&self) -> Signal<()>[src]

This signal gets emitted whenever the y position of the item changes.

Returns a built-in Qt signal QGraphicsObject::yChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal gets emitted whenever the y position of the item changes.

Note: Notifier signal for property y.

See also pos().

pub fn z_changed(&self) -> Signal<()>[src]

This signal gets emitted whenever the z value of the item changes.

Returns a built-in Qt signal QGraphicsObject::zChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal gets emitted whenever the z value of the item changes.

Note: Notifier signal for property z.

See also pos().

pub fn rotation_changed(&self) -> Signal<()>[src]

This signal gets emitted whenever the roation of the item changes.

Returns a built-in Qt signal QGraphicsObject::rotationChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal gets emitted whenever the roation of the item changes.

Note: Notifier signal for property rotation.

pub fn scale_changed(&self) -> Signal<()>[src]

This signal is emitted when the scale of the item changes.

Returns a built-in Qt signal QGraphicsObject::scaleChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the scale of the item changes.

Note: Notifier signal for property scale.

pub fn children_changed(&self) -> Signal<()>[src]

Returns a built-in Qt signal QGraphicsObject::childrenChanged that can be passed to qt_core::Signal::connect.

pub fn width_changed(&self) -> Signal<()>[src]

Returns a built-in Qt signal QGraphicsObject::widthChanged that can be passed to qt_core::Signal::connect.

pub fn height_changed(&self) -> Signal<()>[src]

Returns a built-in Qt signal QGraphicsObject::heightChanged that can be passed to qt_core::Signal::connect.

pub unsafe fn grab_gesture_2a(
    &self,
    type_: GestureType,
    flags: QFlags<GestureFlag>
)
[src]

Subscribes the graphics object to the given gesture with specific flags.

Calls C++ function: void QGraphicsObject::grabGesture(Qt::GestureType type, QFlags<Qt::GestureFlag> flags = …).

C++ documentation:

Subscribes the graphics object to the given gesture with specific flags.

See also ungrabGesture() and QGestureEvent.

pub unsafe fn grab_gesture_1a(&self, type_: GestureType)[src]

Subscribes the graphics object to the given gesture with specific flags.

Calls C++ function: void QGraphicsObject::grabGesture(Qt::GestureType type).

C++ documentation:

Subscribes the graphics object to the given gesture with specific flags.

See also ungrabGesture() and QGestureEvent.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QGraphicsObject::metaObject() const.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QGraphicsObject::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* QGraphicsObject::qt_metacast(const char* arg1).

pub unsafe fn ungrab_gesture(&self, type_: GestureType)[src]

Unsubscribes the graphics object from the given gesture.

Calls C++ function: void QGraphicsObject::ungrabGesture(Qt::GestureType type).

C++ documentation:

Unsubscribes the graphics object from the given gesture.

See also grabGesture() and QGestureEvent.

Trait Implementations

impl CppDeletable for QGraphicsTextItem[src]

unsafe fn delete(&self)[src]

Destroys the QGraphicsTextItem.

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

C++ documentation:

Destroys the QGraphicsTextItem.

impl Deref for QGraphicsTextItem[src]

type Target = QGraphicsObject

The resulting type after dereferencing.

fn deref(&self) -> &QGraphicsObject[src]

Calls C++ function: QGraphicsObject* static_cast<QGraphicsObject*>(QGraphicsTextItem* ptr).

impl DynamicCast<QGraphicsTextItem> for QGraphicsObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QGraphicsObject>) -> Ptr<QGraphicsTextItem>[src]

Calls C++ function: QGraphicsTextItem* dynamic_cast<QGraphicsTextItem*>(QGraphicsObject* ptr).

impl DynamicCast<QGraphicsTextItem> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QGraphicsTextItem>[src]

Calls C++ function: QGraphicsTextItem* dynamic_cast<QGraphicsTextItem*>(QObject* ptr).

impl DynamicCast<QGraphicsTextItem> for QGraphicsItem[src]

unsafe fn dynamic_cast(ptr: Ptr<QGraphicsItem>) -> Ptr<QGraphicsTextItem>[src]

Calls C++ function: QGraphicsTextItem* dynamic_cast<QGraphicsTextItem*>(QGraphicsItem* ptr).

impl StaticDowncast<QGraphicsTextItem> for QGraphicsObject[src]

unsafe fn static_downcast(ptr: Ptr<QGraphicsObject>) -> Ptr<QGraphicsTextItem>[src]

Calls C++ function: QGraphicsTextItem* static_cast<QGraphicsTextItem*>(QGraphicsObject* ptr).

impl StaticDowncast<QGraphicsTextItem> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QGraphicsTextItem>[src]

Calls C++ function: QGraphicsTextItem* static_cast<QGraphicsTextItem*>(QObject* ptr).

impl StaticDowncast<QGraphicsTextItem> for QGraphicsItem[src]

unsafe fn static_downcast(ptr: Ptr<QGraphicsItem>) -> Ptr<QGraphicsTextItem>[src]

Calls C++ function: QGraphicsTextItem* static_cast<QGraphicsTextItem*>(QGraphicsItem* ptr).

impl StaticUpcast<QGraphicsItem> for QGraphicsTextItem[src]

unsafe fn static_upcast(ptr: Ptr<QGraphicsTextItem>) -> Ptr<QGraphicsItem>[src]

Calls C++ function: QGraphicsItem* static_cast<QGraphicsItem*>(QGraphicsTextItem* ptr).

impl StaticUpcast<QGraphicsObject> for QGraphicsTextItem[src]

unsafe fn static_upcast(ptr: Ptr<QGraphicsTextItem>) -> Ptr<QGraphicsObject>[src]

Calls C++ function: QGraphicsObject* static_cast<QGraphicsObject*>(QGraphicsTextItem* ptr).

impl StaticUpcast<QObject> for QGraphicsTextItem[src]

unsafe fn static_upcast(ptr: Ptr<QGraphicsTextItem>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QGraphicsTextItem* ptr).

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.