145 #ifndef QT_NO_GRAPHICSVIEW 153 d->layoutPrivate = parentLayout->d_func();
184 d->setSizePolicy(policy);
190 return d->sizePolicy;
208 d->setSpacing(spacing);
231 d->createLayoutEdges();
241 for (
int i =
count() - 1; i >= 0; --i) {
252 d->deleteLayoutEdges();
254 Q_ASSERT(
d->itemCenterConstraints[0].isEmpty());
255 Q_ASSERT(
d->itemCenterConstraints[1].isEmpty());
301 return d->getAnchor(firstItem, firstEdge, secondItem, secondEdge);
336 if (
d->addAnchor(firstItem, firstEdge, secondItem, secondEdge)) {
340 d->addAnchor(firstItem, firstEdge, secondItem, secondEdge);
364 Qt::Orientations orientations)
388 d->spacings[0] = spacing;
401 d->spacings[1] = spacing;
420 d->spacings[0] =
d->spacings[1] = spacing;
456 d->setItemsGeometries(geom);
478 d->removeAnchors(item);
479 d->items.remove(index);
491 return d->items.size();
500 return d->items.value(index);
510 d->calculateGraphCacheDirty =
true;
511 d->styleInfoDirty =
true;
541 return engineSizeHint +
QSizeF(left + right, top + bottom);
545 #endif //QT_NO_GRAPHICSVIEW
void setGeometry(const QRectF &rect)
Reimplemented Function
QGraphicsAnchor(QGraphicsAnchorLayout *parent)
virtual void setGeometry(const QRectF &rect)
This virtual function sets the geometry of the QGraphicsLayoutItem to rect, which is in parent coordi...
QGraphicsAnchorLayout(QGraphicsLayoutItem *parent=0)
Constructs a QGraphicsAnchorLayout instance.
#define QT_END_NAMESPACE
This macro expands to.
void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const
Reimplemented Function
qreal horizontalSpacing() const
Returns the default horizontal spacing for the anchor layout.
void setSpacing(qreal spacing)
Sets the default horizontal and the default vertical spacing for the anchor layout to spacing...
virtual ~QGraphicsAnchorLayout()
Destroys the QGraphicsAnchorLayout object.
The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.
long ASN1_INTEGER_get ASN1_INTEGER * a
void setParentLayoutItem(QGraphicsLayoutItem *parent)
Sets the parent of this QGraphicsLayoutItem to parent.
The QObject class is the base class of all Qt objects.
void setSizePolicy(QSizePolicy::Policy policy)
The QSizeF class defines the size of a two-dimensional object using floating point precision...
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
void addCornerAnchors(QGraphicsLayoutItem *firstItem, Qt::Corner firstCorner, QGraphicsLayoutItem *secondItem, Qt::Corner secondCorner)
Creates two anchors between firstItem and secondItem specified by the corners, firstCorner and second...
virtual void invalidate()
Clears any cached geometry and size hint information in the layout, and posts a LayoutRequest event t...
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
Reimplemented Function
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
void invalidate()
Reimplemented Function
QGraphicsLayoutItem * itemAt(int index) const
Reimplemented Function
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts...
QGraphicsAnchor * addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge)
Creates an anchor between the edge firstEdge of item firstItem and the edge secondEdge of item second...
bool ownedByLayout() const
Returns whether a layout should delete this item in its destructor.
void setSpacing(qreal spacing)
void setVerticalSpacing(qreal spacing)
Sets the default vertical spacing for the anchor layout to spacing.
void addAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem, Qt::Orientations orientations=Qt::Horizontal|Qt::Vertical)
Anchors two or four edges of firstItem with the corresponding edges of secondItem, so that firstItem has the same size as secondItem in the dimensions specified by orientations.
The QGraphicsAnchorLayout class provides a layout where one can anchor widgets together in Graphics V...
QObject * parent() const
Returns a pointer to the parent object.
qreal verticalSpacing() const
Returns the default vertical spacing for the anchor layout.
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
int count() const
Reimplemented Function
void setHorizontalSpacing(qreal spacing)
Sets the default horizontal spacing for the anchor layout to spacing.
QSizePolicy::Policy sizePolicy() const
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
~QGraphicsAnchor()
Removes the QGraphicsAnchor object from the layout and destroys it.
QGraphicsAnchorLayout private methods and attributes.
void removeAt(int index)
Removes the layout item at index without destroying it.
QGraphicsAnchor * anchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge)
Returns the anchor between the anchor points defined by firstItem and firstEdge and secondItem and se...