QGraphicsObject Class ReferenceThe QGraphicsObject class provides a base class for all graphics items that require signals, slots and properties. More... #include <QGraphicsObject> Inherits: QObject and QGraphicsItem. Inherited by: QDeclarativeItem, QGraphicsSvgItem, QGraphicsTextItem, and QGraphicsWidget. This class was introduced in Qt 4.6. Properties
Public Functions
Signals
Protected Slots
Additional Inherited Members
Detailed DescriptionThe QGraphicsObject class provides a base class for all graphics items that require signals, slots and properties. The class extends a QGraphicsItem with QObject's signal/slot and property mechanisms. It maps many of QGraphicsItem's basic setters and getters to properties and adds notification signals for many of them. Parents and ChildrenEach graphics object can be constructed with a parent item. This ensures that the item will be destroyed when its parent item is destroyed. Although QGraphicsObject inherits from both QObject and QGraphicsItem, you should use the functions provided by QGraphicsItem, not QObject, to manage the relationships between parent and child items. The relationships between items can be explored using the parentItem() and childItems() functions. In the hierarchy of items in a scene, the parentObject() and parentWidget() functions are the equivalent of the QWidget::parent() and QWidget::parentWidget() functions for QWidget subclasses. See also QGraphicsWidget. Property Documentation
|
void | enabledChanged () |
See also QGraphicsItem::isEnabled(), QGraphicsItem::setEnabled(), and QGraphicsObject::enabledChanged().
This property holds the opacity of the item.
Notifier signal:
void | opacityChanged () |
See also QGraphicsItem::setOpacity() and QGraphicsItem::opacity().
This property holds the parent of the item.
Note: The item's parent is set independently of the parent object returned by QObject::parent().
Notifier signal:
void | parentChanged () |
See also QGraphicsItem::setParentItem() and QGraphicsItem::parentObject().
This property holds the position of the item.
Describes the items position.
See also QGraphicsItem::setPos() and QGraphicsItem::pos().
This property holds the rotation of the item in degrees.
This specifies how many degrees to rotate the item around its transformOrigin. The default rotation is 0 degrees (i.e. not rotated at all).
Notifier signal:
void | rotationChanged () |
This property holds the scale of the item.
A scale of less than 1 means the item will be displayed smaller than normal, and a scale of greater than 1 means the item will be displayed larger than normal. A negative scale means the item will be mirrored.
By default, items are displayed at a scale of 1 (i.e. at their normal size).
Scaling is from the item's transformOrigin.
Notifier signal:
void | scaleChanged () |
This property holds the transformation origin.
This property sets a specific point in the items coordiante system as the origin for scale and rotation.
See also scale, rotation, and QGraphicsItem::transformOriginPoint().
This property holds whether the item is visible or not.
This property is declared in QGraphicsItem.
By default, this property is true.
Notifier signal:
void | visibleChanged () |
See also QGraphicsItem::isVisible(), QGraphicsItem::setVisible(), and visibleChanged().
This property holds the x position of the item.
Describes the items x position.
Notifier signal:
void | xChanged () |
See also QGraphicsItem::setX(), setPos(), and xChanged().
This property holds the y position of the item.
Describes the items y position.
Notifier signal:
void | yChanged () |
See also QGraphicsItem::setY(), setPos(), and yChanged().
This property holds the z value of the item.
Describes the items z value.
Notifier signal:
void | zChanged () |
See also QGraphicsItem::setZValue(), zValue(), and zChanged().
Constructs a QGraphicsObject with parent.
This signal gets emitted whenever the item get's enabled or disabled.
See also isEnabled().
Subscribes the graphics object to the given gesture with specific flags.
See also ungrabGesture() and QGestureEvent.
This signal gets emitted whenever the opacity of the item changes
See also QGraphicsItem::opacity().
This signal gets emitted whenever the parent of the item changes
This signal gets emitted whenever the roation of the item changes.
This signal is emitted when the scale of the item changes.
Unsubscribes the graphics object from the given gesture.
See also grabGesture() and QGestureEvent.
Updates the item's micro focus. This is slot for convenience.
This function was introduced in Qt 4.7.
See also QInputContext.
This signal gets emitted whenever the visibility of the item changes
See also visible.
This signal gets emitted whenever the x position of the item changes
See also pos().
This signal gets emitted whenever the y position of the item changes.
See also pos().
This signal gets emitted whenever the z value of the item changes.
See also pos().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.8 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com