44 #ifndef QT_NO_GRAPHICSVIEW 63 for (
int i = 0; i < n; ++i) {
71 l->d_func()->reparentChildItems(newParent);
77 qWarning(
"QGraphicsLayout::addChildLayout: widget %s \"%s\" in wrong parent; moved to correct parent",
81 if (childParent != newParent)
82 itemChild->setParentItem(newParent);
94 if (userMargin >= 0.0) {
103 if (layoutParentItem->isWidget())
112 if (maybeWidget->isWidget())
113 return static_cast<QGraphicsWidget*>(maybeWidget)->layoutDirection();
123 for (
int i = lay->
count() - 1; i >= 0; --i) {
128 }
else if (child == layoutItem) {
154 if (maybeLayout->isLayout())
160 static_cast<QGraphicsLayout*
>(layoutItem)->d_func()->reparentChildItems(parItem);
166 if (oldParent == newParent || !newParent)
170 if (oldParent && item->
isWidget()) {
172 qWarning(
"QGraphicsLayout::addChildLayoutItem: %s \"%s\" in wrong parent; moved to correct parent",
177 item->setParentItem(newParent);
186 if (layout->d_func()->activated) {
194 for (
int i = layout->
count() - 1; i >= 0; --i) {
199 layout->d_func()->activated =
true;
206 #endif //QT_NO_GRAPHICSVIEW virtual void removeAt(int index)=0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to remove the item ...
static Qt::LayoutDirection layoutDirection()
#define QT_END_NAMESPACE
This macro expands to.
QGraphicsItem * graphicsItem() const
Returns the QGraphicsItem that this layout item represents.
void addChildLayoutItem(QGraphicsLayoutItem *item)
This function is called from subclasses to add a layout item layoutItem to a layout.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
bool qt_graphicsLayoutDebug()
PixelMetric
This enum describes the various available pixel metrics.
void reparentChildItems(QGraphicsItem *newParent)
void setParentLayoutItem(QGraphicsLayoutItem *parent)
Sets the parent of this QGraphicsLayoutItem to parent.
virtual void invalidate()
Clears any cached geometry and size hint information in the layout, and posts a LayoutRequest event t...
void activateRecursive(QGraphicsLayoutItem *item)
void getMargin(qreal *result, qreal userMargin, QStyle::PixelMetric pm) const
#define QT_BEGIN_NAMESPACE
This macro expands to.
Q_CORE_EXPORT void qWarning(const char *,...)
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts...
QGraphicsItem * parentItem() const
Returns the parent item of this layout, or 0 if this layout is not installed on any widget...
static bool instantInvalidatePropagation()
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
bool isLayout() const
Returns true if this QGraphicsLayoutItem is a layout (e.g., is inherited by an object that arranges o...
virtual int count() const =0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to return the numbe...
const char * constData() const
Returns a pointer to the data stored in the byte array.
QGraphicsItem * parentItem() const
Returns a pointer to this item's parent item.
Qt::LayoutDirection visualDirection() const
QGraphicsLayoutItem * parentLayoutItem() const
Returns the parent of this QGraphicsLayoutItem, or 0 if there is no parent, or if the parent does not...
QString objectName() const
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
bool isWidget() const
Returns true if this item is a widget (i.
virtual QGraphicsLayoutItem * itemAt(int i) const =0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to return a pointer...
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
static bool removeLayoutItemFromLayout(QGraphicsLayout *lay, QGraphicsLayoutItem *layoutItem)
QGraphicsLayoutItem * parent