15#include <QPainterPath>
26KoShapeContainer::Private::~Private()
47 , d(new
Private(*(rhs.d.data()), this))
54 d->model->deleteOwnedShapes();
72 return d->model->count();
79 d->model->setClipped(child, clipping);
86 d->model->setInheritsTransform(shape, inherit);
93 return d->model->inheritsTransform(shape);
114 d->model->containerChanged(
this, type);
115 Q_FOREACH (
KoShape *shape,
d->model->shapes())
123 return d->model->isClipped(child);
130 Q_FOREACH (
KoShape *shape,
d->model->shapes()) {
141 return d->model->shapes();
161 Q_FOREACH (
KoShape *shape,
d->model->shapes()) {
172 return &
d->shapeInterface;
186 if (shape->
parent() == q && q->
shapes().contains(shape)) {
199 d->model->add(shape);
200 d->model->shapeHasBeenAddedToHierarchy(shape, q);
211 d->model->shapeToBeRemovedFromHierarchy(shape, q);
212 d->model->remove(shape);
virtual void childChanged(KoShape *shape, KoShape::ChangeType type)
void removeShape(KoShape *shape)
bool isClipped(const KoShape *child) const
KoShapeContainer::ShapeInterface shapeInterface
void setModelInit(KoShapeContainerModel *model)
~KoShapeContainer() override
void update() const override
reimplemented
QList< KoShape * > shapes() const
void paint(QPainter &painter) const override
reimplemented
void setModel(KoShapeContainerModel *model)
void addShape(KoShape *shape)
bool inheritsTransform(const KoShape *shape) const
KoShapeContainerModel * model
void setInheritsTransform(const KoShape *shape, bool inherit)
KoShapeContainer(KoShapeContainerModel *model=0)
QScopedPointer< Private > d
void setClipped(const KoShape *child, bool clipping)
virtual void paintComponent(QPainter &painter) const =0
Paint the component Implement this method to allow the shape to paint itself, just like the KoShape::...
void shapeChanged(ChangeType type, KoShape *shape=0) override
virtual void update() const
KoShapeContainer * parent() const
ChangeType
Used by shapeChanged() to select which change was made.
@ RotationChanged
used after a setRotation()
@ PositionChanged
used after a setPosition()
@ ShearChanged
used after a shear()
@ ChildChanged
a child of a container was changed/removed. This is propagated to all parents
@ ScaleChanged
used after a scale()
@ SizeChanged
used after a setSize()
@ GenericMatrixChange
used after the matrix was changed without knowing which property explicitly changed
void setParent(KoShapeContainer *parent)
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
void removeShape(KoShape *shape)
void addShape(KoShape *shape)
ShapeInterface(KoShapeContainer *_q)