[][src]Struct qt_widgets::QGraphicsItem

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

The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.

C++ class: QGraphicsItem.

C++ documentation:

The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.

It provides a light-weight foundation for writing your own custom items. This includes defining the item's geometry, collision detection, its painting implementation and item interaction through its event handlers. QGraphicsItem is part of the Graphics View Framework

For convenience, Qt provides a set of standard graphics items for the most common shapes. These are:

All of an item's geometric information is based on its local coordinate system. The item's position, pos(), is the only function that does not operate in local coordinates, as it returns a position in parent coordinates. The Graphics View Coordinate System describes the coordinate system in detail.

You can set whether an item should be visible (i.e., drawn, and accepting events), by calling setVisible(). Hiding an item will also hide its children. Similarly, you can enable or disable an item by calling setEnabled(). If you disable an item, all its children will also be disabled. By default, items are both visible and enabled. To toggle whether an item is selected or not, first enable selection by setting the ItemIsSelectable flag, and then call setSelected(). Normally, selection is toggled by the scene, as a result of user interaction.

To write your own graphics item, you first create a subclass of QGraphicsItem, and then start by implementing its two pure virtual public functions: boundingRect(), which returns an estimate of the area painted by the item, and paint(), which implements the actual painting. For example:

class SimpleItem : public QGraphicsItem { public: QRectF boundingRect() const { qreal penWidth = 1; return QRectF(-10 - penWidth / 2, -10 - penWidth / 2, 20 + penWidth, 20 + penWidth); }

void paint(QPainter painter, const QStyleOptionGraphicsItem option, QWidget *widget) { painter->drawRoundedRect(-10, -10, 20, 20, 5, 5); } };

The boundingRect() function has many different purposes. QGraphicsScene bases its item index on boundingRect(), and QGraphicsView uses it both for culling invisible items, and for determining the area that needs to be recomposed when drawing overlapping items. In addition, QGraphicsItem's collision detection mechanisms use boundingRect() to provide an efficient cut-off. The fine grained collision algorithm in collidesWithItem() is based on calling shape(), which returns an accurate outline of the item's shape as a QPainterPath.

QGraphicsScene expects all items boundingRect() and shape() to remain unchanged unless it is notified. If you want to change an item's geometry in any way, you must first call prepareGeometryChange() to allow QGraphicsScene to update its bookkeeping.

Collision detection can be done in two ways:

  1. Reimplement shape() to return an accurate shape for your item, and rely on the default implementation of collidesWithItem() to do shape-shape intersection. This can be rather expensive if the shapes are complex.
  2. Reimplement collidesWithItem() to provide your own custom item and shape collision algorithm.

The contains() function can be called to determine whether the item contains a point or not. This function can also be reimplemented by the item. The default behavior of contains() is based on calling shape().

Items can contain other items, and also be contained by other items. All items can have a parent item and a list of children. Unless the item has no parent, its position is in parent coordinates (i.e., the parent's local coordinates). Parent items propagate both their position and their transformation to all children.

Methods

impl QGraphicsItem[src]

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

Returns true if this item can accept drag and drop events; otherwise, returns false. By default, items do not accept drag and drop events; items are transparent to drag and drop.

Calls C++ function: bool QGraphicsItem::acceptDrops() const.

C++ documentation:

Returns true if this item can accept drag and drop events; otherwise, returns false. By default, items do not accept drag and drop events; items are transparent to drag and drop.

See also setAcceptDrops().

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

Returns true if an item accepts hover events (QGraphicsSceneHoverEvent); otherwise, returns false. By default, items do not accept hover events.

Calls C++ function: bool QGraphicsItem::acceptHoverEvents() const.

C++ documentation:

Returns true if an item accepts hover events (QGraphicsSceneHoverEvent); otherwise, returns false. By default, items do not accept hover events.

This function was introduced in Qt 4.4.

See also setAcceptHoverEvents() and setAcceptedMouseButtons().

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

Returns true if an item accepts touch events; otherwise, returns false. By default, items do not accept touch events.

Calls C++ function: bool QGraphicsItem::acceptTouchEvents() const.

C++ documentation:

Returns true if an item accepts touch events; otherwise, returns false. By default, items do not accept touch events.

This function was introduced in Qt 4.6.

See also setAcceptTouchEvents().

pub unsafe fn accepted_mouse_buttons(&self) -> QFlags<MouseButton>[src]

Returns the mouse buttons that this item accepts mouse events for. By default, all mouse buttons are accepted.

Calls C++ function: QFlags<Qt::MouseButton> QGraphicsItem::acceptedMouseButtons() const.

C++ documentation:

Returns the mouse buttons that this item accepts mouse events for. By default, all mouse buttons are accepted.

If an item accepts a mouse button, it will become the mouse grabber item when a mouse press event is delivered for that mouse button. However, if the item does not accept the button, QGraphicsScene will forward the mouse events to the first item beneath it that does.

See also setAcceptedMouseButtons() and mousePressEvent().

pub unsafe fn advance(&self, phase: c_int)[src]

This virtual function is called twice for all items by the QGraphicsScene::advance() slot. In the first phase, all items are called with phase == 0, indicating that items on the scene are about to advance, and then all items are called with phase == 1. Reimplement this function to update your item if you need simple scene-controlled animation.

Calls C++ function: virtual void QGraphicsItem::advance(int phase).

C++ documentation:

This virtual function is called twice for all items by the QGraphicsScene::advance() slot. In the first phase, all items are called with phase == 0, indicating that items on the scene are about to advance, and then all items are called with phase == 1. Reimplement this function to update your item if you need simple scene-controlled animation.

The default implementation does nothing.

This function is intended for animations. An alternative is to multiple-inherit from QObject and QGraphicsItem and use the Animation Framework.

See also QGraphicsScene::advance() and QTimeLine.

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

This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be restricted to inside an item's bounding rect. QGraphicsView uses this to determine whether the item requires redrawing.

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

C++ documentation:

This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be restricted to inside an item's bounding rect. QGraphicsView uses this to determine whether the item requires redrawing.

Although the item's shape can be arbitrary, the bounding rect is always rectangular, and it is unaffected by the items' transformation.

If you want to change the item's bounding rectangle, you must first call prepareGeometryChange(). This notifies the scene of the imminent change, so that it can update its item geometry index; otherwise, the scene will be unaware of the item's new geometry, and the results are undefined (typically, rendering artifacts are left within the view).

Reimplement this function to let QGraphicsView determine what parts of the widget, if any, need to be redrawn.

Note: For shapes that paint an outline / stroke, it is important to include half the pen width in the bounding rect. It is not necessary to compensate for antialiasing, though.

Example:

QRectF CircleItem::boundingRect() const { qreal penWidth = 1; return QRectF(-radius - penWidth / 2, -radius - penWidth / 2, diameter + penWidth, diameter + penWidth); }

See also boundingRegion(), shape(), contains(), The Graphics View Coordinate System, and prepareGeometryChange().

pub unsafe fn bounding_region(
    &self,
    item_to_device_transform: impl CastInto<Ref<QTransform>>
) -> CppBox<QRegion>
[src]

Returns the bounding region for this item. The coordinate space of the returned region depends on itemToDeviceTransform. If you pass an identity QTransform as a parameter, this function will return a local coordinate region.

Calls C++ function: QRegion QGraphicsItem::boundingRegion(const QTransform& itemToDeviceTransform) const.

C++ documentation:

Returns the bounding region for this item. The coordinate space of the returned region depends on itemToDeviceTransform. If you pass an identity QTransform as a parameter, this function will return a local coordinate region.

The bounding region describes a coarse outline of the item's visual contents. Although it's expensive to calculate, it's also more precise than boundingRect(), and it can help to avoid unnecessary repainting when an item is updated. This is particularly efficient for thin items (e.g., lines or simple polygons). You can tune the granularity for the bounding region by calling setBoundingRegionGranularity(). The default granularity is 0; in which the item's bounding region is the same as its bounding rect.

itemToDeviceTransform is the transformation from item coordinates to device coordinates. If you want this function to return a QRegion in scene coordinates, you can pass sceneTransform() as an argument.

This function was introduced in Qt 4.4.

See also boundingRegionGranularity().

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

Returns the item's bounding region granularity; a value between and including 0 and 1. The default value is 0 (i.e., the lowest granularity, where the bounding region corresponds to the item's bounding rectangle).

Calls C++ function: double QGraphicsItem::boundingRegionGranularity() const.

C++ documentation:

Returns the item's bounding region granularity; a value between and including 0 and 1. The default value is 0 (i.e., the lowest granularity, where the bounding region corresponds to the item's bounding rectangle).

This function was introduced in Qt 4.4.

See also setBoundingRegionGranularity().

pub unsafe fn cache_mode(&self) -> CacheMode[src]

Returns the cache mode for this item. The default mode is NoCache (i.e., cache is disabled and all painting is immediate).

Calls C++ function: QGraphicsItem::CacheMode QGraphicsItem::cacheMode() const.

C++ documentation:

Returns the cache mode for this item. The default mode is NoCache (i.e., cache is disabled and all painting is immediate).

This function was introduced in Qt 4.4.

See also setCacheMode().

pub unsafe fn child_items(&self) -> CppBox<QListOfQGraphicsItem>[src]

Returns a list of this item's children.

Calls C++ function: QList<QGraphicsItem*> QGraphicsItem::childItems() const.

C++ documentation:

Returns a list of this item's children.

The items are sorted by stacking order. This takes into account both the items' insertion order and their Z-values.

This function was introduced in Qt 4.4.

See also setParentItem(), zValue(), and Sorting.

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

Returns the bounding rect of this item's descendants (i.e., its children, their children, etc.) in local coordinates. The rectangle will contain all descendants after they have been mapped to local coordinates. If the item has no children, this function returns an empty QRectF.

Calls C++ function: QRectF QGraphicsItem::childrenBoundingRect() const.

C++ documentation:

Returns the bounding rect of this item's descendants (i.e., its children, their children, etc.) in local coordinates. The rectangle will contain all descendants after they have been mapped to local coordinates. If the item has no children, this function returns an empty QRectF.

This does not include this item's own bounding rect; it only returns its descendants' accumulated bounding rect. If you need to include this item's bounding rect, you can add boundingRect() to childrenBoundingRect() using QRectF::operator|().

This function is linear in complexity; it determines the size of the returned bounding rect by iterating through all descendants.

See also boundingRect() and sceneBoundingRect().

pub unsafe fn clear_focus(&self)[src]

Takes keyboard input focus from the item.

Calls C++ function: void QGraphicsItem::clearFocus().

C++ documentation:

Takes keyboard input focus from the item.

If it has focus, a focus out event is sent to this item to tell it that it is about to lose the focus.

Only items that set the ItemIsFocusable flag, or widgets that set an appropriate focus policy, can accept keyboard focus.

See also setFocus(), hasFocus(), and QGraphicsWidget::focusPolicy.

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

Returns this item's clip path, or an empty QPainterPath if this item is not clipped. The clip path constrains the item's appearance and interaction (i.e., restricts the area the item can draw within and receive events for).

Calls C++ function: QPainterPath QGraphicsItem::clipPath() const.

C++ documentation:

Returns this item's clip path, or an empty QPainterPath if this item is not clipped. The clip path constrains the item's appearance and interaction (i.e., restricts the area the item can draw within and receive events for).

You can enable clipping by setting the ItemClipsToShape or ItemClipsChildrenToShape flags. The item's clip path is calculated by intersecting all clipping ancestors' shapes. If the item sets ItemClipsToShape, the final clip is intersected with the item's own shape.

Note: Clipping introduces a performance penalty for all items involved; you should generally avoid using clipping if you can (e.g., if your items always draw inside boundingRect() or shape() boundaries, clipping is not necessary).

This function was introduced in Qt 4.5.

See also isClipped(), shape(), and setFlags().

pub unsafe fn collides_with_item_2a(
    &self,
    other: impl CastInto<Ptr<QGraphicsItem>>,
    mode: ItemSelectionMode
) -> bool
[src]

Returns true if this item collides with other; otherwise returns false.

Calls C++ function: virtual bool QGraphicsItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode = …) const.

C++ documentation:

Returns true if this item collides with other; otherwise returns false.

The mode is applied to other, and the resulting shape or bounding rectangle is then compared to this item's shape. The default value for mode is Qt::IntersectsItemShape; other collides with this item if it either intersects, contains, or is contained by this item's shape (see Qt::ItemSelectionMode for details).

The default implementation is based on shape intersection, and it calls shape() on both items. Because the complexity of arbitrary shape-shape intersection grows with an order of magnitude when the shapes are complex, this operation can be noticably time consuming. You have the option of reimplementing this function in a subclass of QGraphicsItem to provide a custom algorithm. This allows you to make use of natural constraints in the shapes of your own items, in order to improve the performance of the collision detection. For instance, two untransformed perfectly circular items' collision can be determined very efficiently by comparing their positions and radii.

Keep in mind that when reimplementing this function and calling shape() or boundingRect() on other, the returned coordinates must be mapped to this item's coordinate system before any intersection can take place.

See also contains() and shape().

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

Returns true if this item collides with other; otherwise returns false.

Calls C++ function: virtual bool QGraphicsItem::collidesWithItem(const QGraphicsItem* other) const.

C++ documentation:

Returns true if this item collides with other; otherwise returns false.

The mode is applied to other, and the resulting shape or bounding rectangle is then compared to this item's shape. The default value for mode is Qt::IntersectsItemShape; other collides with this item if it either intersects, contains, or is contained by this item's shape (see Qt::ItemSelectionMode for details).

The default implementation is based on shape intersection, and it calls shape() on both items. Because the complexity of arbitrary shape-shape intersection grows with an order of magnitude when the shapes are complex, this operation can be noticably time consuming. You have the option of reimplementing this function in a subclass of QGraphicsItem to provide a custom algorithm. This allows you to make use of natural constraints in the shapes of your own items, in order to improve the performance of the collision detection. For instance, two untransformed perfectly circular items' collision can be determined very efficiently by comparing their positions and radii.

Keep in mind that when reimplementing this function and calling shape() or boundingRect() on other, the returned coordinates must be mapped to this item's coordinate system before any intersection can take place.

See also contains() and shape().

pub unsafe fn collides_with_path_2a(
    &self,
    path: impl CastInto<Ref<QPainterPath>>,
    mode: ItemSelectionMode
) -> bool
[src]

Returns true if this item collides with path.

Calls C++ function: virtual bool QGraphicsItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode = …) const.

C++ documentation:

Returns true if this item collides with path.

The collision is determined by mode. The default value for mode is Qt::IntersectsItemShape; path collides with this item if it either intersects, contains, or is contained by this item's shape.

Note that this function checks whether the item's shape or bounding rectangle (depending on mode) is contained within path, and not whether path is contained within the items shape or bounding rectangle.

See also collidesWithItem(), contains(), and shape().

pub unsafe fn collides_with_path_1a(
    &self,
    path: impl CastInto<Ref<QPainterPath>>
) -> bool
[src]

Returns true if this item collides with path.

Calls C++ function: virtual bool QGraphicsItem::collidesWithPath(const QPainterPath& path) const.

C++ documentation:

Returns true if this item collides with path.

The collision is determined by mode. The default value for mode is Qt::IntersectsItemShape; path collides with this item if it either intersects, contains, or is contained by this item's shape.

Note that this function checks whether the item's shape or bounding rectangle (depending on mode) is contained within path, and not whether path is contained within the items shape or bounding rectangle.

See also collidesWithItem(), contains(), and shape().

pub unsafe fn colliding_items_1a(
    &self,
    mode: ItemSelectionMode
) -> CppBox<QListOfQGraphicsItem>
[src]

Returns a list of all items that collide with this item.

Calls C++ function: QList<QGraphicsItem*> QGraphicsItem::collidingItems(Qt::ItemSelectionMode mode = …) const.

C++ documentation:

Returns a list of all items that collide with this item.

The way collisions are detected is determined by applying mode to items that are compared to this item, i.e., each item's shape or bounding rectangle is checked against this item's shape. The default value for mode is Qt::IntersectsItemShape.

See also collidesWithItem().

pub unsafe fn colliding_items_0a(&self) -> CppBox<QListOfQGraphicsItem>[src]

Returns a list of all items that collide with this item.

Calls C++ function: QList<QGraphicsItem*> QGraphicsItem::collidingItems() const.

C++ documentation:

Returns a list of all items that collide with this item.

The way collisions are detected is determined by applying mode to items that are compared to this item, i.e., each item's shape or bounding rectangle is checked against this item's shape. The default value for mode is Qt::IntersectsItemShape.

See also collidesWithItem().

pub unsafe fn common_ancestor_item(
    &self,
    other: impl CastInto<Ptr<QGraphicsItem>>
) -> Ptr<QGraphicsItem>
[src]

Returns the closest common ancestor item of this item and other, or 0 if either other is 0, or there is no common ancestor.

Calls C++ function: QGraphicsItem* QGraphicsItem::commonAncestorItem(const QGraphicsItem* other) const.

C++ documentation:

Returns the closest common ancestor item of this item and other, or 0 if either other is 0, or there is no common ancestor.

This function was introduced in Qt 4.4.

See also isAncestorOf().

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

Returns true if this item contains point, which is in local coordinates; otherwise, false is returned. It is most often called from QGraphicsView to determine what item is under the cursor, and for that reason, the implementation of this function should be as light-weight as possible.

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

C++ documentation:

Returns true if this item contains point, which is in local coordinates; otherwise, false is returned. It is most often called from QGraphicsView to determine what item is under the cursor, and for that reason, the implementation of this function should be as light-weight as possible.

By default, this function calls shape(), but you can reimplement it in a subclass to provide a (perhaps more efficient) implementation.

See also shape(), boundingRect(), and collidesWithPath().

pub unsafe fn cursor(&self) -> CppBox<QCursor>[src]

Returns the current cursor shape for the item. The mouse cursor will assume this shape when it's over this item. See the list of predefined cursor objects for a range of useful shapes.

Calls C++ function: QCursor QGraphicsItem::cursor() const.

C++ documentation:

Returns the current cursor shape for the item. The mouse cursor will assume this shape when it's over this item. See the list of predefined cursor objects for a range of useful shapes.

An editor item might want to use an I-beam cursor:

item->setCursor(Qt::IBeamCursor);

If no cursor has been set, the cursor of the item beneath is used.

See also setCursor(), hasCursor(), unsetCursor(), QWidget::cursor, and QApplication::overrideCursor().

pub unsafe fn data(&self, key: c_int) -> CppBox<QVariant>[src]

Returns this item's custom data for the key key as a QVariant.

Calls C++ function: QVariant QGraphicsItem::data(int key) const.

C++ documentation:

Returns this item's custom data for the key key as a QVariant.

Custom item data is useful for storing arbitrary properties in any item. Example:

static const int ObjectName = 0;

QGraphicsItem item = scene.itemAt(100, 50); if (item->data(ObjectName).toString().isEmpty()) { if (qgraphicsitem_cast<ButtonItem >(item)) item->setData(ObjectName, "Button"); }

Qt does not use this feature for storing data; it is provided solely for the convenience of the user.

See also setData().

pub unsafe fn device_transform(
    &self,
    viewport_transform: impl CastInto<Ref<QTransform>>
) -> CppBox<QTransform>
[src]

Returns this item's device transformation matrix, using viewportTransform to map from scene to device coordinates. This matrix can be used to map coordinates and geometrical shapes from this item's local coordinate system to the viewport's (or any device's) coordinate system. To map coordinates from the viewport, you must first invert the returned matrix.

Calls C++ function: QTransform QGraphicsItem::deviceTransform(const QTransform& viewportTransform) const.

C++ documentation:

Returns this item's device transformation matrix, using viewportTransform to map from scene to device coordinates. This matrix can be used to map coordinates and geometrical shapes from this item's local coordinate system to the viewport's (or any device's) coordinate system. To map coordinates from the viewport, you must first invert the returned matrix.

Example:

QGraphicsRectItem rect; rect.setPos(100, 100);

rect.deviceTransform(view->viewportTransform()).map(QPointF(0, 0)); // returns the item's (0, 0) point in view's viewport coordinates

rect.deviceTransform(view->viewportTransform()).inverted().map(QPointF(100, 100)); // returns view's viewport's (100, 100) coordinate in item coordinates

This function is the same as combining this item's scene transform with the view's viewport transform, but it also understands the ItemIgnoresTransformations flag. The device transform can be used to do accurate coordinate mapping (and collision detection) for untransformable items.

This function was introduced in Qt 4.3.

See also transform(), setTransform(), scenePos(), The Graphics View Coordinate System, and itemTransform().

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

Returns this item's effective opacity, which is between 0.0 (transparent) and 1.0 (opaque). This value is a combination of this item's local opacity, and its parent and ancestors' opacities. The effective opacity decides how the item is rendered.

Calls C++ function: double QGraphicsItem::effectiveOpacity() const.

C++ documentation:

Returns this item's effective opacity, which is between 0.0 (transparent) and 1.0 (opaque). This value is a combination of this item's local opacity, and its parent and ancestors' opacities. The effective opacity decides how the item is rendered.

This function was introduced in Qt 4.5.

See also opacity(), setOpacity(), paint(), ItemIgnoresParentOpacity, and ItemDoesntPropagateOpacityToChildren.

pub unsafe fn ensure_visible_3a(
    &self,
    rect: impl CastInto<Ref<QRectF>>,
    xmargin: c_int,
    ymargin: c_int
)
[src]

If this item is part of a scene that is viewed by a QGraphicsView, this convenience function will attempt to scroll the view to ensure that rect is visible inside the view's viewport. If rect is a null rect (the default), QGraphicsItem will default to the item's bounding rect. xmargin and ymargin are the number of pixels the view should use for margins.

Calls C++ function: void QGraphicsItem::ensureVisible(const QRectF& rect = …, int xmargin = …, int ymargin = …).

C++ documentation:

If this item is part of a scene that is viewed by a QGraphicsView, this convenience function will attempt to scroll the view to ensure that rect is visible inside the view's viewport. If rect is a null rect (the default), QGraphicsItem will default to the item's bounding rect. xmargin and ymargin are the number of pixels the view should use for margins.

If the specified rect cannot be reached, the contents are scrolled to the nearest valid position.

If this item is not viewed by a QGraphicsView, this function does nothing.

See also QGraphicsView::ensureVisible().

pub unsafe fn ensure_visible_6a(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double,
    xmargin: c_int,
    ymargin: c_int
)
[src]

This convenience function is equivalent to calling ensureVisible(QRectF(x, y, w, h), xmargin, ymargin).

Calls C++ function: void QGraphicsItem::ensureVisible(double x, double y, double w, double h, int xmargin = …, int ymargin = …).

C++ documentation:

This convenience function is equivalent to calling ensureVisible(QRectF(x, y, w, h), xmargin, ymargin).

pub unsafe fn ensure_visible_2a(
    &self,
    rect: impl CastInto<Ref<QRectF>>,
    xmargin: c_int
)
[src]

If this item is part of a scene that is viewed by a QGraphicsView, this convenience function will attempt to scroll the view to ensure that rect is visible inside the view's viewport. If rect is a null rect (the default), QGraphicsItem will default to the item's bounding rect. xmargin and ymargin are the number of pixels the view should use for margins.

Calls C++ function: void QGraphicsItem::ensureVisible(const QRectF& rect = …, int xmargin = …).

C++ documentation:

If this item is part of a scene that is viewed by a QGraphicsView, this convenience function will attempt to scroll the view to ensure that rect is visible inside the view's viewport. If rect is a null rect (the default), QGraphicsItem will default to the item's bounding rect. xmargin and ymargin are the number of pixels the view should use for margins.

If the specified rect cannot be reached, the contents are scrolled to the nearest valid position.

If this item is not viewed by a QGraphicsView, this function does nothing.

See also QGraphicsView::ensureVisible().

pub unsafe fn ensure_visible_1a(&self, rect: impl CastInto<Ref<QRectF>>)[src]

If this item is part of a scene that is viewed by a QGraphicsView, this convenience function will attempt to scroll the view to ensure that rect is visible inside the view's viewport. If rect is a null rect (the default), QGraphicsItem will default to the item's bounding rect. xmargin and ymargin are the number of pixels the view should use for margins.

Calls C++ function: void QGraphicsItem::ensureVisible(const QRectF& rect = …).

C++ documentation:

If this item is part of a scene that is viewed by a QGraphicsView, this convenience function will attempt to scroll the view to ensure that rect is visible inside the view's viewport. If rect is a null rect (the default), QGraphicsItem will default to the item's bounding rect. xmargin and ymargin are the number of pixels the view should use for margins.

If the specified rect cannot be reached, the contents are scrolled to the nearest valid position.

If this item is not viewed by a QGraphicsView, this function does nothing.

See also QGraphicsView::ensureVisible().

pub unsafe fn ensure_visible_0a(&self)[src]

If this item is part of a scene that is viewed by a QGraphicsView, this convenience function will attempt to scroll the view to ensure that rect is visible inside the view's viewport. If rect is a null rect (the default), QGraphicsItem will default to the item's bounding rect. xmargin and ymargin are the number of pixels the view should use for margins.

Calls C++ function: void QGraphicsItem::ensureVisible().

C++ documentation:

If this item is part of a scene that is viewed by a QGraphicsView, this convenience function will attempt to scroll the view to ensure that rect is visible inside the view's viewport. If rect is a null rect (the default), QGraphicsItem will default to the item's bounding rect. xmargin and ymargin are the number of pixels the view should use for margins.

If the specified rect cannot be reached, the contents are scrolled to the nearest valid position.

If this item is not viewed by a QGraphicsView, this function does nothing.

See also QGraphicsView::ensureVisible().

pub unsafe fn ensure_visible_5a(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double,
    xmargin: c_int
)
[src]

This convenience function is equivalent to calling ensureVisible(QRectF(x, y, w, h), xmargin, ymargin).

Calls C++ function: void QGraphicsItem::ensureVisible(double x, double y, double w, double h, int xmargin = …).

C++ documentation:

This convenience function is equivalent to calling ensureVisible(QRectF(x, y, w, h), xmargin, ymargin).

pub unsafe fn ensure_visible_4a(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
)
[src]

This convenience function is equivalent to calling ensureVisible(QRectF(x, y, w, h), xmargin, ymargin).

Calls C++ function: void QGraphicsItem::ensureVisible(double x, double y, double w, double h).

C++ documentation:

This convenience function is equivalent to calling ensureVisible(QRectF(x, y, w, h), xmargin, ymargin).

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

Returns true if this item filters child events (i.e., all events intended for any of its children are instead sent to this item); otherwise, false is returned.

Calls C++ function: bool QGraphicsItem::filtersChildEvents() const.

C++ documentation:

Returns true if this item filters child events (i.e., all events intended for any of its children are instead sent to this item); otherwise, false is returned.

The default value is false; child events are not filtered.

This function was introduced in Qt 4.6.

See also setFiltersChildEvents().

pub unsafe fn flags(&self) -> QFlags<GraphicsItemFlag>[src]

Returns this item's flags. The flags describe what configurable features of the item are enabled and not. For example, if the flags include ItemIsFocusable, the item can accept input focus.

Calls C++ function: QFlags<QGraphicsItem::GraphicsItemFlag> QGraphicsItem::flags() const.

C++ documentation:

Returns this item's flags. The flags describe what configurable features of the item are enabled and not. For example, if the flags include ItemIsFocusable, the item can accept input focus.

By default, no flags are enabled.

See also setFlags() and setFlag().

pub unsafe fn focus_item(&self) -> Ptr<QGraphicsItem>[src]

If this item, a child or descendant of this item currently has input focus, this function will return a pointer to that item. If no descendant has input focus, 0 is returned.

Calls C++ function: QGraphicsItem* QGraphicsItem::focusItem() const.

C++ documentation:

If this item, a child or descendant of this item currently has input focus, this function will return a pointer to that item. If no descendant has input focus, 0 is returned.

This function was introduced in Qt 4.6.

See also hasFocus(), setFocus(), and QWidget::focusWidget().

pub unsafe fn focus_proxy(&self) -> Ptr<QGraphicsItem>[src]

Returns this item's focus proxy, or 0 if this item has no focus proxy.

Calls C++ function: QGraphicsItem* QGraphicsItem::focusProxy() const.

C++ documentation:

Returns this item's focus proxy, or 0 if this item has no focus proxy.

This function was introduced in Qt 4.6.

See also setFocusProxy(), setFocus(), and hasFocus().

pub unsafe fn focus_scope_item(&self) -> Ptr<QGraphicsItem>[src]

Calls C++ function: QGraphicsItem* QGraphicsItem::focusScopeItem() const.

pub unsafe fn grab_keyboard(&self)[src]

Grabs the keyboard input.

Calls C++ function: void QGraphicsItem::grabKeyboard().

C++ documentation:

Grabs the keyboard input.

The item will receive all keyboard input to the scene until one of the following events occur:

  • The item becomes invisible
  • The item is removed from the scene
  • The item is deleted
  • The item calls ungrabKeyboard()
  • Another item calls grabKeyboard(); the item will regain the keyboard grab when the other item calls ungrabKeyboard().

When an item gains the keyboard grab, it receives a QEvent::GrabKeyboard event. When it loses the keyboard grab, it receives a QEvent::UngrabKeyboard event. These events can be used to detect when your item gains or loses the keyboard grab through other means than gaining input focus.

It is almost never necessary to explicitly grab the keyboard in Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the keyboard when your item gains input focus, and releases it when your item loses input focus, or when the item is hidden.

Note that only visible items can grab keyboard input. Calling grabKeyboard() on an invisible item has no effect.

Keyboard events are not affected.

This function was introduced in Qt 4.4.

See also ungrabKeyboard(), grabMouse(), and setFocus().

pub unsafe fn grab_mouse(&self)[src]

Grabs the mouse input.

Calls C++ function: void QGraphicsItem::grabMouse().

C++ documentation:

Grabs the mouse input.

This item will receive all mouse events for the scene until any of the following events occurs:

  • The item becomes invisible
  • The item is removed from the scene
  • The item is deleted
  • The item call ungrabMouse()
  • Another item calls grabMouse(); the item will regain the mouse grab when the other item calls ungrabMouse().

When an item gains the mouse grab, it receives a QEvent::GrabMouse event. When it loses the mouse grab, it receives a QEvent::UngrabMouse event. These events can be used to detect when your item gains or loses the mouse grab through other means than receiving mouse button events.

It is almost never necessary to explicitly grab the mouse in Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when you press a mouse button, and keeps the mouse grabbed until you release the last mouse button. Also, Qt::Popup widgets implicitly call grabMouse() when shown, and ungrabMouse() when hidden.

Note that only visible items can grab mouse input. Calling grabMouse() on an invisible item has no effect.

Keyboard events are not affected.

This function was introduced in Qt 4.4.

See also QGraphicsScene::mouseGrabberItem(), ungrabMouse(), and grabKeyboard().

pub unsafe fn graphics_effect(&self) -> QPtr<QGraphicsEffect>[src]

Returns a pointer to this item's effect if it has one; otherwise 0.

Calls C++ function: QGraphicsEffect* QGraphicsItem::graphicsEffect() const.

C++ documentation:

Returns a pointer to this item's effect if it has one; otherwise 0.

This function was introduced in Qt 4.6.

See also setGraphicsEffect().

pub unsafe fn group(&self) -> Ptr<QGraphicsItemGroup>[src]

Returns a pointer to this item's item group, or 0 if this item is not member of a group.

Calls C++ function: QGraphicsItemGroup* QGraphicsItem::group() const.

C++ documentation:

Returns a pointer to this item's item group, or 0 if this item is not member of a group.

See also setGroup(), QGraphicsItemGroup, and QGraphicsScene::createItemGroup().

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

Returns true if this item handles child events (i.e., all events intended for any of its children are instead sent to this item); otherwise, false is returned.

Calls C++ function: bool QGraphicsItem::handlesChildEvents() const.

C++ documentation:

Returns true if this item handles child events (i.e., all events intended for any of its children are instead sent to this item); otherwise, false is returned.

This property is useful for item groups; it allows one item to handle events on behalf of its children, as opposed to its children handling their events individually.

The default is to return false; children handle their own events. The exception for this is if the item is a QGraphicsItemGroup, then it defaults to return true.

See also setHandlesChildEvents().

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

Returns true if this item has a cursor set; otherwise, false is returned.

Calls C++ function: bool QGraphicsItem::hasCursor() const.

C++ documentation:

Returns true if this item has a cursor set; otherwise, false is returned.

By default, items don't have any cursor set. cursor() will return a standard pointing arrow cursor.

See also unsetCursor().

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

Returns true if this item is active, and it or its focus proxy has keyboard input focus; otherwise, returns false.

Calls C++ function: bool QGraphicsItem::hasFocus() const.

C++ documentation:

Returns true if this item is active, and it or its focus proxy has keyboard input focus; otherwise, returns false.

See also focusItem(), setFocus(), QGraphicsScene::setFocusItem(), and isActive().

pub unsafe fn hide(&self)[src]

Hides the item (items are visible by default).

Calls C++ function: void QGraphicsItem::hide().

C++ documentation:

Hides the item (items are visible by default).

This convenience function is equivalent to calling setVisible(false).

See also show() and setVisible().

pub unsafe fn input_method_hints(&self) -> QFlags<InputMethodHint>[src]

Returns the current input method hints of this item.

Calls C++ function: QFlags<Qt::InputMethodHint> QGraphicsItem::inputMethodHints() const.

C++ documentation:

Returns the current input method hints of this item.

Input method hints are only relevant for input items. The hints are used by the input method to indicate how it should operate. For example, if the Qt::ImhNumbersOnly flag is set, the input method may change its visual components to reflect that only numbers can be entered.

The effect may vary between input method implementations.

This function was introduced in Qt 4.6.

See also setInputMethodHints() and inputMethodQuery().

pub unsafe fn install_scene_event_filter(
    &self,
    filter_item: impl CastInto<Ptr<QGraphicsItem>>
)
[src]

Installs an event filter for this item on filterItem, causing all events for this item to first pass through filterItem's sceneEventFilter() function.

Calls C++ function: void QGraphicsItem::installSceneEventFilter(QGraphicsItem* filterItem).

C++ documentation:

Installs an event filter for this item on filterItem, causing all events for this item to first pass through filterItem's sceneEventFilter() function.

To filter another item's events, install this item as an event filter for the other item. Example:

QGraphicsScene scene; QGraphicsEllipseItem ellipse = scene.addEllipse(QRectF(-10, -10, 20, 20)); QGraphicsLineItem line = scene.addLine(QLineF(-10, -10, 20, 20));

line->installSceneEventFilter(ellipse); // line's events are filtered by ellipse's sceneEventFilter() function.

ellipse->installSceneEventFilter(line); // ellipse's events are filtered by line's sceneEventFilter() function.

An item can only filter events for other items in the same scene. Also, an item cannot filter its own events; instead, you can reimplement sceneEvent() directly.

Items must belong to a scene for scene event filters to be installed and used.

See also removeSceneEventFilter(), sceneEventFilter(), and sceneEvent().

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

Returns true if this item is active; otherwise returns false.

Calls C++ function: bool QGraphicsItem::isActive() const.

C++ documentation:

Returns true if this item is active; otherwise returns false.

An item can only be active if the scene is active. An item is active if it is, or is a descendent of, an active panel. Items in non-active panels are not active.

Items that are not part of a panel follow scene activation when the scene has no active panel.

Only active items can gain input focus.

This function was introduced in Qt 4.6.

See also QGraphicsScene::isActive(), QGraphicsScene::activePanel(), panel(), and isPanel().

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

Returns true if this item is an ancestor of child (i.e., if this item is child's parent, or one of child's parent's ancestors).

Calls C++ function: bool QGraphicsItem::isAncestorOf(const QGraphicsItem* child) const.

C++ documentation:

Returns true if this item is an ancestor of child (i.e., if this item is child's parent, or one of child's parent's ancestors).

See also parentItem().

pub unsafe fn is_blocked_by_modal_panel_1a(
    &self,
    blocking_panel: *mut *mut QGraphicsItem
) -> bool
[src]

Returns true if this item is blocked by a modal panel, false otherwise. If blockingPanel is non-zero, blockingPanel will be set to the modal panel that is blocking this item. If this item is not blocked, blockingPanel will not be set by this function.

Calls C++ function: bool QGraphicsItem::isBlockedByModalPanel(QGraphicsItem** blockingPanel = …) const.

C++ documentation:

Returns true if this item is blocked by a modal panel, false otherwise. If blockingPanel is non-zero, blockingPanel will be set to the modal panel that is blocking this item. If this item is not blocked, blockingPanel will not be set by this function.

This function always returns false for items not in a scene.

This function was introduced in Qt 4.6.

See also panelModality(), setPanelModality(), and PanelModality.

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

Returns true if this item is blocked by a modal panel, false otherwise. If blockingPanel is non-zero, blockingPanel will be set to the modal panel that is blocking this item. If this item is not blocked, blockingPanel will not be set by this function.

Calls C++ function: bool QGraphicsItem::isBlockedByModalPanel() const.

C++ documentation:

Returns true if this item is blocked by a modal panel, false otherwise. If blockingPanel is non-zero, blockingPanel will be set to the modal panel that is blocking this item. If this item is not blocked, blockingPanel will not be set by this function.

This function always returns false for items not in a scene.

This function was introduced in Qt 4.6.

See also panelModality(), setPanelModality(), and PanelModality.

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

Returns true if this item is clipped. An item is clipped if it has either set the ItemClipsToShape flag, or if it or any of its ancestors has set the ItemClipsChildrenToShape flag.

Calls C++ function: bool QGraphicsItem::isClipped() const.

C++ documentation:

Returns true if this item is clipped. An item is clipped if it has either set the ItemClipsToShape flag, or if it or any of its ancestors has set the ItemClipsChildrenToShape flag.

Clipping affects the item's appearance (i.e., painting), as well as mouse and hover event delivery.

See also clipPath(), shape(), and setFlags().

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

Returns true if the item is enabled; otherwise, false is returned.

Calls C++ function: bool QGraphicsItem::isEnabled() const.

C++ documentation:

Returns true if the item is enabled; otherwise, false is returned.

See also setEnabled().

pub unsafe fn is_obscured_1a(&self, rect: impl CastInto<Ref<QRectF>>) -> bool[src]

This is an overloaded function.

Calls C++ function: bool QGraphicsItem::isObscured(const QRectF& rect = …) const.

C++ documentation:

This is an overloaded function.

Returns true if rect is completely obscured by the opaque shape of any of colliding items above it (i.e., with a higher Z value than this item).

This function was introduced in Qt 4.3.

See also opaqueArea().

pub unsafe fn is_obscured_4a(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> bool
[src]

This is an overloaded function.

Calls C++ function: bool QGraphicsItem::isObscured(double x, double y, double w, double h) const.

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling isObscured(QRectF(x, y, w, h)).

This function was introduced in Qt 4.3.

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

This is an overloaded function.

Calls C++ function: bool QGraphicsItem::isObscured() const.

C++ documentation:

This is an overloaded function.

Returns true if rect is completely obscured by the opaque shape of any of colliding items above it (i.e., with a higher Z value than this item).

This function was introduced in Qt 4.3.

See also opaqueArea().

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

Returns true if this item's bounding rect is completely obscured by the opaque shape of item.

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

C++ documentation:

Returns true if this item's bounding rect is completely obscured by the opaque shape of item.

The base implementation maps item's opaqueArea() to this item's coordinate system, and then checks if this item's boundingRect() is fully contained within the mapped shape.

You can reimplement this function to provide a custom algorithm for determining whether this item is obscured by item.

See also opaqueArea() and isObscured().

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

Returns true if the item is a panel; otherwise returns false.

Calls C++ function: bool QGraphicsItem::isPanel() const.

C++ documentation:

Returns true if the item is a panel; otherwise returns false.

This function was introduced in Qt 4.6.

See also QGraphicsItem::panel() and ItemIsPanel.

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

Returns true if this item is selected; otherwise, false is returned.

Calls C++ function: bool QGraphicsItem::isSelected() const.

C++ documentation:

Returns true if this item is selected; otherwise, false is returned.

Items that are in a group inherit the group's selected state.

Items are not selected by default.

See also setSelected() and QGraphicsScene::setSelectionArea().

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

Returns true if this item is currently under the mouse cursor in one of the views; otherwise, false is returned.

Calls C++ function: bool QGraphicsItem::isUnderMouse() const.

C++ documentation:

Returns true if this item is currently under the mouse cursor in one of the views; otherwise, false is returned.

This function was introduced in Qt 4.4.

See also QGraphicsScene::views() and QCursor::pos().

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

Returns true if the item is visible; otherwise, false is returned.

Calls C++ function: bool QGraphicsItem::isVisible() const.

C++ documentation:

Returns true if the item is visible; otherwise, false is returned.

Note that the item's general visibility is unrelated to whether or not it is actually being visualized by a QGraphicsView.

See also setVisible().

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

Returns true if the item is visible to parent; otherwise, false is returned. parent can be 0, in which case this function will return whether the item is visible to the scene or not.

Calls C++ function: bool QGraphicsItem::isVisibleTo(const QGraphicsItem* parent) const.

C++ documentation:

Returns true if the item is visible to parent; otherwise, false is returned. parent can be 0, in which case this function will return whether the item is visible to the scene or not.

An item may not be visible to its ancestors even if isVisible() is true. It may also be visible to its ancestors even if isVisible() is false. If any ancestor is hidden, the item itself will be implicitly hidden, in which case this function will return false.

This function was introduced in Qt 4.4.

See also isVisible() and setVisible().

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

Returns true if this item is a widget (i.e., QGraphicsWidget); otherwise, returns false.

Calls C++ function: bool QGraphicsItem::isWidget() const.

C++ documentation:

Returns true if this item is a widget (i.e., QGraphicsWidget); otherwise, returns false.

This function was introduced in Qt 4.4.

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

Returns true if the item is a QGraphicsWidget window, otherwise returns false.

Calls C++ function: bool QGraphicsItem::isWindow() const.

C++ documentation:

Returns true if the item is a QGraphicsWidget window, otherwise returns false.

This function was introduced in Qt 4.4.

See also QGraphicsWidget::windowFlags().

pub unsafe fn item_transform_2a(
    &self,
    other: impl CastInto<Ptr<QGraphicsItem>>,
    ok: *mut bool
) -> CppBox<QTransform>
[src]

Returns a QTransform that maps coordinates from this item to other. If ok is not null, and if there is no such transform, the boolean pointed to by ok will be set to false; otherwise it will be set to true.

Calls C++ function: QTransform QGraphicsItem::itemTransform(const QGraphicsItem* other, bool* ok = …) const.

C++ documentation:

Returns a QTransform that maps coordinates from this item to other. If ok is not null, and if there is no such transform, the boolean pointed to by ok will be set to false; otherwise it will be set to true.

This transform provides an alternative to the mapToItem() or mapFromItem() functions, by returning the appropriate transform so that you can map shapes and coordinates yourself. It also helps you write more efficient code when repeatedly mapping between the same two items.

Note: In rare circumstances, there is no transform that maps between two items.

This function was introduced in Qt 4.5.

See also mapToItem(), mapFromItem(), and deviceTransform().

pub unsafe fn item_transform_1a(
    &self,
    other: impl CastInto<Ptr<QGraphicsItem>>
) -> CppBox<QTransform>
[src]

Returns a QTransform that maps coordinates from this item to other. If ok is not null, and if there is no such transform, the boolean pointed to by ok will be set to false; otherwise it will be set to true.

Calls C++ function: QTransform QGraphicsItem::itemTransform(const QGraphicsItem* other) const.

C++ documentation:

Returns a QTransform that maps coordinates from this item to other. If ok is not null, and if there is no such transform, the boolean pointed to by ok will be set to false; otherwise it will be set to true.

This transform provides an alternative to the mapToItem() or mapFromItem() functions, by returning the appropriate transform so that you can map shapes and coordinates yourself. It also helps you write more efficient code when repeatedly mapping between the same two items.

Note: In rare circumstances, there is no transform that maps between two items.

This function was introduced in Qt 4.5.

See also mapToItem(), mapFromItem(), and deviceTransform().

pub unsafe fn map_from_item_q_graphics_item_q_point_f(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    point: impl CastInto<Ref<QPointF>>
) -> CppBox<QPointF>
[src]

Maps the point point, which is in item's coordinate system, to this item's coordinate system, and returns the mapped coordinate.

Calls C++ function: QPointF QGraphicsItem::mapFromItem(const QGraphicsItem* item, const QPointF& point) const.

C++ documentation:

Maps the point point, which is in item's coordinate system, to this item's coordinate system, and returns the mapped coordinate.

If item is 0, this function returns the same as mapFromScene().

See also itemTransform(), mapFromParent(), mapFromScene(), transform(), mapToItem(), and The Graphics View Coordinate System.

pub unsafe fn map_from_item_q_graphics_item_q_rect_f(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QPolygonF>
[src]

Maps the rectangle rect, which is in item's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapFromItem(const QGraphicsItem* item, const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in item's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.

If item is 0, this function returns the same as mapFromScene()

See also itemTransform(), mapToItem(), mapFromParent(), transform(), and The Graphics View Coordinate System.

pub unsafe fn map_from_item_q_graphics_item_q_polygon_f(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    polygon: impl CastInto<Ref<QPolygonF>>
) -> CppBox<QPolygonF>
[src]

Maps the polygon polygon, which is in item's coordinate system, to this item's coordinate system, and returns the mapped polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapFromItem(const QGraphicsItem* item, const QPolygonF& polygon) const.

C++ documentation:

Maps the polygon polygon, which is in item's coordinate system, to this item's coordinate system, and returns the mapped polygon.

If item is 0, this function returns the same as mapFromScene().

See also itemTransform(), mapToItem(), mapFromParent(), transform(), and The Graphics View Coordinate System.

pub unsafe fn map_from_item_q_graphics_item_q_painter_path(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    path: impl CastInto<Ref<QPainterPath>>
) -> CppBox<QPainterPath>
[src]

Maps the path path, which is in item's coordinate system, to this item's coordinate system, and returns the mapped path.

Calls C++ function: QPainterPath QGraphicsItem::mapFromItem(const QGraphicsItem* item, const QPainterPath& path) const.

C++ documentation:

Maps the path path, which is in item's coordinate system, to this item's coordinate system, and returns the mapped path.

If item is 0, this function returns the same as mapFromScene().

See also itemTransform(), mapFromParent(), mapFromScene(), mapToItem(), and The Graphics View Coordinate System.

pub unsafe fn map_from_item_q_graphics_item2_double(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    x: c_double,
    y: c_double
) -> CppBox<QPointF>
[src]

This is an overloaded function.

Calls C++ function: QPointF QGraphicsItem::mapFromItem(const QGraphicsItem* item, double x, double y) const.

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling mapFromItem(item, QPointF(x, y)).

pub unsafe fn map_from_item_q_graphics_item4_double(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QPolygonF>
[src]

This convenience function is equivalent to calling mapFromItem(item, QRectF(x, y, w, h)).

Calls C++ function: QPolygonF QGraphicsItem::mapFromItem(const QGraphicsItem* item, double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapFromItem(item, QRectF(x, y, w, h)).

This function was introduced in Qt 4.3.

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

Maps the point point, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped coordinate.

Calls C++ function: QPointF QGraphicsItem::mapFromParent(const QPointF& point) const.

C++ documentation:

Maps the point point, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped coordinate.

See also mapFromItem(), mapFromScene(), transform(), mapToParent(), and The Graphics View Coordinate System.

pub unsafe fn map_from_parent_q_rect_f(
    &self,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QPolygonF>
[src]

Maps the rectangle rect, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapFromParent(const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.

See also mapToParent(), mapFromItem(), transform(), and The Graphics View Coordinate System.

pub unsafe fn map_from_parent_q_polygon_f(
    &self,
    polygon: impl CastInto<Ref<QPolygonF>>
) -> CppBox<QPolygonF>
[src]

Maps the polygon polygon, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapFromParent(const QPolygonF& polygon) const.

C++ documentation:

Maps the polygon polygon, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped polygon.

See also mapToParent(), mapToItem(), transform(), and The Graphics View Coordinate System.

pub unsafe fn map_from_parent_q_painter_path(
    &self,
    path: impl CastInto<Ref<QPainterPath>>
) -> CppBox<QPainterPath>
[src]

Maps the path path, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped path.

Calls C++ function: QPainterPath QGraphicsItem::mapFromParent(const QPainterPath& path) const.

C++ documentation:

Maps the path path, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped path.

See also mapFromScene(), mapFromItem(), mapToParent(), and The Graphics View Coordinate System.

pub unsafe fn map_from_parent_2_double(
    &self,
    x: c_double,
    y: c_double
) -> CppBox<QPointF>
[src]

This is an overloaded function.

Calls C++ function: QPointF QGraphicsItem::mapFromParent(double x, double y) const.

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling mapFromParent(QPointF(x, y)).

pub unsafe fn map_from_parent_4_double(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QPolygonF>
[src]

This convenience function is equivalent to calling mapFromItem(QRectF(x, y, w, h)).

Calls C++ function: QPolygonF QGraphicsItem::mapFromParent(double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapFromItem(QRectF(x, y, w, h)).

This function was introduced in Qt 4.3.

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

Maps the point point, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped coordinate.

Calls C++ function: QPointF QGraphicsItem::mapFromScene(const QPointF& point) const.

C++ documentation:

Maps the point point, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped coordinate.

See also mapFromItem(), mapFromParent(), transform(), mapToScene(), and The Graphics View Coordinate System.

pub unsafe fn map_from_scene_q_rect_f(
    &self,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QPolygonF>
[src]

Maps the rectangle rect, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapFromScene(const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a polygon.

See also mapToScene(), mapFromItem(), transform(), and The Graphics View Coordinate System.

pub unsafe fn map_from_scene_q_polygon_f(
    &self,
    polygon: impl CastInto<Ref<QPolygonF>>
) -> CppBox<QPolygonF>
[src]

Maps the polygon polygon, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapFromScene(const QPolygonF& polygon) const.

C++ documentation:

Maps the polygon polygon, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped polygon.

See also mapToScene(), mapFromParent(), transform(), and The Graphics View Coordinate System.

pub unsafe fn map_from_scene_q_painter_path(
    &self,
    path: impl CastInto<Ref<QPainterPath>>
) -> CppBox<QPainterPath>
[src]

Maps the path path, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped path.

Calls C++ function: QPainterPath QGraphicsItem::mapFromScene(const QPainterPath& path) const.

C++ documentation:

Maps the path path, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped path.

See also mapFromParent(), mapFromItem(), mapToScene(), and The Graphics View Coordinate System.

pub unsafe fn map_from_scene_2_double(
    &self,
    x: c_double,
    y: c_double
) -> CppBox<QPointF>
[src]

This is an overloaded function.

Calls C++ function: QPointF QGraphicsItem::mapFromScene(double x, double y) const.

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling mapFromScene(QPointF(x, y)).

pub unsafe fn map_from_scene_4_double(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QPolygonF>
[src]

This convenience function is equivalent to calling mapFromScene(QRectF(x, y, w, h)).

Calls C++ function: QPolygonF QGraphicsItem::mapFromScene(double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapFromScene(QRectF(x, y, w, h)).

This function was introduced in Qt 4.3.

pub unsafe fn map_rect_from_item_2a(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QRectF>
[src]

Maps the rectangle rect, which is in item's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

Calls C++ function: QRectF QGraphicsItem::mapRectFromItem(const QGraphicsItem* item, const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in item's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

If item is 0, this function returns the same as mapRectFromScene().

This function was introduced in Qt 4.5.

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_rect_from_item_5a(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QRectF>
[src]

This convenience function is equivalent to calling mapRectFromItem(item, QRectF(x, y, w, h)).

Calls C++ function: QRectF QGraphicsItem::mapRectFromItem(const QGraphicsItem* item, double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapRectFromItem(item, QRectF(x, y, w, h)).

This function was introduced in Qt 4.5.

pub unsafe fn map_rect_from_parent_1a(
    &self,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QRectF>
[src]

Maps the rectangle rect, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

Calls C++ function: QRectF QGraphicsItem::mapRectFromParent(const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's parent's coordinate system, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

This function was introduced in Qt 4.5.

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_rect_from_parent_4a(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QRectF>
[src]

This convenience function is equivalent to calling mapRectFromParent(QRectF(x, y, w, h)).

Calls C++ function: QRectF QGraphicsItem::mapRectFromParent(double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapRectFromParent(QRectF(x, y, w, h)).

This function was introduced in Qt 4.5.

pub unsafe fn map_rect_from_scene_1a(
    &self,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QRectF>
[src]

Maps the rectangle rect, which is in scene coordinates, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

Calls C++ function: QRectF QGraphicsItem::mapRectFromScene(const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in scene coordinates, to this item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

This function was introduced in Qt 4.5.

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_rect_from_scene_4a(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QRectF>
[src]

This convenience function is equivalent to calling mapRectFromScene(QRectF(x, y, w, h)).

Calls C++ function: QRectF QGraphicsItem::mapRectFromScene(double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapRectFromScene(QRectF(x, y, w, h)).

This function was introduced in Qt 4.5.

pub unsafe fn map_rect_to_item_2a(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QRectF>
[src]

Maps the rectangle rect, which is in this item's coordinate system, to item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

Calls C++ function: QRectF QGraphicsItem::mapRectToItem(const QGraphicsItem* item, const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's coordinate system, to item's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

If item is 0, this function returns the same as mapRectToScene().

This function was introduced in Qt 4.5.

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_rect_to_item_5a(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QRectF>
[src]

This convenience function is equivalent to calling mapRectToItem(item, QRectF(x, y, w, h)).

Calls C++ function: QRectF QGraphicsItem::mapRectToItem(const QGraphicsItem* item, double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapRectToItem(item, QRectF(x, y, w, h)).

This function was introduced in Qt 4.5.

pub unsafe fn map_rect_to_parent_1a(
    &self,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QRectF>
[src]

Maps the rectangle rect, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

Calls C++ function: QRectF QGraphicsItem::mapRectToParent(const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

This function was introduced in Qt 4.5.

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_rect_to_parent_4a(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QRectF>
[src]

This convenience function is equivalent to calling mapRectToParent(QRectF(x, y, w, h)).

Calls C++ function: QRectF QGraphicsItem::mapRectToParent(double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapRectToParent(QRectF(x, y, w, h)).

This function was introduced in Qt 4.5.

pub unsafe fn map_rect_to_scene_1a(
    &self,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QRectF>
[src]

Maps the rectangle rect, which is in this item's coordinate system, to the scene coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

Calls C++ function: QRectF QGraphicsItem::mapRectToScene(const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's coordinate system, to the scene coordinate system, and returns the mapped rectangle as a new rectangle (i.e., the bounding rectangle of the resulting polygon).

This function was introduced in Qt 4.5.

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_rect_to_scene_4a(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QRectF>
[src]

This convenience function is equivalent to calling mapRectToScene(QRectF(x, y, w, h)).

Calls C++ function: QRectF QGraphicsItem::mapRectToScene(double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapRectToScene(QRectF(x, y, w, h)).

This function was introduced in Qt 4.5.

pub unsafe fn map_to_item_q_graphics_item_q_point_f(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    point: impl CastInto<Ref<QPointF>>
) -> CppBox<QPointF>
[src]

Maps the point point, which is in this item's coordinate system, to item's coordinate system, and returns the mapped coordinate.

Calls C++ function: QPointF QGraphicsItem::mapToItem(const QGraphicsItem* item, const QPointF& point) const.

C++ documentation:

Maps the point point, which is in this item's coordinate system, to item's coordinate system, and returns the mapped coordinate.

If item is 0, this function returns the same as mapToScene().

See also itemTransform(), mapToParent(), mapToScene(), transform(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_to_item_q_graphics_item_q_rect_f(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QPolygonF>
[src]

Maps the rectangle rect, which is in this item's coordinate system, to item's coordinate system, and returns the mapped rectangle as a polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapToItem(const QGraphicsItem* item, const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's coordinate system, to item's coordinate system, and returns the mapped rectangle as a polygon.

If item is 0, this function returns the same as mapToScene().

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_to_item_q_graphics_item_q_polygon_f(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    polygon: impl CastInto<Ref<QPolygonF>>
) -> CppBox<QPolygonF>
[src]

Maps the polygon polygon, which is in this item's coordinate system, to item's coordinate system, and returns the mapped polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapToItem(const QGraphicsItem* item, const QPolygonF& polygon) const.

C++ documentation:

Maps the polygon polygon, which is in this item's coordinate system, to item's coordinate system, and returns the mapped polygon.

If item is 0, this function returns the same as mapToScene().

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_to_item_q_graphics_item_q_painter_path(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    path: impl CastInto<Ref<QPainterPath>>
) -> CppBox<QPainterPath>
[src]

Maps the path path, which is in this item's coordinate system, to item's coordinate system, and returns the mapped path.

Calls C++ function: QPainterPath QGraphicsItem::mapToItem(const QGraphicsItem* item, const QPainterPath& path) const.

C++ documentation:

Maps the path path, which is in this item's coordinate system, to item's coordinate system, and returns the mapped path.

If item is 0, this function returns the same as mapToScene().

See also itemTransform(), mapToParent(), mapToScene(), mapFromItem(), and The Graphics View Coordinate System.

pub unsafe fn map_to_item_q_graphics_item2_double(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    x: c_double,
    y: c_double
) -> CppBox<QPointF>
[src]

This is an overloaded function.

Calls C++ function: QPointF QGraphicsItem::mapToItem(const QGraphicsItem* item, double x, double y) const.

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling mapToItem(item, QPointF(x, y)).

pub unsafe fn map_to_item_q_graphics_item4_double(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QPolygonF>
[src]

This convenience function is equivalent to calling mapToItem(item, QRectF(x, y, w, h)).

Calls C++ function: QPolygonF QGraphicsItem::mapToItem(const QGraphicsItem* item, double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapToItem(item, QRectF(x, y, w, h)).

This function was introduced in Qt 4.3.

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

Maps the point point, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped coordinate. If the item has no parent, point will be mapped to the scene's coordinate system.

Calls C++ function: QPointF QGraphicsItem::mapToParent(const QPointF& point) const.

C++ documentation:

Maps the point point, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped coordinate. If the item has no parent, point will be mapped to the scene's coordinate system.

See also mapToItem(), mapToScene(), transform(), mapFromParent(), and The Graphics View Coordinate System.

pub unsafe fn map_to_parent_q_rect_f(
    &self,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QPolygonF>
[src]

Maps the rectangle rect, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped rectangle as a polygon. If the item has no parent, rect will be mapped to the scene's coordinate system.

Calls C++ function: QPolygonF QGraphicsItem::mapToParent(const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped rectangle as a polygon. If the item has no parent, rect will be mapped to the scene's coordinate system.

See also mapToScene(), mapToItem(), mapFromParent(), and The Graphics View Coordinate System.

pub unsafe fn map_to_parent_q_polygon_f(
    &self,
    polygon: impl CastInto<Ref<QPolygonF>>
) -> CppBox<QPolygonF>
[src]

Maps the polygon polygon, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped polygon. If the item has no parent, polygon will be mapped to the scene's coordinate system.

Calls C++ function: QPolygonF QGraphicsItem::mapToParent(const QPolygonF& polygon) const.

C++ documentation:

Maps the polygon polygon, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped polygon. If the item has no parent, polygon will be mapped to the scene's coordinate system.

See also mapToScene(), mapToItem(), mapFromParent(), and The Graphics View Coordinate System.

pub unsafe fn map_to_parent_q_painter_path(
    &self,
    path: impl CastInto<Ref<QPainterPath>>
) -> CppBox<QPainterPath>
[src]

Maps the path path, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped path. If the item has no parent, path will be mapped to the scene's coordinate system.

Calls C++ function: QPainterPath QGraphicsItem::mapToParent(const QPainterPath& path) const.

C++ documentation:

Maps the path path, which is in this item's coordinate system, to its parent's coordinate system, and returns the mapped path. If the item has no parent, path will be mapped to the scene's coordinate system.

See also mapToScene(), mapToItem(), mapFromParent(), and The Graphics View Coordinate System.

pub unsafe fn map_to_parent_2_double(
    &self,
    x: c_double,
    y: c_double
) -> CppBox<QPointF>
[src]

This is an overloaded function.

Calls C++ function: QPointF QGraphicsItem::mapToParent(double x, double y) const.

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling mapToParent(QPointF(x, y)).

pub unsafe fn map_to_parent_4_double(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QPolygonF>
[src]

This convenience function is equivalent to calling mapToParent(QRectF(x, y, w, h)).

Calls C++ function: QPolygonF QGraphicsItem::mapToParent(double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapToParent(QRectF(x, y, w, h)).

This function was introduced in Qt 4.3.

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

Maps the point point, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped coordinate.

Calls C++ function: QPointF QGraphicsItem::mapToScene(const QPointF& point) const.

C++ documentation:

Maps the point point, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped coordinate.

See also mapToItem(), mapToParent(), transform(), mapFromScene(), and The Graphics View Coordinate System.

pub unsafe fn map_to_scene_q_rect_f(
    &self,
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QPolygonF>
[src]

Maps the rectangle rect, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped rectangle as a polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapToScene(const QRectF& rect) const.

C++ documentation:

Maps the rectangle rect, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped rectangle as a polygon.

See also mapToParent(), mapToItem(), mapFromScene(), and The Graphics View Coordinate System.

pub unsafe fn map_to_scene_q_polygon_f(
    &self,
    polygon: impl CastInto<Ref<QPolygonF>>
) -> CppBox<QPolygonF>
[src]

Maps the polygon polygon, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped polygon.

Calls C++ function: QPolygonF QGraphicsItem::mapToScene(const QPolygonF& polygon) const.

C++ documentation:

Maps the polygon polygon, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped polygon.

See also mapToParent(), mapToItem(), mapFromScene(), and The Graphics View Coordinate System.

pub unsafe fn map_to_scene_q_painter_path(
    &self,
    path: impl CastInto<Ref<QPainterPath>>
) -> CppBox<QPainterPath>
[src]

Maps the path path, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped path.

Calls C++ function: QPainterPath QGraphicsItem::mapToScene(const QPainterPath& path) const.

C++ documentation:

Maps the path path, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped path.

See also mapToParent(), mapToItem(), mapFromScene(), and The Graphics View Coordinate System.

pub unsafe fn map_to_scene_2_double(
    &self,
    x: c_double,
    y: c_double
) -> CppBox<QPointF>
[src]

This is an overloaded function.

Calls C++ function: QPointF QGraphicsItem::mapToScene(double x, double y) const.

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling mapToScene(QPointF(x, y)).

pub unsafe fn map_to_scene_4_double(
    &self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QPolygonF>
[src]

This convenience function is equivalent to calling mapToScene(QRectF(x, y, w, h)).

Calls C++ function: QPolygonF QGraphicsItem::mapToScene(double x, double y, double w, double h) const.

C++ documentation:

This convenience function is equivalent to calling mapToScene(QRectF(x, y, w, h)).

This function was introduced in Qt 4.3.

pub unsafe fn matrix(&self) -> CppBox<QMatrix>[src]

Returns the item's affine transformation matrix. This is a subset or the item's full transformation matrix, and might not represent the item's full transformation.

Calls C++ function: QMatrix QGraphicsItem::matrix() const.

C++ documentation:

Returns the item's affine transformation matrix. This is a subset or the item's full transformation matrix, and might not represent the item's full transformation.

Use transform() instead.

See also setMatrix(), setTransform(), and sceneTransform().

pub unsafe fn move_by(&self, dx: c_double, dy: c_double)[src]

Moves the item by dx points horizontally, and dy point vertically. This function is equivalent to calling setPos(pos() + QPointF(dx, dy)).

Calls C++ function: void QGraphicsItem::moveBy(double dx, double dy).

C++ documentation:

Moves the item by dx points horizontally, and dy point vertically. This function is equivalent to calling setPos(pos() + QPointF(dx, dy)).

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

Returns this item's local opacity, which is between 0.0 (transparent) and 1.0 (opaque). This value is combined with parent and ancestor values into the effectiveOpacity(). The effective opacity decides how the item is rendered and also affects its visibility when queried by functions such as QGraphicsView::items().

Calls C++ function: double QGraphicsItem::opacity() const.

C++ documentation:

Returns this item's local opacity, which is between 0.0 (transparent) and 1.0 (opaque). This value is combined with parent and ancestor values into the effectiveOpacity(). The effective opacity decides how the item is rendered and also affects its visibility when queried by functions such as QGraphicsView::items().

The opacity property decides the state of the painter passed to the paint() function. If the item is cached, i.e., ItemCoordinateCache or DeviceCoordinateCache, the effective property will be applied to the item's cache as it is rendered.

The default opacity is 1.0; fully opaque.

This function was introduced in Qt 4.5.

See also setOpacity(), paint(), ItemIgnoresParentOpacity, and ItemDoesntPropagateOpacityToChildren.

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

This virtual function returns a shape representing the area where this item is opaque. An area is opaque if it is filled using an opaque brush or color (i.e., not transparent).

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

C++ documentation:

This virtual function returns a shape representing the area where this item is opaque. An area is opaque if it is filled using an opaque brush or color (i.e., not transparent).

This function is used by isObscuredBy(), which is called by underlying items to determine if they are obscured by this item.

The default implementation returns an empty QPainterPath, indicating that this item is completely transparent and does not obscure any other items.

See also isObscuredBy(), isObscured(), and shape().

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

This function, which is usually called by QGraphicsView, paints the contents of an item in local coordinates.

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

C++ documentation:

This function, which is usually called by QGraphicsView, paints the contents of an item in local coordinates.

Reimplement this function in a QGraphicsItem subclass to provide the item's painting implementation, using painter. The option parameter provides style options for the item, such as its state, exposed area and its level-of-detail hints. The widget argument is optional. If provided, it points to the widget that is being painted on; otherwise, it is 0. For cached painting, widget is always 0.

void RoundRectItem::paint(QPainter painter, const QStyleOptionGraphicsItem option, QWidget *widget) { painter->drawRoundedRect(-10, -10, 20, 20, 5, 5); }

The painter's pen is 0-width by default, and its pen is initialized to the QPalette::Text brush from the paint device's palette. The brush is initialized to QPalette::Window.

Make sure to constrain all painting inside the boundaries of boundingRect() to avoid rendering artifacts (as QGraphicsView does not clip the painter for you). In particular, when QPainter renders the outline of a shape using an assigned QPen, half of the outline will be drawn outside, and half inside, the shape you're rendering (e.g., with a pen width of 2 units, you must draw outlines 1 unit inside boundingRect()). QGraphicsItem does not support use of cosmetic pens with a non-zero width.

All painting is done in local coordinates.

Note: It is mandatory that an item will always redraw itself in the exact same way, unless update() was called; otherwise visual artifacts may occur. In other words, two subsequent calls to paint() must always produce the same output, unless update() was called between them.

Note: Enabling caching for an item does not guarantee that paint() will be invoked only once by the Graphics View framework, even without any explicit call to update(). See the documentation of setCacheMode() for more details.

See also setCacheMode(), QPen::width(), Item Coordinates, and ItemUsesExtendedStyleOption.

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

This function, which is usually called by QGraphicsView, paints the contents of an item in local coordinates.

Calls C++ function: pure virtual void QGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option).

C++ documentation:

This function, which is usually called by QGraphicsView, paints the contents of an item in local coordinates.

Reimplement this function in a QGraphicsItem subclass to provide the item's painting implementation, using painter. The option parameter provides style options for the item, such as its state, exposed area and its level-of-detail hints. The widget argument is optional. If provided, it points to the widget that is being painted on; otherwise, it is 0. For cached painting, widget is always 0.

void RoundRectItem::paint(QPainter painter, const QStyleOptionGraphicsItem option, QWidget *widget) { painter->drawRoundedRect(-10, -10, 20, 20, 5, 5); }

The painter's pen is 0-width by default, and its pen is initialized to the QPalette::Text brush from the paint device's palette. The brush is initialized to QPalette::Window.

Make sure to constrain all painting inside the boundaries of boundingRect() to avoid rendering artifacts (as QGraphicsView does not clip the painter for you). In particular, when QPainter renders the outline of a shape using an assigned QPen, half of the outline will be drawn outside, and half inside, the shape you're rendering (e.g., with a pen width of 2 units, you must draw outlines 1 unit inside boundingRect()). QGraphicsItem does not support use of cosmetic pens with a non-zero width.

All painting is done in local coordinates.

Note: It is mandatory that an item will always redraw itself in the exact same way, unless update() was called; otherwise visual artifacts may occur. In other words, two subsequent calls to paint() must always produce the same output, unless update() was called between them.

Note: Enabling caching for an item does not guarantee that paint() will be invoked only once by the Graphics View framework, even without any explicit call to update(). See the documentation of setCacheMode() for more details.

See also setCacheMode(), QPen::width(), Item Coordinates, and ItemUsesExtendedStyleOption.

pub unsafe fn panel(&self) -> Ptr<QGraphicsItem>[src]

Returns the item's panel, or 0 if this item does not have a panel. If the item is a panel, it will return itself. Otherwise it will return the closest ancestor that is a panel.

Calls C++ function: QGraphicsItem* QGraphicsItem::panel() const.

C++ documentation:

Returns the item's panel, or 0 if this item does not have a panel. If the item is a panel, it will return itself. Otherwise it will return the closest ancestor that is a panel.

This function was introduced in Qt 4.6.

See also isPanel() and ItemIsPanel.

pub unsafe fn panel_modality(&self) -> PanelModality[src]

Returns the modality for this item.

Calls C++ function: QGraphicsItem::PanelModality QGraphicsItem::panelModality() const.

C++ documentation:

Returns the modality for this item.

This function was introduced in Qt 4.6.

See also setPanelModality().

pub unsafe fn parent_item(&self) -> Ptr<QGraphicsItem>[src]

Returns a pointer to this item's parent item. If this item does not have a parent, 0 is returned.

Calls C++ function: QGraphicsItem* QGraphicsItem::parentItem() const.

C++ documentation:

Returns a pointer to this item's parent item. If this item does not have a parent, 0 is returned.

See also setParentItem() and childItems().

pub unsafe fn parent_object(&self) -> QPtr<QGraphicsObject>[src]

Returns a pointer to the item's parent, cast to a QGraphicsObject. returns 0 if the parent item is not a QGraphicsObject.

Calls C++ function: QGraphicsObject* QGraphicsItem::parentObject() const.

C++ documentation:

Returns a pointer to the item's parent, cast to a QGraphicsObject. returns 0 if the parent item is not a QGraphicsObject.

This function was introduced in Qt 4.6.

See also parentItem() and childItems().

pub unsafe fn parent_widget(&self) -> QPtr<QGraphicsWidget>[src]

Returns a pointer to the item's parent widget. The item's parent widget is the closest parent item that is a widget.

Calls C++ function: QGraphicsWidget* QGraphicsItem::parentWidget() const.

C++ documentation:

Returns a pointer to the item's parent widget. The item's parent widget is the closest parent item that is a widget.

This function was introduced in Qt 4.4.

See also parentItem() and childItems().

pub unsafe fn pos(&self) -> CppBox<QPointF>[src]

Returns the position of the item in parent coordinates. If the item has no parent, its position is given in scene coordinates.

Calls C++ function: QPointF QGraphicsItem::pos() const.

C++ documentation:

Returns the position of the item in parent coordinates. If the item has no parent, its position is given in scene coordinates.

The position of the item describes its origin (local coordinate (0, 0)) in parent coordinates; this function returns the same as mapToParent(0, 0).

For convenience, you can also call scenePos() to determine the item's position in scene coordinates, regardless of its parent.

See also x(), y(), setPos(), transform(), and The Graphics View Coordinate System.

pub unsafe fn remove_scene_event_filter(
    &self,
    filter_item: impl CastInto<Ptr<QGraphicsItem>>
)
[src]

Removes an event filter on this item from filterItem.

Calls C++ function: void QGraphicsItem::removeSceneEventFilter(QGraphicsItem* filterItem).

C++ documentation:

Removes an event filter on this item from filterItem.

See also installSceneEventFilter().

pub unsafe fn reset_matrix(&self)[src]

Use resetTransform() instead.

Calls C++ function: void QGraphicsItem::resetMatrix().

C++ documentation:

Use resetTransform() instead.

pub unsafe fn reset_transform(&self)[src]

Resets this item's transformation matrix to the identity matrix or all the transformation properties to their default values. This is equivalent to calling setTransform(QTransform()).

Calls C++ function: void QGraphicsItem::resetTransform().

C++ documentation:

Resets this item's transformation matrix to the identity matrix or all the transformation properties to their default values. This is equivalent to calling setTransform(QTransform()).

This function was introduced in Qt 4.3.

See also setTransform() and transform().

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

Returns the clockwise rotation, in degrees, around the Z axis. The default value is 0 (i.e., the item is not rotated).

Calls C++ function: double QGraphicsItem::rotation() const.

C++ documentation:

Returns the clockwise rotation, in degrees, around the Z axis. The default value is 0 (i.e., the item is not rotated).

The rotation is combined with the item's scale(), transform() and transformations() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also setRotation(), transformOriginPoint(), and Transformations.

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

Use

Calls C++ function: double QGraphicsItem::scale() const.

Warning: no exact match found in C++ documentation. Below is the C++ documentation for void QGraphicsItem::scale(qreal sx, qreal sy):

Use


  setTransform(QTransform::fromScale(sx, sy), true);

instead.

Scales the current item transformation by (sx, sy) around its origin. To scale from an arbitrary point (x, y), you need to combine translation and scaling with setTransform().

Example:

// Scale an item by 3x2 from its origin item->scale(3, 2);

// Scale an item by 3x2 from (x, y) item->setTransform(QTransform().translate(x, y).scale(3, 2).translate(-x, -y));

See also setTransform() and transform().

pub unsafe fn scene(&self) -> QPtr<QGraphicsScene>[src]

Returns the current scene for the item, or 0 if the item is not stored in a scene.

Calls C++ function: QGraphicsScene* QGraphicsItem::scene() const.

C++ documentation:

Returns the current scene for the item, or 0 if the item is not stored in a scene.

To add or move an item to a scene, call QGraphicsScene::addItem().

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

Returns the bounding rect of this item in scene coordinates, by combining sceneTransform() with boundingRect().

Calls C++ function: QRectF QGraphicsItem::sceneBoundingRect() const.

C++ documentation:

Returns the bounding rect of this item in scene coordinates, by combining sceneTransform() with boundingRect().

See also boundingRect() and The Graphics View Coordinate System.

pub unsafe fn scene_matrix(&self) -> CppBox<QMatrix>[src]

Use sceneTransform() instead.

Calls C++ function: QMatrix QGraphicsItem::sceneMatrix() const.

C++ documentation:

Use sceneTransform() instead.

See also transform(), setTransform(), scenePos(), and The Graphics View Coordinate System.

pub unsafe fn scene_pos(&self) -> CppBox<QPointF>[src]

Returns the item's position in scene coordinates. This is equivalent to calling mapToScene(0, 0).

Calls C++ function: QPointF QGraphicsItem::scenePos() const.

C++ documentation:

Returns the item's position in scene coordinates. This is equivalent to calling mapToScene(0, 0).

See also pos(), sceneTransform(), and The Graphics View Coordinate System.

pub unsafe fn scene_transform(&self) -> CppBox<QTransform>[src]

Returns this item's scene transformation matrix. This matrix can be used to map coordinates and geometrical shapes from this item's local coordinate system to the scene's coordinate system. To map coordinates from the scene, you must first invert the returned matrix.

Calls C++ function: QTransform QGraphicsItem::sceneTransform() const.

C++ documentation:

Returns this item's scene transformation matrix. This matrix can be used to map coordinates and geometrical shapes from this item's local coordinate system to the scene's coordinate system. To map coordinates from the scene, you must first invert the returned matrix.

Example:

QGraphicsRectItem rect; rect.setPos(100, 100);

rect.sceneTransform().map(QPointF(0, 0)); // returns QPointF(100, 100);

rect.sceneTransform().inverted().map(QPointF(100, 100)); // returns QPointF(0, 0);

Unlike transform(), which returns only an item's local transformation, this function includes the item's (and any parents') position, and all the transfomation properties.

This function was introduced in Qt 4.3.

See also transform(), setTransform(), scenePos(), The Graphics View Coordinate System, and Transformations.

pub unsafe fn scroll_3a(
    &self,
    dx: c_double,
    dy: c_double,
    rect: impl CastInto<Ref<QRectF>>
)
[src]

Scrolls the contents of rect by dx, dy. If rect is a null rect (the default), the item's bounding rect is scrolled.

Calls C++ function: void QGraphicsItem::scroll(double dx, double dy, const QRectF& rect = …).

C++ documentation:

Scrolls the contents of rect by dx, dy. If rect is a null rect (the default), the item's bounding rect is scrolled.

Scrolling provides a fast alternative to simply redrawing when the contents of the item (or parts of the item) are shifted vertically or horizontally. Depending on the current transformation and the capabilities of the paint device (i.e., the viewport), this operation may consist of simply moving pixels from one location to another using memmove(). In most cases this is faster than rerendering the entire area.

After scrolling, the item will issue an update for the newly exposed areas. If scrolling is not supported (e.g., you are rendering to an OpenGL viewport, which does not benefit from scroll optimizations), this function is equivalent to calling update(rect).

Note: Scrolling is only supported when QGraphicsItem::ItemCoordinateCache is enabled; in all other cases calling this function is equivalent to calling update(rect). If you for sure know that the item is opaque and not overlapped by other items, you can map the rect to viewport coordinates and scroll the viewport.

QTransform xform = item->deviceTransform(view->viewportTransform()); QRect deviceRect = xform.mapRect(rect).toAlignedRect(); view->viewport()->scroll(dx, dy, deviceRect);

This function was introduced in Qt 4.4.

See also boundingRect().

pub unsafe fn scroll_2a(&self, dx: c_double, dy: c_double)[src]

Scrolls the contents of rect by dx, dy. If rect is a null rect (the default), the item's bounding rect is scrolled.

Calls C++ function: void QGraphicsItem::scroll(double dx, double dy).

C++ documentation:

Scrolls the contents of rect by dx, dy. If rect is a null rect (the default), the item's bounding rect is scrolled.

Scrolling provides a fast alternative to simply redrawing when the contents of the item (or parts of the item) are shifted vertically or horizontally. Depending on the current transformation and the capabilities of the paint device (i.e., the viewport), this operation may consist of simply moving pixels from one location to another using memmove(). In most cases this is faster than rerendering the entire area.

After scrolling, the item will issue an update for the newly exposed areas. If scrolling is not supported (e.g., you are rendering to an OpenGL viewport, which does not benefit from scroll optimizations), this function is equivalent to calling update(rect).

Note: Scrolling is only supported when QGraphicsItem::ItemCoordinateCache is enabled; in all other cases calling this function is equivalent to calling update(rect). If you for sure know that the item is opaque and not overlapped by other items, you can map the rect to viewport coordinates and scroll the viewport.

QTransform xform = item->deviceTransform(view->viewportTransform()); QRect deviceRect = xform.mapRect(rect).toAlignedRect(); view->viewport()->scroll(dx, dy, deviceRect);

This function was introduced in Qt 4.4.

See also boundingRect().

pub unsafe fn set_accept_drops(&self, on: bool)[src]

If on is true, this item will accept drag and drop events; otherwise, it is transparent for drag and drop events. By default, items do not accept drag and drop events.

Calls C++ function: void QGraphicsItem::setAcceptDrops(bool on).

C++ documentation:

If on is true, this item will accept drag and drop events; otherwise, it is transparent for drag and drop events. By default, items do not accept drag and drop events.

See also acceptDrops().

pub unsafe fn set_accept_hover_events(&self, enabled: bool)[src]

If enabled is true, this item will accept hover events; otherwise, it will ignore them. By default, items do not accept hover events.

Calls C++ function: void QGraphicsItem::setAcceptHoverEvents(bool enabled).

C++ documentation:

If enabled is true, this item will accept hover events; otherwise, it will ignore them. By default, items do not accept hover events.

Hover events are delivered when there is no current mouse grabber item. They are sent when the mouse cursor enters an item, when it moves around inside the item, and when the cursor leaves an item. Hover events are commonly used to highlight an item when it's entered, and for tracking the mouse cursor as it hovers over the item (equivalent to QWidget::mouseTracking).

Parent items receive hover enter events before their children, and leave events after their children. The parent does not receive a hover leave event if the cursor enters a child, though; the parent stays "hovered" until the cursor leaves its area, including its children's areas.

If a parent item handles child events, it will receive hover move, drag move, and drop events as the cursor passes through its children, but it does not receive hover enter and hover leave, nor drag enter and drag leave events on behalf of its children.

A QGraphicsWidget with window decorations will accept hover events regardless of the value of acceptHoverEvents().

This function was introduced in Qt 4.4.

See also acceptHoverEvents(), hoverEnterEvent(), hoverMoveEvent(), and hoverLeaveEvent().

pub unsafe fn set_accept_touch_events(&self, enabled: bool)[src]

If enabled is true, this item will accept touch events; otherwise, it will ignore them. By default, items do not accept touch events.

Calls C++ function: void QGraphicsItem::setAcceptTouchEvents(bool enabled).

C++ documentation:

If enabled is true, this item will accept touch events; otherwise, it will ignore them. By default, items do not accept touch events.

This function was introduced in Qt 4.6.

See also acceptTouchEvents().

pub unsafe fn set_accepted_mouse_buttons(&self, buttons: QFlags<MouseButton>)[src]

Sets the mouse buttons that this item accepts mouse events for.

Calls C++ function: void QGraphicsItem::setAcceptedMouseButtons(QFlags<Qt::MouseButton> buttons).

C++ documentation:

Sets the mouse buttons that this item accepts mouse events for.

By default, all mouse buttons are accepted. If an item accepts a mouse button, it will become the mouse grabber item when a mouse press event is delivered for that button. However, if the item does not accept the mouse button, QGraphicsScene will forward the mouse events to the first item beneath it that does.

To disable mouse events for an item (i.e., make it transparent for mouse events), call setAcceptedMouseButtons(0).

See also acceptedMouseButtons() and mousePressEvent().

pub unsafe fn set_active(&self, active: bool)[src]

If active is true, and the scene is active, this item's panel will be activated. Otherwise, the panel is deactivated.

Calls C++ function: void QGraphicsItem::setActive(bool active).

C++ documentation:

If active is true, and the scene is active, this item's panel will be activated. Otherwise, the panel is deactivated.

If the item is not part of an active scene, active will decide what happens to the panel when the scene becomes active or the item is added to the scene. If true, the item's panel will be activated when the item is either added to the scene or the scene is activated. Otherwise, the item will stay inactive independent of the scene's activated state.

This function was introduced in Qt 4.6.

See also isPanel(), QGraphicsScene::setActivePanel(), and QGraphicsScene::isActive().

pub unsafe fn set_bounding_region_granularity(&self, granularity: c_double)[src]

Sets the bounding region granularity to granularity; a value between and including 0 and 1. The default value is 0 (i.e., the lowest granularity, where the bounding region corresponds to the item's bounding rectangle).

Calls C++ function: void QGraphicsItem::setBoundingRegionGranularity(double granularity).

C++ documentation:

Sets the bounding region granularity to granularity; a value between and including 0 and 1. The default value is 0 (i.e., the lowest granularity, where the bounding region corresponds to the item's bounding rectangle).

The granularity is used by boundingRegion() to calculate how fine the bounding region of the item should be. The highest achievable granularity is 1, where boundingRegion() will return the finest outline possible for the respective device (e.g., for a QGraphicsView viewport, this gives you a pixel-perfect bounding region). The lowest possible granularity is 0. The value of granularity describes the ratio between device resolution and the resolution of the bounding region (e.g., a value of 0.25 will provide a region where each chunk corresponds to 4x4 device units / pixels).

This function was introduced in Qt 4.4.

See also boundingRegionGranularity().

pub unsafe fn set_cache_mode_2a(
    &self,
    mode: CacheMode,
    cache_size: impl CastInto<Ref<QSize>>
)
[src]

Sets the item's cache mode to mode.

Calls C++ function: void QGraphicsItem::setCacheMode(QGraphicsItem::CacheMode mode, const QSize& cacheSize = …).

C++ documentation:

Sets the item's cache mode to mode.

The optional logicalCacheSize argument is used only by ItemCoordinateCache mode, and describes the resolution of the cache buffer; if logicalCacheSize is (100, 100), QGraphicsItem will fit the item into 100x100 pixels in graphics memory, regardless of the logical size of the item itself. By default QGraphicsItem uses the size of boundingRect(). For all other cache modes than ItemCoordinateCache, logicalCacheSize is ignored.

Caching can speed up rendering if your item spends a significant time redrawing itself. In some cases the cache can also slow down rendering, in particular when the item spends less time redrawing than QGraphicsItem spends redrawing from the cache.

When caching is enabled, an item's paint() function will generally draw into an offscreen pixmap cache; for any subsequent repaint requests, the Graphics View framework will redraw from the cache. This approach works particularly well with QGLWidget, which stores all the cache as OpenGL textures.

Be aware that QPixmapCache's cache limit may need to be changed to obtain optimal performance.

You can read more about the different cache modes in the CacheMode documentation.

Note: Enabling caching does not imply that the item's paint() function will be called only in response to an explicit update() call. For instance, under memory pressure, Qt may decide to drop some of the cache information; in such cases an item's paint() function will be called even if there was no update() call (that is, exactly as if there were no caching enabled).

This function was introduced in Qt 4.4.

See also cacheMode(), CacheMode, and QPixmapCache::setCacheLimit().

pub unsafe fn set_cache_mode_1a(&self, mode: CacheMode)[src]

Sets the item's cache mode to mode.

Calls C++ function: void QGraphicsItem::setCacheMode(QGraphicsItem::CacheMode mode).

C++ documentation:

Sets the item's cache mode to mode.

The optional logicalCacheSize argument is used only by ItemCoordinateCache mode, and describes the resolution of the cache buffer; if logicalCacheSize is (100, 100), QGraphicsItem will fit the item into 100x100 pixels in graphics memory, regardless of the logical size of the item itself. By default QGraphicsItem uses the size of boundingRect(). For all other cache modes than ItemCoordinateCache, logicalCacheSize is ignored.

Caching can speed up rendering if your item spends a significant time redrawing itself. In some cases the cache can also slow down rendering, in particular when the item spends less time redrawing than QGraphicsItem spends redrawing from the cache.

When caching is enabled, an item's paint() function will generally draw into an offscreen pixmap cache; for any subsequent repaint requests, the Graphics View framework will redraw from the cache. This approach works particularly well with QGLWidget, which stores all the cache as OpenGL textures.

Be aware that QPixmapCache's cache limit may need to be changed to obtain optimal performance.

You can read more about the different cache modes in the CacheMode documentation.

Note: Enabling caching does not imply that the item's paint() function will be called only in response to an explicit update() call. For instance, under memory pressure, Qt may decide to drop some of the cache information; in such cases an item's paint() function will be called even if there was no update() call (that is, exactly as if there were no caching enabled).

This function was introduced in Qt 4.4.

See also cacheMode(), CacheMode, and QPixmapCache::setCacheLimit().

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

Sets the current cursor shape for the item to cursor. The mouse cursor will assume this shape when it's over this item. See the list of predefined cursor objects for a range of useful shapes.

Calls C++ function: void QGraphicsItem::setCursor(const QCursor& cursor).

C++ documentation:

Sets the current cursor shape for the item to cursor. The mouse cursor will assume this shape when it's over this item. See the list of predefined cursor objects for a range of useful shapes.

An editor item might want to use an I-beam cursor:

item->setCursor(Qt::IBeamCursor);

If no cursor has been set, the cursor of the item beneath is used.

See also cursor(), hasCursor(), unsetCursor(), QWidget::cursor, and QApplication::overrideCursor().

pub unsafe fn set_data(&self, key: c_int, value: impl CastInto<Ref<QVariant>>)[src]

Sets this item's custom data for the key key to value.

Calls C++ function: void QGraphicsItem::setData(int key, const QVariant& value).

C++ documentation:

Sets this item's custom data for the key key to value.

Custom item data is useful for storing arbitrary properties for any item. Qt does not use this feature for storing data; it is provided solely for the convenience of the user.

See also data().

pub unsafe fn set_enabled(&self, enabled: bool)[src]

If enabled is true, the item is enabled; otherwise, it is disabled.

Calls C++ function: void QGraphicsItem::setEnabled(bool enabled).

C++ documentation:

If enabled is true, the item is enabled; otherwise, it is disabled.

Disabled items are visible, but they do not receive any events, and cannot take focus nor be selected. Mouse events are discarded; they are not propagated unless the item is also invisible, or if it does not accept mouse events (see acceptedMouseButtons()). A disabled item cannot become the mouse grabber, and as a result of this, an item loses the grab if it becomes disabled when grabbing the mouse, just like it loses focus if it had focus when it was disabled.

Disabled items are traditionally drawn using grayed-out colors (see QPalette::Disabled).

If you disable a parent item, all its children will also be disabled. If you enable a parent item, all children will be enabled, unless they have been explicitly disabled (i.e., if you call setEnabled(false) on a child, it will not be reenabled if its parent is disabled, and then enabled again).

Items are enabled by default.

Note: If you install an event filter, you can still intercept events before they are delivered to items; this mechanism disregards the item's enabled state.

See also isEnabled().

pub unsafe fn set_filters_child_events(&self, enabled: bool)[src]

If enabled is true, this item is set to filter all events for all its children (i.e., all events intented for any of its children are instead sent to this item); otherwise, if enabled is false, this item will only handle its own events. The default value is false.

Calls C++ function: void QGraphicsItem::setFiltersChildEvents(bool enabled).

C++ documentation:

If enabled is true, this item is set to filter all events for all its children (i.e., all events intented for any of its children are instead sent to this item); otherwise, if enabled is false, this item will only handle its own events. The default value is false.

This function was introduced in Qt 4.6.

See also filtersChildEvents().

pub unsafe fn set_flag_2a(&self, flag: GraphicsItemFlag, enabled: bool)[src]

If enabled is true, the item flag flag is enabled; otherwise, it is disabled.

Calls C++ function: void QGraphicsItem::setFlag(QGraphicsItem::GraphicsItemFlag flag, bool enabled = …).

C++ documentation:

If enabled is true, the item flag flag is enabled; otherwise, it is disabled.

See also flags() and setFlags().

pub unsafe fn set_flag_1a(&self, flag: GraphicsItemFlag)[src]

If enabled is true, the item flag flag is enabled; otherwise, it is disabled.

Calls C++ function: void QGraphicsItem::setFlag(QGraphicsItem::GraphicsItemFlag flag).

C++ documentation:

If enabled is true, the item flag flag is enabled; otherwise, it is disabled.

See also flags() and setFlags().

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

Sets the item flags to flags. All flags in flags are enabled; all flags not in flags are disabled.

Calls C++ function: void QGraphicsItem::setFlags(QFlags<QGraphicsItem::GraphicsItemFlag> flags).

C++ documentation:

Sets the item flags to flags. All flags in flags are enabled; all flags not in flags are disabled.

If the item had focus and flags does not enable ItemIsFocusable, the item loses focus as a result of calling this function. Similarly, if the item was selected, and flags does not enabled ItemIsSelectable, the item is automatically unselected.

By default, no flags are enabled. (QGraphicsWidget enables the ItemSendsGeometryChanges flag by default in order to track position changes.)

See also flags() and setFlag().

pub unsafe fn set_focus_1a(&self, focus_reason: FocusReason)[src]

Gives keyboard input focus to this item. The focusReason argument will be passed into any focus event generated by this function; it is used to give an explanation of what caused the item to get focus.

Calls C++ function: void QGraphicsItem::setFocus(Qt::FocusReason focusReason = …).

C++ documentation:

Gives keyboard input focus to this item. The focusReason argument will be passed into any focus event generated by this function; it is used to give an explanation of what caused the item to get focus.

Only enabled items that set the ItemIsFocusable flag can accept keyboard focus.

If this item is not visible, not active, or not associated with a scene, it will not gain immediate input focus. However, it will be registered as the preferred focus item for its subtree of items, should it later become visible.

As a result of calling this function, this item will receive a focus in event with focusReason. If another item already has focus, that item will first receive a focus out event indicating that it has lost input focus.

See also clearFocus(), hasFocus(), focusItem(), and focusProxy().

pub unsafe fn set_focus_0a(&self)[src]

Gives keyboard input focus to this item. The focusReason argument will be passed into any focus event generated by this function; it is used to give an explanation of what caused the item to get focus.

Calls C++ function: void QGraphicsItem::setFocus().

C++ documentation:

Gives keyboard input focus to this item. The focusReason argument will be passed into any focus event generated by this function; it is used to give an explanation of what caused the item to get focus.

Only enabled items that set the ItemIsFocusable flag can accept keyboard focus.

If this item is not visible, not active, or not associated with a scene, it will not gain immediate input focus. However, it will be registered as the preferred focus item for its subtree of items, should it later become visible.

As a result of calling this function, this item will receive a focus in event with focusReason. If another item already has focus, that item will first receive a focus out event indicating that it has lost input focus.

See also clearFocus(), hasFocus(), focusItem(), and focusProxy().

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

Sets the item's focus proxy to item.

Calls C++ function: void QGraphicsItem::setFocusProxy(QGraphicsItem* item).

C++ documentation:

Sets the item's focus proxy to item.

If an item has a focus proxy, the focus proxy will receive input focus when the item gains input focus. The item itself will still have focus (i.e., hasFocus() will return true), but only the focus proxy will receive the keyboard input.

A focus proxy can itself have a focus proxy, and so on. In such case, keyboard input will be handled by the outermost focus proxy.

The focus proxy item must belong to the same scene as this item.

This function was introduced in Qt 4.6.

See also focusProxy(), setFocus(), and hasFocus().

pub unsafe fn set_graphics_effect(
    &self,
    effect: impl CastInto<Ptr<QGraphicsEffect>>
)
[src]

Sets effect as the item's effect. If there already is an effect installed on this item, QGraphicsItem will delete the existing effect before installing the new effect. You can delete an existing effect by calling setGraphicsEffect(0).

Calls C++ function: void QGraphicsItem::setGraphicsEffect(QGraphicsEffect* effect).

C++ documentation:

Sets effect as the item's effect. If there already is an effect installed on this item, QGraphicsItem will delete the existing effect before installing the new effect. You can delete an existing effect by calling setGraphicsEffect(0).

If effect is the installed effect on a different item, setGraphicsEffect() will remove the effect from the item and install it on this item.

QGraphicsItem takes ownership of effect.

Note: This function will apply the effect on itself and all its children.

This function was introduced in Qt 4.6.

See also graphicsEffect().

pub unsafe fn set_group(&self, group: impl CastInto<Ptr<QGraphicsItemGroup>>)[src]

Adds this item to the item group group. If group is 0, this item is removed from any current group and added as a child of the previous group's parent.

Calls C++ function: void QGraphicsItem::setGroup(QGraphicsItemGroup* group).

C++ documentation:

Adds this item to the item group group. If group is 0, this item is removed from any current group and added as a child of the previous group's parent.

See also group() and QGraphicsScene::createItemGroup().

pub unsafe fn set_handles_child_events(&self, enabled: bool)[src]

If enabled is true, this item is set to handle all events for all its children (i.e., all events intented for any of its children are instead sent to this item); otherwise, if enabled is false, this item will only handle its own events. The default value is false.

Calls C++ function: void QGraphicsItem::setHandlesChildEvents(bool enabled).

C++ documentation:

If enabled is true, this item is set to handle all events for all its children (i.e., all events intented for any of its children are instead sent to this item); otherwise, if enabled is false, this item will only handle its own events. The default value is false.

This property is useful for item groups; it allows one item to handle events on behalf of its children, as opposed to its children handling their events individually.

If a child item accepts hover events, its parent will receive hover move events as the cursor passes through the child, but it does not receive hover enter and hover leave events on behalf of its child.

See also handlesChildEvents().

pub unsafe fn set_input_method_hints(&self, hints: QFlags<InputMethodHint>)[src]

Sets the current input method hints of this item to hints.

Calls C++ function: void QGraphicsItem::setInputMethodHints(QFlags<Qt::InputMethodHint> hints).

C++ documentation:

Sets the current input method hints of this item to hints.

This function was introduced in Qt 4.6.

See also inputMethodHints() and inputMethodQuery().

pub unsafe fn set_matrix_2a(
    &self,
    matrix: impl CastInto<Ref<QMatrix>>,
    combine: bool
)
[src]

Sets the item's affine transformation matrix. This is a subset or the item's full transformation matrix, and might not represent the item's full transformation.

Calls C++ function: void QGraphicsItem::setMatrix(const QMatrix& matrix, bool combine = …).

C++ documentation:

Sets the item's affine transformation matrix. This is a subset or the item's full transformation matrix, and might not represent the item's full transformation.

Use setTransform() instead.

See also matrix(), transform(), and The Graphics View Coordinate System.

pub unsafe fn set_matrix_1a(&self, matrix: impl CastInto<Ref<QMatrix>>)[src]

Sets the item's affine transformation matrix. This is a subset or the item's full transformation matrix, and might not represent the item's full transformation.

Calls C++ function: void QGraphicsItem::setMatrix(const QMatrix& matrix).

C++ documentation:

Sets the item's affine transformation matrix. This is a subset or the item's full transformation matrix, and might not represent the item's full transformation.

Use setTransform() instead.

See also matrix(), transform(), and The Graphics View Coordinate System.

pub unsafe fn set_opacity(&self, opacity: c_double)[src]

Sets this item's local opacity, between 0.0 (transparent) and 1.0 (opaque). The item's local opacity is combined with parent and ancestor opacities into the effectiveOpacity().

Calls C++ function: void QGraphicsItem::setOpacity(double opacity).

C++ documentation:

Sets this item's local opacity, between 0.0 (transparent) and 1.0 (opaque). The item's local opacity is combined with parent and ancestor opacities into the effectiveOpacity().

By default, opacity propagates from parent to child, so if a parent's opacity is 0.5 and the child is also 0.5, the child's effective opacity will be 0.25.

The opacity property decides the state of the painter passed to the paint() function. If the item is cached, i.e., ItemCoordinateCache or DeviceCoordinateCache, the effective property will be applied to the item's cache as it is rendered.

There are two item flags that affect how the item's opacity is combined with the parent: ItemIgnoresParentOpacity and ItemDoesntPropagateOpacityToChildren.

Note: Setting the opacity of an item to 0 will not make the item invisible (according to isVisible()), but the item will be treated like an invisible one. See the documentation of setVisible() for more information.

This function was introduced in Qt 4.5.

See also opacity(), effectiveOpacity(), and setVisible().

pub unsafe fn set_panel_modality(&self, panel_modality: PanelModality)[src]

Sets the modality for this item to panelModality.

Calls C++ function: void QGraphicsItem::setPanelModality(QGraphicsItem::PanelModality panelModality).

C++ documentation:

Sets the modality for this item to panelModality.

Changing the modality of a visible item takes effect immediately.

This function was introduced in Qt 4.6.

See also panelModality().

pub unsafe fn set_parent_item(&self, parent: impl CastInto<Ptr<QGraphicsItem>>)[src]

Sets this item's parent item to newParent. If this item already has a parent, it is first removed from the previous parent. If newParent is 0, this item will become a top-level item.

Calls C++ function: void QGraphicsItem::setParentItem(QGraphicsItem* parent).

C++ documentation:

Sets this item's parent item to newParent. If this item already has a parent, it is first removed from the previous parent. If newParent is 0, this item will become a top-level item.

Note that this implicitly adds this graphics item to the scene of the parent. You should not add the item to the scene yourself.

The behavior when calling this function on an item that is an ancestor of newParent is undefined.

See also parentItem() and childItems().

pub unsafe fn set_pos_1a(&self, pos: impl CastInto<Ref<QPointF>>)[src]

Sets the position of the item to pos, which is in parent coordinates. For items with no parent, pos is in scene coordinates.

Calls C++ function: void QGraphicsItem::setPos(const QPointF& pos).

C++ documentation:

Sets the position of the item to pos, which is in parent coordinates. For items with no parent, pos is in scene coordinates.

The position of the item describes its origin (local coordinate (0, 0)) in parent coordinates.

See also pos(), scenePos(), and The Graphics View Coordinate System.

pub unsafe fn set_pos_2a(&self, x: c_double, y: c_double)[src]

This is an overloaded function.

Calls C++ function: void QGraphicsItem::setPos(double x, double y).

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling setPos(QPointF(x, y)).

pub unsafe fn set_rotation(&self, angle: c_double)[src]

Sets the clockwise rotation angle, in degrees, around the Z axis. The default value is 0 (i.e., the item is not rotated). Assigning a negative value will rotate the item counter-clockwise. Normally the rotation angle is in the range (-360, 360), but it's also possible to assign values outside of this range (e.g., a rotation of 370 degrees is the same as a rotation of 10 degrees).

Calls C++ function: void QGraphicsItem::setRotation(double angle).

C++ documentation:

Sets the clockwise rotation angle, in degrees, around the Z axis. The default value is 0 (i.e., the item is not rotated). Assigning a negative value will rotate the item counter-clockwise. Normally the rotation angle is in the range (-360, 360), but it's also possible to assign values outside of this range (e.g., a rotation of 370 degrees is the same as a rotation of 10 degrees).

The item is rotated around its transform origin point, which by default is (0, 0). You can select a different transformation origin by calling setTransformOriginPoint().

The rotation is combined with the item's scale(), transform() and transformations() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also rotation(), setTransformOriginPoint(), and Transformations.

pub unsafe fn set_scale(&self, scale: c_double)[src]

Sets the scale factor of the item. The default scale factor is 1.0 (i.e., the item is not scaled). A scale factor of 0.0 will collapse the item to a single point. If you provide a negative scale factor, the item will be flipped and mirrored (i.e., rotated 180 degrees).

Calls C++ function: void QGraphicsItem::setScale(double scale).

C++ documentation:

Sets the scale factor of the item. The default scale factor is 1.0 (i.e., the item is not scaled). A scale factor of 0.0 will collapse the item to a single point. If you provide a negative scale factor, the item will be flipped and mirrored (i.e., rotated 180 degrees).

The item is scaled around its transform origin point, which by default is (0, 0). You can select a different transformation origin by calling setTransformOriginPoint().

The scale is combined with the item's rotation(), transform() and transformations() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also scale(), setTransformOriginPoint(), and Transformations Example.

pub unsafe fn set_selected(&self, selected: bool)[src]

If selected is true and this item is selectable, this item is selected; otherwise, it is unselected.

Calls C++ function: void QGraphicsItem::setSelected(bool selected).

C++ documentation:

If selected is true and this item is selectable, this item is selected; otherwise, it is unselected.

If the item is in a group, the whole group's selected state is toggled by this function. If the group is selected, all items in the group are also selected, and if the group is not selected, no item in the group is selected.

Only visible, enabled, selectable items can be selected. If selected is true and this item is either invisible or disabled or unselectable, this function does nothing.

By default, items cannot be selected. To enable selection, set the ItemIsSelectable flag.

This function is provided for convenience, allowing individual toggling of the selected state of an item. However, a more common way of selecting items is to call QGraphicsScene::setSelectionArea(), which will call this function for all visible, enabled, and selectable items within a specified area on the scene.

See also isSelected() and QGraphicsScene::selectedItems().

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

Sets the item's tool tip to toolTip. If toolTip is empty, the item's tool tip is cleared.

Calls C++ function: void QGraphicsItem::setToolTip(const QString& toolTip).

C++ documentation:

Sets the item's tool tip to toolTip. If toolTip is empty, the item's tool tip is cleared.

See also toolTip() and QToolTip.

pub unsafe fn set_transform_2a(
    &self,
    matrix: impl CastInto<Ref<QTransform>>,
    combine: bool
)
[src]

Sets the item's current transformation matrix to matrix.

Calls C++ function: void QGraphicsItem::setTransform(const QTransform& matrix, bool combine = …).

C++ documentation:

Sets the item's current transformation matrix to matrix.

If combine is true, then matrix is combined with the current matrix; otherwise, matrix replaces the current matrix. combine is false by default.

To simplify interaction with items using a transformed view, QGraphicsItem provides mapTo... and mapFrom... functions that can translate between items' and the scene's coordinates. For example, you can call mapToScene() to map an item coordiate to a scene coordinate, or mapFromScene() to map from scene coordinates to item coordinates.

The transformation matrix is combined with the item's rotation(), scale() and transformations() into a combined transformation that maps the item's coordinate system to its parent.

This function was introduced in Qt 4.3.

See also transform(), setRotation(), setScale(), setTransformOriginPoint(), The Graphics View Coordinate System, and Transformations.

pub unsafe fn set_transform_1a(&self, matrix: impl CastInto<Ref<QTransform>>)[src]

Sets the item's current transformation matrix to matrix.

Calls C++ function: void QGraphicsItem::setTransform(const QTransform& matrix).

C++ documentation:

Sets the item's current transformation matrix to matrix.

If combine is true, then matrix is combined with the current matrix; otherwise, matrix replaces the current matrix. combine is false by default.

To simplify interaction with items using a transformed view, QGraphicsItem provides mapTo... and mapFrom... functions that can translate between items' and the scene's coordinates. For example, you can call mapToScene() to map an item coordiate to a scene coordinate, or mapFromScene() to map from scene coordinates to item coordinates.

The transformation matrix is combined with the item's rotation(), scale() and transformations() into a combined transformation that maps the item's coordinate system to its parent.

This function was introduced in Qt 4.3.

See also transform(), setRotation(), setScale(), setTransformOriginPoint(), The Graphics View Coordinate System, and Transformations.

pub unsafe fn set_transform_origin_point_1a(
    &self,
    origin: impl CastInto<Ref<QPointF>>
)
[src]

Sets the origin point for the transformation in item coordinates.

Calls C++ function: void QGraphicsItem::setTransformOriginPoint(const QPointF& origin).

C++ documentation:

Sets the origin point for the transformation in item coordinates.

This function was introduced in Qt 4.6.

See also transformOriginPoint() and Transformations.

pub unsafe fn set_transform_origin_point_2a(&self, ax: c_double, ay: c_double)[src]

This is an overloaded function.

Calls C++ function: void QGraphicsItem::setTransformOriginPoint(double ax, double ay).

C++ documentation:

This is an overloaded function.

Sets the origin point for the transformation in item coordinates. This is equivalent to calling setTransformOriginPoint(QPointF(x, y)).

This function was introduced in Qt 4.6.

See also setTransformOriginPoint() and Transformations.

pub unsafe fn set_transformations(
    &self,
    transformations: impl CastInto<Ref<QListOfQGraphicsTransform>>
)
[src]

Sets a list of graphics transformations (QGraphicsTransform) that currently apply to this item.

Calls C++ function: void QGraphicsItem::setTransformations(const QList<QGraphicsTransform*>& transformations).

C++ documentation:

Sets a list of graphics transformations (QGraphicsTransform) that currently apply to this item.

If all you want is to rotate or scale an item, you should call setRotation() or setScale() instead. If you want to set an arbitrary transformation on an item, you can call setTransform().

QGraphicsTransform is for applying and controlling a chain of individual transformation operations on an item. It's particularly useful in animations, where each transform operation needs to be interpolated independently, or differently.

The transformations are combined with the item's rotation(), scale() and transform() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also transformations(), scale(), setTransformOriginPoint(), and Transformations.

pub unsafe fn set_visible(&self, visible: bool)[src]

If visible is true, the item is made visible. Otherwise, the item is made invisible. Invisible items are not painted, nor do they receive any events. In particular, mouse events pass right through invisible items, and are delivered to any item that may be behind. Invisible items are also unselectable, they cannot take input focus, and are not detected by QGraphicsScene's item location functions.

Calls C++ function: void QGraphicsItem::setVisible(bool visible).

C++ documentation:

If visible is true, the item is made visible. Otherwise, the item is made invisible. Invisible items are not painted, nor do they receive any events. In particular, mouse events pass right through invisible items, and are delivered to any item that may be behind. Invisible items are also unselectable, they cannot take input focus, and are not detected by QGraphicsScene's item location functions.

If an item becomes invisible while grabbing the mouse, (i.e., while it is receiving mouse events,) it will automatically lose the mouse grab, and the grab is not regained by making the item visible again; it must receive a new mouse press to regain the mouse grab.

Similarly, an invisible item cannot have focus, so if the item has focus when it becomes invisible, it will lose focus, and the focus is not regained by simply making the item visible again.

If you hide a parent item, all its children will also be hidden. If you show a parent item, all children will be shown, unless they have been explicitly hidden (i.e., if you call setVisible(false) on a child, it will not be reshown even if its parent is hidden, and then shown again).

Items are visible by default; it is unnecessary to call setVisible() on a new item.

Note: An item with opacity set to 0 will still be considered visible, although it will be treated like an invisible item: mouse events will pass through it, it will not be included in the items returned by QGraphicsView::items(), and so on. However, the item will retain the focus.

See also isVisible(), show(), hide(), and setOpacity().

pub unsafe fn set_x(&self, x: c_double)[src]

Set's the x coordinate of the item's position. Equivalent to calling setPos(x, y()).

Calls C++ function: void QGraphicsItem::setX(double x).

C++ documentation:

Set's the x coordinate of the item's position. Equivalent to calling setPos(x, y()).

This function was introduced in Qt 4.6.

See also x() and setPos().

pub unsafe fn set_y(&self, y: c_double)[src]

Set's the y coordinate of the item's position. Equivalent to calling setPos(x(), y).

Calls C++ function: void QGraphicsItem::setY(double y).

C++ documentation:

Set's the y coordinate of the item's position. Equivalent to calling setPos(x(), y).

This function was introduced in Qt 4.6.

See also y(), x(), and setPos().

pub unsafe fn set_z_value(&self, z: c_double)[src]

Sets the Z-value of the item to z. The Z value decides the stacking order of sibling (neighboring) items. A sibling item of high Z value will always be drawn on top of another sibling item with a lower Z value.

Calls C++ function: void QGraphicsItem::setZValue(double z).

C++ documentation:

Sets the Z-value of the item to z. The Z value decides the stacking order of sibling (neighboring) items. A sibling item of high Z value will always be drawn on top of another sibling item with a lower Z value.

If you restore the Z value, the item's insertion order will decide its stacking order.

The Z-value does not affect the item's size in any way.

The default Z-value is 0.

See also zValue(), Sorting, stackBefore(), and ItemStacksBehindParent.

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

Returns the shape of this item as a QPainterPath in local coordinates. The shape is used for many things, including collision detection, hit tests, and for the QGraphicsScene::items() functions.

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

C++ documentation:

Returns the shape of this item as a QPainterPath in local coordinates. The shape is used for many things, including collision detection, hit tests, and for the QGraphicsScene::items() functions.

The default implementation calls boundingRect() to return a simple rectangular shape, but subclasses can reimplement this function to return a more accurate shape for non-rectangular items. For example, a round item may choose to return an elliptic shape for better collision detection. For example:

QPainterPath RoundItem::shape() const { QPainterPath path; path.addEllipse(boundingRect()); return path; }

The outline of a shape can vary depending on the width and style of the pen used when drawing. If you want to include this outline in the item's shape, you can create a shape from the stroke using QPainterPathStroker.

This function is called by the default implementations of contains() and collidesWithPath().

See also boundingRect(), contains(), prepareGeometryChange(), and QPainterPathStroker.

pub unsafe fn show(&self)[src]

Shows the item (items are visible by default).

Calls C++ function: void QGraphicsItem::show().

C++ documentation:

Shows the item (items are visible by default).

This convenience function is equivalent to calling setVisible(true).

See also hide() and setVisible().

pub unsafe fn stack_before(&self, sibling: impl CastInto<Ptr<QGraphicsItem>>)[src]

Stacks this item before sibling, which must be a sibling item (i.e., the two items must share the same parent item, or must both be toplevel items). The sibling must have the same Z value as this item, otherwise calling this function will have no effect.

Calls C++ function: void QGraphicsItem::stackBefore(const QGraphicsItem* sibling).

C++ documentation:

Stacks this item before sibling, which must be a sibling item (i.e., the two items must share the same parent item, or must both be toplevel items). The sibling must have the same Z value as this item, otherwise calling this function will have no effect.

By default, all sibling items are stacked by insertion order (i.e., the first item you add is drawn before the next item you add). If two items' Z values are different, then the item with the highest Z value is drawn on top. When the Z values are the same, the insertion order will decide the stacking order.

This function was introduced in Qt 4.6.

See also setZValue(), ItemStacksBehindParent, and Sorting.

pub unsafe fn to_graphics_object_mut(&self) -> QPtr<QGraphicsObject>[src]

Return the graphics item cast to a QGraphicsObject, if the class is actually a graphics object, 0 otherwise.

Calls C++ function: QGraphicsObject* QGraphicsItem::toGraphicsObject().

C++ documentation:

Return the graphics item cast to a QGraphicsObject, if the class is actually a graphics object, 0 otherwise.

This function was introduced in Qt 4.6.

pub unsafe fn to_graphics_object(&self) -> QPtr<QGraphicsObject>[src]

Return the graphics item cast to a QGraphicsObject, if the class is actually a graphics object, 0 otherwise.

Calls C++ function: const QGraphicsObject* QGraphicsItem::toGraphicsObject() const.

C++ documentation:

Return the graphics item cast to a QGraphicsObject, if the class is actually a graphics object, 0 otherwise.

This function was introduced in Qt 4.6.

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

Returns the item's tool tip, or an empty QString if no tool tip has been set.

Calls C++ function: QString QGraphicsItem::toolTip() const.

C++ documentation:

Returns the item's tool tip, or an empty QString if no tool tip has been set.

See also setToolTip() and QToolTip.

pub unsafe fn top_level_item(&self) -> Ptr<QGraphicsItem>[src]

Returns this item's top-level item. The top-level item is the item's topmost ancestor item whose parent is 0. If an item has no parent, its own pointer is returned (i.e., a top-level item is its own top-level item).

Calls C++ function: QGraphicsItem* QGraphicsItem::topLevelItem() const.

C++ documentation:

Returns this item's top-level item. The top-level item is the item's topmost ancestor item whose parent is 0. If an item has no parent, its own pointer is returned (i.e., a top-level item is its own top-level item).

See also parentItem().

pub unsafe fn top_level_widget(&self) -> QPtr<QGraphicsWidget>[src]

Returns a pointer to the item's top level widget (i.e., the item's ancestor whose parent is 0, or whose parent is not a widget), or 0 if this item does not have a top level widget. If the item is its own top level widget, this function returns a pointer to the item itself.

Calls C++ function: QGraphicsWidget* QGraphicsItem::topLevelWidget() const.

C++ documentation:

Returns a pointer to the item's top level widget (i.e., the item's ancestor whose parent is 0, or whose parent is not a widget), or 0 if this item does not have a top level widget. If the item is its own top level widget, this function returns a pointer to the item itself.

This function was introduced in Qt 4.4.

pub unsafe fn transform(&self) -> CppBox<QTransform>[src]

Returns this item's transformation matrix.

Calls C++ function: QTransform QGraphicsItem::transform() const.

C++ documentation:

Returns this item's transformation matrix.

The transformation matrix is combined with the item's rotation(), scale() and transformations() into a combined transformations for the item.

The default transformation matrix is an identity matrix.

This function was introduced in Qt 4.3.

See also setTransform() and sceneTransform().

pub unsafe fn transform_origin_point(&self) -> CppBox<QPointF>[src]

Returns the origin point for the transformation in item coordinates.

Calls C++ function: QPointF QGraphicsItem::transformOriginPoint() const.

C++ documentation:

Returns the origin point for the transformation in item coordinates.

The default is QPointF(0,0).

This function was introduced in Qt 4.6.

See also setTransformOriginPoint() and Transformations.

pub unsafe fn transformations(&self) -> CppBox<QListOfQGraphicsTransform>[src]

Returns a list of graphics transforms that currently apply to this item.

Calls C++ function: QList<QGraphicsTransform*> QGraphicsItem::transformations() const.

C++ documentation:

Returns a list of graphics transforms that currently apply to this item.

QGraphicsTransform is for applying and controlling a chain of individual transformation operations on an item. It's particularly useful in animations, where each transform operation needs to be interpolated independently, or differently.

The transformations are combined with the item's rotation(), scale() and transform() to map the item's coordinate system to the parent item.

This function was introduced in Qt 4.6.

See also setTransformations(), scale(), rotation(), transformOriginPoint(), and Transformations.

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

Returns the type of an item as an int. All standard graphicsitem classes are associated with a unique value; see QGraphicsItem::Type. This type information is used by qgraphicsitem_cast() to distinguish between types.

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

C++ documentation:

Returns the type of an item as an int. All standard graphicsitem classes are associated with a unique value; see QGraphicsItem::Type. This type information is used by qgraphicsitem_cast() to distinguish between types.

The default implementation (in QGraphicsItem) returns UserType.

To enable use of qgraphicsitem_cast() with a custom item, reimplement this function and declare a Type enum value equal to your custom item's type. Custom items must return a value larger than or equal to UserType (65536).

For example:

class CustomItem : public QGraphicsItem { public: enum { Type = UserType + 1 };

int type() const { // Enable the use of qgraphicsitem_cast with this item. return Type; } ... };

See also UserType.

pub unsafe fn ungrab_keyboard(&self)[src]

Releases the keyboard grab.

Calls C++ function: void QGraphicsItem::ungrabKeyboard().

C++ documentation:

Releases the keyboard grab.

This function was introduced in Qt 4.4.

See also grabKeyboard() and ungrabMouse().

pub unsafe fn ungrab_mouse(&self)[src]

Releases the mouse grab.

Calls C++ function: void QGraphicsItem::ungrabMouse().

C++ documentation:

Releases the mouse grab.

This function was introduced in Qt 4.4.

See also grabMouse() and ungrabKeyboard().

pub unsafe fn unset_cursor(&self)[src]

Clears the cursor from this item.

Calls C++ function: void QGraphicsItem::unsetCursor().

C++ documentation:

Clears the cursor from this item.

See also hasCursor() and setCursor().

pub unsafe fn update_1a(&self, rect: impl CastInto<Ref<QRectF>>)[src]

Schedules a redraw of the area covered by rect in this item. You can call this function whenever your item needs to be redrawn, such as if it changes appearance or size.

Calls C++ function: void QGraphicsItem::update(const QRectF& rect = …).

C++ documentation:

Schedules a redraw of the area covered by rect in this item. You can call this function whenever your item needs to be redrawn, such as if it changes appearance or size.

This function does not cause an immediate paint; instead it schedules a paint request that is processed by QGraphicsView after control reaches the event loop. The item will only be redrawn if it is visible in any associated view.

As a side effect of the item being repainted, other items that overlap the area rect may also be repainted.

If the item is invisible (i.e., isVisible() returns false), this function does nothing.

See also paint() and boundingRect().

pub unsafe fn update_4a(
    &self,
    x: c_double,
    y: c_double,
    width: c_double,
    height: c_double
)
[src]

This is an overloaded function.

Calls C++ function: void QGraphicsItem::update(double x, double y, double width, double height).

C++ documentation:

This is an overloaded function.

This convenience function is equivalent to calling update(QRectF(x, y, width, height)).

pub unsafe fn update_0a(&self)[src]

Schedules a redraw of the area covered by rect in this item. You can call this function whenever your item needs to be redrawn, such as if it changes appearance or size.

Calls C++ function: void QGraphicsItem::update().

C++ documentation:

Schedules a redraw of the area covered by rect in this item. You can call this function whenever your item needs to be redrawn, such as if it changes appearance or size.

This function does not cause an immediate paint; instead it schedules a paint request that is processed by QGraphicsView after control reaches the event loop. The item will only be redrawn if it is visible in any associated view.

As a side effect of the item being repainted, other items that overlap the area rect may also be repainted.

If the item is invisible (i.e., isVisible() returns false), this function does nothing.

See also paint() and boundingRect().

pub unsafe fn window(&self) -> QPtr<QGraphicsWidget>[src]

Returns the item's window, or 0 if this item does not have a window. If the item is a window, it will return itself. Otherwise it will return the closest ancestor that is a window.

Calls C++ function: QGraphicsWidget* QGraphicsItem::window() const.

C++ documentation:

Returns the item's window, or 0 if this item does not have a window. If the item is a window, it will return itself. Otherwise it will return the closest ancestor that is a window.

This function was introduced in Qt 4.4.

See also QGraphicsWidget::isWindow().

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

This convenience function is equivalent to calling pos().x().

Calls C++ function: double QGraphicsItem::x() const.

C++ documentation:

This convenience function is equivalent to calling pos().x().

See also setX() and y().

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

This convenience function is equivalent to calling pos().y().

Calls C++ function: double QGraphicsItem::y() const.

C++ documentation:

This convenience function is equivalent to calling pos().y().

See also setY() and x().

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

Returns the Z-value of the item. The Z-value affects the stacking order of sibling (neighboring) items.

Calls C++ function: double QGraphicsItem::zValue() const.

C++ documentation:

Returns the Z-value of the item. The Z-value affects the stacking order of sibling (neighboring) items.

The default Z-value is 0.

See also setZValue(), Sorting, stackBefore(), and ItemStacksBehindParent.

Trait Implementations

impl CppDeletable for QGraphicsItem[src]

unsafe fn delete(&self)[src]

Destroys the QGraphicsItem and all its children. If this item is currently associated with a scene, the item will be removed from the scene before it is deleted.

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

C++ documentation:

Destroys the QGraphicsItem and all its children. If this item is currently associated with a scene, the item will be removed from the scene before it is deleted.

Note: It is more efficient to remove the item from the QGraphicsScene before destroying the item.

impl DynamicCast<QAbstractGraphicsShapeItem> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsEllipseItem> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsItemGroup> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsLineItem> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsObject> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsPathItem> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsPixmapItem> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsPolygonItem> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsProxyWidget> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsRectItem> for QGraphicsItem[src]

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

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

impl DynamicCast<QGraphicsSimpleTextItem> for QGraphicsItem[src]

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

Calls C++ function: QGraphicsSimpleTextItem* dynamic_cast<QGraphicsSimpleTextItem*>(QGraphicsItem* 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 DynamicCast<QGraphicsWidget> for QGraphicsItem[src]

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

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

impl StaticDowncast<QAbstractGraphicsShapeItem> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsEllipseItem> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsItemGroup> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsLineItem> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsObject> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsPathItem> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsPixmapItem> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsPolygonItem> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsProxyWidget> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsRectItem> for QGraphicsItem[src]

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

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

impl StaticDowncast<QGraphicsSimpleTextItem> for QGraphicsItem[src]

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

Calls C++ function: QGraphicsSimpleTextItem* static_cast<QGraphicsSimpleTextItem*>(QGraphicsItem* 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 StaticDowncast<QGraphicsWidget> for QGraphicsItem[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsObject[src]

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

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

impl StaticUpcast<QGraphicsItem> for QAbstractGraphicsShapeItem[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsItemGroup[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsWidget[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsProxyWidget[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsPathItem[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsRectItem[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsEllipseItem[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsPolygonItem[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsLineItem[src]

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

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

impl StaticUpcast<QGraphicsItem> for QGraphicsPixmapItem[src]

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

Calls C++ function: QGraphicsItem* static_cast<QGraphicsItem*>(QGraphicsPixmapItem* 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<QGraphicsItem> for QGraphicsSimpleTextItem[src]

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

Calls C++ function: QGraphicsItem* static_cast<QGraphicsItem*>(QGraphicsSimpleTextItem* 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.