44 #include "../qdeclarativeviewinspector_p.h" 45 #include "../qmlinspectorconstants.h" 47 #include <QtGui/QGraphicsRectItem> 48 #include <QtGui/QGraphicsObject> 49 #include <QtGui/QGraphicsScene> 56 : m_layerItem(layerItem)
57 , m_view(viewInspector)
111 selectionIndicator->
setRect(boundingRectInLayerItemSpace);
The QColor class provides colors based on RGB, HSV or CMYK values.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items...
The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.
QHash< QGraphicsItem *, QGraphicsRectItem * > m_indicatorShapeHash
void clear()
Removes all items from the hash.
virtual QRectF boundingRect() const =0
This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be ...
void setItems(const QList< QWeakPointer< QGraphicsObject > > &itemList)
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
QWeakPointer< QGraphicsObject > m_layerItem
QRectF mapRectToScene(const QRectF &rect) const
Maps the rectangle rect, which is in this item's coordinate system, to the scene coordinate system...
bool isNull() const
Returns true if this object is holding a reference to a null pointer.
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
QDeclarativeViewInspector * m_view
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
static const QRectF boundingRect(const QPointF *points, int pointCount)
The QRectF class defines a rectangle in the plane using floating point precision. ...
QRectF mapRectFromScene(const QRectF &rect) const
Maps the rectangle rect, which is in scene coordinates, to this item's coordinate system...
void removeItem(QGraphicsItem *item)
Removes the item item and all its children from the scene.
QVariant data(int key) const
Returns this item's custom data for the key key as a QVariant.
void setData(int key, const QVariant &value)
Sets this item's custom data for the key key to value.
void setPen(const QPen &pen)
Sets the pen for this item to pen.
QRectF adjustToScreenBoundaries(const QRectF &boundingRectInSceneSpace)
void hide()
Hides the item.
void setRect(const QRectF &rect)
Sets the item's rectangle to be the given rectangle.
QGraphicsScene * scene() const
Returns the current scene for the item, or 0 if the item is not stored in a scene.
static const int EditorItemDataKey
The QGraphicsObject class provides a base class for all graphics items that require signals...
void setFlag(GraphicsItemFlag flag, bool enabled=true)
If enabled is true, the item flag flag is enabled; otherwise, it is disabled.
~LiveSelectionIndicator()
LiveSelectionIndicator(QDeclarativeViewInspector *viewInspector, QGraphicsObject *layerItem)
static bool isNull(const QVariant::Private *d)
The QList class is a template class that provides lists.
void show()
Shows the item.