|
Krita Source Code Documentation
|
#include <kis_shape_selection_model.h>
Inheritance diagram for KisShapeSelectionModel:Private Slots | |
| void | requestUpdate (const QRect &updateRect) |
Private Attributes | |
| KisSelectionWSP | m_parentSelection |
| KisImageResolutionProxySP | m_resolutionProxy |
| QMap< KoShape *, QRectF > | m_shapeMap |
| KisShapeSelection * | m_shapeSelection |
| bool | m_updatesEnabled |
Additional Inherited Members | |
Protected Member Functions inherited from KoShapeContainerModel | |
| KoShapeContainerModel (const KoShapeContainerModel &rhs) | |
Definition at line 22 of file kis_shape_selection_model.h.
| KisShapeSelectionModel::KisShapeSelectionModel | ( | KisImageResolutionProxySP | resolutionProxy, |
| KisSelectionWSP | selection, | ||
| KisShapeSelection * | shapeSelection ) |
Definition at line 20 of file kis_shape_selection_model.cpp.
|
override |
Definition at line 28 of file kis_shape_selection_model.cpp.
References m_parentSelection.
Add a shape to this models store.
| shape | the shape to be managed in the container. |
Implements KoShapeContainerModel.
Definition at line 58 of file kis_shape_selection_model.cpp.
References KoShapeManager::addShape(), KoShape::boundingRect(), m_resolutionProxy, m_shapeMap, m_shapeSelection, requestUpdate(), KoShape::setBackground(), KoShape::setStroke(), and KisShapeSelection::shapeManager().
|
overridevirtual |
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.
| shape | the shape that has been changed |
| type | this enum shows which change the shape has had. |
Reimplemented from KoShapeContainerModel.
Definition at line 150 of file kis_shape_selection_model.cpp.
References KoShape::boundingRect(), m_resolutionProxy, m_shapeMap, m_shapeSelection, KoShape::ParentChanged, and requestUpdate().
|
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 146 of file kis_shape_selection_model.cpp.
|
overridevirtual |
Return the current number of children registered.
Implements KoShapeContainerModel.
Definition at line 137 of file kis_shape_selection_model.cpp.
References m_shapeMap.
|
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 131 of file kis_shape_selection_model.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 119 of file kis_shape_selection_model.cpp.
Remove a shape to be completely separated from the model.
| shape | the shape to be removed. |
Implements KoShapeContainerModel.
Definition at line 85 of file kis_shape_selection_model.cpp.
References KoShape::boundingRect(), m_resolutionProxy, m_shapeMap, m_shapeSelection, KoShapeManager::remove(), requestUpdate(), and KisShapeSelection::shapeManager().
|
privateslot |
Definition at line 33 of file kis_shape_selection_model.cpp.
References m_parentSelection, m_shapeSelection, m_updatesEnabled, KisShapeSelection::recalculateOutlineCache(), and KisSelection::requestCompressedProjectionUpdate().
| KisImageResolutionProxySP KisShapeSelectionModel::resolutionProxy | ( | ) | const |
Definition at line 53 of file kis_shape_selection_model.cpp.
References m_resolutionProxy.
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 113 of file kis_shape_selection_model.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 125 of file kis_shape_selection_model.cpp.
| void KisShapeSelectionModel::setResolutionProxy | ( | KisImageResolutionProxySP | newResolutionProxy | ) |
Definition at line 42 of file kis_shape_selection_model.cpp.
References m_resolutionProxy, and requestUpdate().
| void KisShapeSelectionModel::setShapeSelection | ( | KisShapeSelection * | selection | ) |
Definition at line 168 of file kis_shape_selection_model.cpp.
References m_shapeSelection.
| void KisShapeSelectionModel::setUpdatesEnabled | ( | bool | enabled | ) |
Definition at line 103 of file kis_shape_selection_model.cpp.
References m_updatesEnabled.
Return the list of all shapes of this model
Implements KoShapeContainerModel.
Definition at line 142 of file kis_shape_selection_model.cpp.
References m_shapeMap.
| bool KisShapeSelectionModel::updatesEnabled | ( | ) | const |
Definition at line 108 of file kis_shape_selection_model.cpp.
References m_updatesEnabled.
|
private |
Definition at line 56 of file kis_shape_selection_model.h.
|
private |
Definition at line 55 of file kis_shape_selection_model.h.
|
private |
Definition at line 54 of file kis_shape_selection_model.h.
|
private |
Definition at line 57 of file kis_shape_selection_model.h.
|
private |
Definition at line 59 of file kis_shape_selection_model.h.