|
Krita Source Code Documentation
|
#include <SimpleShapeContainerModel.h>
Inheritance diagram for SimpleShapeContainerModel:Private Member Functions | |
| int | indexOf (const KoShape *shape) const |
Private Attributes | |
| KoShapeManager * | m_associatedRootShapeManager = 0 |
| QList< bool > | m_clipped |
| QList< bool > | m_inheritsTransform |
| QList< KoShape * > | m_members |
Additional Inherited Members | |
Protected Member Functions inherited from KoShapeContainerModel | |
| KoShapeContainerModel (const KoShapeContainerModel &rhs) | |
Definition at line 15 of file SimpleShapeContainerModel.h.
|
inline |
Definition at line 18 of file SimpleShapeContainerModel.h.
|
inlineoverride |
Definition at line 19 of file SimpleShapeContainerModel.h.
|
inline |
Definition at line 21 of file SimpleShapeContainerModel.h.
References KoShape::cloneShape(), KIS_ASSERT_RECOVER, KIS_SAFE_ASSERT_RECOVER_NOOP, m_clipped, m_inheritsTransform, and m_members.
Add a shape to this models store.
| shape | the shape to be managed in the container. |
Implements KoShapeContainerModel.
Definition at line 44 of file SimpleShapeContainerModel.h.
References m_clipped, m_inheritsTransform, and m_members.
|
inline |
Definition at line 116 of file SimpleShapeContainerModel.h.
References m_associatedRootShapeManager.
|
inlineoverridevirtual |
This method is called as a notification that one of the properties of the container changed. This can be one of size, position, rotation and skew. Note that clipped children will automatically get all these changes, the model does not have to do anything for that.
| container | the actual container that changed. |
| type | this enum shows which change the container has had. |
Implements KoShapeContainerModel.
Definition at line 75 of file SimpleShapeContainerModel.h.
|
inlineoverridevirtual |
Return the current number of children registered.
Implements KoShapeContainerModel.
Definition at line 69 of file SimpleShapeContainerModel.h.
References m_members.
|
inlineprivate |
Definition at line 142 of file SimpleShapeContainerModel.h.
References m_members.
|
inlineoverridevirtual |
Returns if the shape inherits the container transform.
A shape that inherits the transform of the parent container will have its share / rotation / skew etc be calculated as being the product of both its own local transformation and also that of its parent container. If you set this to true and rotate the container, the shape will get that rotation as well automatically.
| shape | the shape for which the property will be returned. |
Implements KoShapeContainerModel.
Definition at line 82 of file SimpleShapeContainerModel.h.
References indexOf(), KIS_SAFE_ASSERT_RECOVER, and m_inheritsTransform.
|
inlineoverridevirtual |
Returns if the argument shape has its 'clipping' property set.
A shape that is clipped by the container will have its visible portion limited to the area where it intersects with the container. If a shape is positioned or sized such that it would be painted outside of the KoShape::outline() of its parent container, setting this property to true will clip the shape painting to the container outline.
| shape | the shape for which the property will be returned. |
Implements KoShapeContainerModel.
Definition at line 56 of file SimpleShapeContainerModel.h.
References indexOf(), KIS_SAFE_ASSERT_RECOVER, and m_clipped.
|
inlineoverridevirtual |
This method is called when the user tries to move a shape that is a shape of the container this model represents. The shape itself is not yet moved; it is proposed to be moved over the param move distance. You can alter the value of the move to affect the actual distance moved. The default implementation does nothing.
| shape | the shape of this container that the user is trying to move. |
| move | the distance that the user proposes to move shape from the current position. |
Reimplemented from KoShapeContainerModel.
Definition at line 88 of file SimpleShapeContainerModel.h.
References KoShape::parent().
Remove a shape to be completely separated from the model.
| shape | the shape to be removed. |
Implements KoShapeContainerModel.
Definition at line 61 of file SimpleShapeContainerModel.h.
References indexOf(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_clipped, m_inheritsTransform, and m_members.
|
inline |
If the container is the root of shapes hierarchy, it should also track the content of the shape manager. Add all added/removed shapes should be also added to shapeManager.
Definition at line 125 of file SimpleShapeContainerModel.h.
References KoShapeManager::addShape(), m_associatedRootShapeManager, KoShapeManager::remove(), and shapes().
|
inlineoverridevirtual |
Set the argument shape to have its 'clipping' property set.
A shape that is clipped by the container will have its visible portion limited to the area where it intersects with the container. If a shape is positioned or sized such that it would be painted outside of the KoShape::outline() of its parent container, setting this property to true will clip the shape painting to the container outline.
| shape | the shape for which the property will be changed. |
| clipping | the new value |
Implements KoShapeContainerModel.
Definition at line 51 of file SimpleShapeContainerModel.h.
References indexOf(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_clipped, and value().
|
inlineoverridevirtual |
Set the shape to inherit the container transform.
A shape that inherits the transform of the parent container will have its share / rotation / skew etc be calculated as being the product of both its own local transformation and also that of its parent container. If you set this to true and rotate the container, the shape will get that rotation as well automatically.
| shape | the shape for which the property will be changed. |
| inherit | the new value |
Implements KoShapeContainerModel.
Definition at line 77 of file SimpleShapeContainerModel.h.
References indexOf(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_inheritsTransform, and value().
|
inlineoverridevirtual |
Reimplemented from KoShapeContainerModel.
Definition at line 102 of file SimpleShapeContainerModel.h.
References KoShapeManager::addShape(), m_associatedRootShapeManager, and KoShapeContainerModel::shapeHasBeenAddedToHierarchy().
Return the list of all shapes of this model
Implements KoShapeContainerModel.
Definition at line 72 of file SimpleShapeContainerModel.h.
References m_members.
|
inlineoverridevirtual |
Reimplemented from KoShapeContainerModel.
Definition at line 109 of file SimpleShapeContainerModel.h.
References m_associatedRootShapeManager, KoShapeManager::remove(), and KoShapeContainerModel::shapeToBeRemovedFromHierarchy().
|
private |
Definition at line 151 of file SimpleShapeContainerModel.h.
|
private |
Definition at line 150 of file SimpleShapeContainerModel.h.
|
private |
Definition at line 149 of file SimpleShapeContainerModel.h.
Definition at line 148 of file SimpleShapeContainerModel.h.