133 if (!
d->sizeCached) {
138 d->savedOutlineRect = bound;
140 d->sizeCached =
true;
152 QSizeF oldSize = this->
size();
153 if (!
shapeCount() || oldSize.isNull())
return;
155 const QTransform
scale =
156 QTransform::fromScale(
size.width() / oldSize.width(),
size.height() / oldSize.height());
166 return d->savedOutlineRect;
197 d->sizeCached =
false;
virtual void childChanged(KoShape *shape, KoShape::ChangeType type)
void setModelInit(KoShapeContainerModel *model)
QList< KoShape * > shapes() const
KoShapeContainerModel * model
void shapeChanged(ChangeType type, KoShape *shape=0) override
virtual ~Private()=default
void shapeChanged(ChangeType type, KoShape *shape=0) override
void tryUpdateCachedSize() const
QSizeF size() const override
Get the size of the shape in pt.
QRectF outlineRect() const override
KoShapeGroup()
Constructor.
void setSize(const QSizeF &size) override
Resize the shape.
~KoShapeGroup() override
destructor
QScopedPointer< Private > d
void paintComponent(QPainter &painter) const override
This implementation is empty since a group is itself not visible.
QRectF boundingRect() const override
a group's boundingRect
bool hitTest(const QPointF &position) const override
always returns false since the group itself can't be selected or hit
void invalidateSizeCache()
Invalidate the size cache of the group.
KoShape * cloneShape() const override
creates a deep copy of the shape or shape's subtree
friend class ShapeGroupContainerModel
void insets(KoInsets &insets) const
Fills the insets object with the space the shadow takes around a shape.
virtual QSizeF size() const
Get the size of the shape in pt.
virtual QRectF outlineRect() const
void setSizeImpl(const QSizeF &size) const
virtual QRectF boundingRect() const
Get the bounding box of the shape.
void setTransformation(const QTransform &matrix)
KoShapeShadow * shadow() const
Returns the currently set shadow or 0 if there is no shadow set.
ChangeType
Used by shapeChanged() to select which change was made.
@ RotationChanged
used after a setRotation()
@ StrokeChanged
the shapes stroke has changed
@ PositionChanged
used after a setPosition()
@ ClipPathChanged
the shapes clip path has changed
@ ShearChanged
used after a shear()
@ ClipMaskChanged
the shapes clip path has changed
@ ParameterChanged
the shapes parameter has changed (KoParameterShape only)
@ ScaleChanged
used after a scale()
@ SizeChanged
used after a setSize()
@ GenericMatrixChange
used after the matrix was changed without knowing which property explicitly changed
void scale(qreal sx, qreal sy)
Scale the shape using the zero-point which is the top-left corner.
QTransform transformation() const
Returns the shapes local transformation matrix.
virtual void setSize(const QSizeF &size)
Resize the shape.
QPointF position() const
Get the position of the shape in pt.
ShapeGroupContainerModel(KoShapeGroup *group)
void add(KoShape *child) override
void childChanged(KoShape *shape, KoShape::ChangeType type) override
ShapeGroupContainerModel(const ShapeGroupContainerModel &rhs, KoShapeGroup *group)
~ShapeGroupContainerModel() override
void remove(KoShape *child) override
void add(KoShape *child) override
void remove(KoShape *shape) override
#define KIS_ASSERT_RECOVER_RETURN(cond)
qreal bottom
Bottom inset.