44 #include "../qmlinspectorconstants.h" 45 #include "../qdeclarativeviewinspector.h" 47 #include <QtGui/QPolygonF> 54 m_inspector(inspector),
77 if (oldRect.
top() < newRect.
top())
112 if (prevItem == item && prevItem != 0) {
118 borderRect.
adjust(-1, -1, 1, 1);
The QVariant class acts like a union for the most common Qt data types.
The QColor class provides colors based on RGB, HSV or CMYK values.
qreal right() const
Returns the x-coordinate of the rectangle's right edge.
QPointF mapToScene(const QPoint &point) const
Returns the viewport coordinate point mapped to scene coordinates.
The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.
QRectF childrenBoundingRect() const
Returns the bounding rect of this item's descendants (i.e., its children, their children, etc.) in local coordinates.
QDeclarativeView * declarativeView() const
void setLeft(qreal pos)
Sets the left edge of the rectangle to the given x coordinate.
SubcomponentMaskLayerItem(QDeclarativeViewInspector *inspector, QGraphicsItem *parentItem=0)
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
static QPolygonF regionToPolygon(const QRegion ®ion)
virtual QRectF boundingRect() const =0
This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be ...
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
qreal left() const
Returns the x-coordinate of the rectangle's left edge.
void setTop(qreal pos)
Sets the top edge of the rectangle to the given y coordinate.
void setBottom(qreal pos)
Sets the bottom edge of the rectangle to the given y coordinate.
QRectF mapRectToScene(const QRectF &rect) const
Maps the rectangle rect, which is in this item's coordinate system, to the scene coordinate system...
The QGraphicsPolygonItem class provides a polygon item that you can add to a QGraphicsScene.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
void setRight(qreal pos)
Sets the right edge of the rectangle to the given x coordinate.
void setCurrentItem(QGraphicsItem *item)
The QRectF class defines a rectangle in the plane using floating point precision. ...
QPolygonF toFillPolygon(const QMatrix &matrix=QMatrix()) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QPolygonF class provides a vector of points using floating point precision.
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.
QGraphicsItem * m_currentItem
void addRect(const QRectF &rect)
Adds the given rectangle to this path as a closed subpath.
The QRegion class specifies a clip region for a painter.
int type() const
Reimplemented Function
QRect toRect() const
Returns a QRect based on the values of this rectangle.
QGraphicsItem * currentItem() const
The QBrush class defines the fill pattern of shapes drawn by QPainter.
void adjust(qreal x1, qreal y1, qreal x2, qreal y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
void setPolygon(const QPolygonF &polygon)
Sets the item's polygon to be the given polygon.
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
The QRect class defines a rectangle in the plane using integer precision.
void setRect(const QRectF &rect)
Sets the item's rectangle to be the given rectangle.
qreal top() const
Returns the y-coordinate of the rectangle's top edge.
qreal bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
static const int EditorItemDataKey
QRegion subtracted(const QRegion &r) const
Returns a region which is r subtracted from this region.
static QRectF resizeRect(const QRectF &newRect, const QRectF &oldRect)
QGraphicsRectItem * m_borderRect
void setBrush(const QBrush &brush)
Sets the item's brush to brush.
QDeclarativeViewInspector * m_inspector