|
Krita Source Code Documentation
|
#include <KoTosContainerModel.h>
Inheritance diagram for KoTosContainerModel:Public Member Functions | |
| void | add (KoShape *shape) override |
| void | containerChanged (KoShapeContainer *container, KoShape::ChangeType type) override |
| int | count () const override |
| bool | inheritsTransform (const KoShape *shape) const override |
| bool | isClipped (const KoShape *shape) const override |
| KoTosContainerModel () | |
| void | remove (KoShape *shape) override |
| void | setClipped (const KoShape *shape, bool clipping) override |
| void | setInheritsTransform (const KoShape *shape, bool inherit) override |
| QList< KoShape * > | shapes () const override |
| ~KoTosContainerModel () override | |
Public Member Functions inherited from KoShapeContainerModel | |
| virtual void | childChanged (KoShape *shape, KoShape::ChangeType type) |
| void | deleteOwnedShapes () |
| KoShapeContainerModel () | |
| default constructor | |
| virtual void | proposeMove (KoShape *shape, QPointF &move) |
| virtual void | shapeHasBeenAddedToHierarchy (KoShape *shape, KoShapeContainer *addedToSubtree) |
| virtual void | shapeToBeRemovedFromHierarchy (KoShape *shape, KoShapeContainer *removedFromSubtree) |
| virtual | ~KoShapeContainerModel () |
| destructor | |
Private Attributes | |
| KoShape * | m_textShape |
Additional Inherited Members | |
Protected Member Functions inherited from KoShapeContainerModel | |
| KoShapeContainerModel (const KoShapeContainerModel &rhs) | |
Definition at line 11 of file KoTosContainerModel.h.
| KoTosContainerModel::KoTosContainerModel | ( | ) |
Definition at line 15 of file KoTosContainerModel.cpp.
|
override |
Definition at line 20 of file KoTosContainerModel.cpp.
Add a shape to this models store.
| shape | the shape to be managed in the container. |
Implements KoShapeContainerModel.
Definition at line 24 of file KoTosContainerModel.cpp.
References m_textShape, and KoShape::userData().
|
overridevirtual |
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 81 of file KoTosContainerModel.cpp.
References KoShape::ContentChanged, debugFlake, m_textShape, KoTosContainer::resizeBehavior(), KoShape::setSize(), KoShape::size(), KoShape::SizeChanged, and KoTosContainer::TextFollowsPreferredTextRect.
|
overridevirtual |
Return the current number of children registered.
Implements KoShapeContainerModel.
Definition at line 67 of file KoTosContainerModel.cpp.
References m_textShape.
|
overridevirtual |
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 61 of file KoTosContainerModel.cpp.
|
overridevirtual |
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 49 of file KoTosContainerModel.cpp.
Remove a shape to be completely separated from the model.
| shape | the shape to be removed. |
Implements KoShapeContainerModel.
Definition at line 35 of file KoTosContainerModel.cpp.
References m_textShape.
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 43 of file KoTosContainerModel.cpp.
|
overridevirtual |
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 55 of file KoTosContainerModel.cpp.
Return the list of all shapes of this model
Implements KoShapeContainerModel.
Definition at line 72 of file KoTosContainerModel.cpp.
References m_textShape, and shapes().
|
private |
Definition at line 28 of file KoTosContainerModel.h.