+QPainterPath AbstractGroupItem::spacerGroupShape(GRAPHICSRECTITEM type, const QPointF &offset) const
+{
+ QPainterPath path;
+ QList<QGraphicsItem *> children = childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ if (children.at(i)->type() == (int)type) {
+ QRectF r(children.at(i)->sceneBoundingRect());
+ r.translate(offset);
+ r.setRight(scene()->width());
+ path.addRect(r);
+ } else if (children.at(i)->type() == GROUPWIDGET) {
+ QList<QGraphicsItem *> subchildren = children.at(i)->childItems();
+ for (int j = 0; j < subchildren.count(); j++) {
+ if (subchildren.at(j)->type() == (int)type) {
+ QRectF r(subchildren.at(j)->sceneBoundingRect());
+ r.translate(offset);
+ r.setRight(scene()->width());
+ path.addRect(r);
+ }
+ }
+ }
+ }
+ return path;
+}
+