Krita Source Code Documentation
Loading...
Searching...
No Matches
ShapeGroupContainerModel Class Reference
+ Inheritance diagram for ShapeGroupContainerModel:

Public Member Functions

void add (KoShape *child) override
 
void childChanged (KoShape *shape, KoShape::ChangeType type) override
 
void remove (KoShape *child) override
 
 ShapeGroupContainerModel (const ShapeGroupContainerModel &rhs, KoShapeGroup *group)
 
 ShapeGroupContainerModel (KoShapeGroup *group)
 
 ~ShapeGroupContainerModel () override
 
- Public Member Functions inherited from SimpleShapeContainerModel
void add (KoShape *child) override
 
KoShapeManagerassociatedRootShapeManager () const
 
void containerChanged (KoShapeContainer *, KoShape::ChangeType) override
 
int count () const override
 
bool inheritsTransform (const KoShape *shape) const override
 
bool isClipped (const KoShape *shape) const override
 
void proposeMove (KoShape *shape, QPointF &move) override
 
void remove (KoShape *shape) override
 
void setAssociatedRootShapeManager (KoShapeManager *manager)
 
void setClipped (const KoShape *shape, bool value) override
 
void setInheritsTransform (const KoShape *shape, bool value) override
 
void shapeHasBeenAddedToHierarchy (KoShape *shape, KoShapeContainer *addedToSubtree) override
 
QList< KoShape * > shapes () const override
 
void shapeToBeRemovedFromHierarchy (KoShape *shape, KoShapeContainer *removedFromSubtree) override
 
 SimpleShapeContainerModel ()
 
 SimpleShapeContainerModel (const SimpleShapeContainerModel &rhs)
 
 ~SimpleShapeContainerModel () override
 
- Public Member Functions inherited from KoShapeContainerModel
void deleteOwnedShapes ()
 
 KoShapeContainerModel ()
 default constructor
 
virtual ~KoShapeContainerModel ()
 destructor
 

Private Attributes

KoShapeGroupm_group
 

Additional Inherited Members

- Protected Member Functions inherited from KoShapeContainerModel
 KoShapeContainerModel (const KoShapeContainerModel &rhs)
 

Detailed Description

Definition at line 25 of file KoShapeGroup.cpp.

Constructor & Destructor Documentation

◆ ShapeGroupContainerModel() [1/2]

ShapeGroupContainerModel::ShapeGroupContainerModel ( KoShapeGroup * group)
inline

Definition at line 28 of file KoShapeGroup.cpp.

28: m_group(group) {}

◆ ~ShapeGroupContainerModel()

ShapeGroupContainerModel::~ShapeGroupContainerModel ( )
inlineoverride

Definition at line 29 of file KoShapeGroup.cpp.

29{}

◆ ShapeGroupContainerModel() [2/2]

ShapeGroupContainerModel::ShapeGroupContainerModel ( const ShapeGroupContainerModel & rhs,
KoShapeGroup * group )
inline

Definition at line 31 of file KoShapeGroup.cpp.

Member Function Documentation

◆ add()

void ShapeGroupContainerModel::add ( KoShape * shape)
inlineoverridevirtual

Add a shape to this models store.

Parameters
shapethe shape to be managed in the container.

Implements KoShapeContainerModel.

Definition at line 37 of file KoShapeGroup.cpp.

38 {
41 }
void invalidateSizeCache()
Invalidate the size cache of the group.
void add(KoShape *child) override

References SimpleShapeContainerModel::add(), KoShapeGroup::invalidateSizeCache(), and m_group.

◆ childChanged()

void ShapeGroupContainerModel::childChanged ( KoShape * shape,
KoShape::ChangeType type )
inlineoverridevirtual

This method is called when one of the shape shapes has been modified. When a shape is rotated, moved or scaled/skewed this method will be called to inform the container of such a change. The change has already happened at the time this method is called. The base implementation notifies the grand parent of the shape that there was a change in a shape. A reimplementation if this function should call this method when overriding the function.

Parameters
shapethe shape that has been changed
typethis enum shows which change the shape has had.

Reimplemented from KoShapeContainerModel.

Definition at line 49 of file KoShapeGroup.cpp.

50 {
52 //debugFlake << type;
53 switch (type) {
64 break;
65 default:
66 break;
67 }
68 }
virtual void childChanged(KoShape *shape, KoShape::ChangeType type)
@ RotationChanged
used after a setRotation()
Definition KoShape.h:97
@ PositionChanged
used after a setPosition()
Definition KoShape.h:96
@ ClipPathChanged
the shapes clip path has changed
Definition KoShape.h:114
@ ShearChanged
used after a shear()
Definition KoShape.h:99
@ ClipMaskChanged
the shapes clip path has changed
Definition KoShape.h:115
@ ParameterChanged
the shapes parameter has changed (KoParameterShape only)
Definition KoShape.h:109
@ ScaleChanged
used after a scale()
Definition KoShape.h:98
@ SizeChanged
used after a setSize()
Definition KoShape.h:100
@ GenericMatrixChange
used after the matrix was changed without knowing which property explicitly changed
Definition KoShape.h:101

References KoShapeContainerModel::childChanged(), KoShape::ClipMaskChanged, KoShape::ClipPathChanged, KoShape::GenericMatrixChange, KoShapeGroup::invalidateSizeCache(), m_group, KoShape::ParameterChanged, KoShape::PositionChanged, KoShape::RotationChanged, KoShape::ScaleChanged, KoShape::ShearChanged, and KoShape::SizeChanged.

◆ remove()

void ShapeGroupContainerModel::remove ( KoShape * shape)
inlineoverridevirtual

Remove a shape to be completely separated from the model.

Parameters
shapethe shape to be removed.

Implements KoShapeContainerModel.

Definition at line 43 of file KoShapeGroup.cpp.

References KoShapeGroup::invalidateSizeCache(), m_group, and SimpleShapeContainerModel::remove().

Member Data Documentation

◆ m_group

KoShapeGroup* ShapeGroupContainerModel::m_group
private

Definition at line 71 of file KoShapeGroup.cpp.


The documentation for this class was generated from the following file: