Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoShapeContainerModel.h
Show All 40 Lines | |||||
41 | { | 41 | { | ||
42 | public: | 42 | public: | ||
43 | /// default constructor | 43 | /// default constructor | ||
44 | KoShapeContainerModel(); | 44 | KoShapeContainerModel(); | ||
45 | 45 | | |||
46 | /// destructor | 46 | /// destructor | ||
47 | virtual ~KoShapeContainerModel(); | 47 | virtual ~KoShapeContainerModel(); | ||
48 | 48 | | |||
49 | void deleteOwnedShapes(); | ||||
50 | | ||||
49 | /** | 51 | /** | ||
50 | * Add a shape to this models store. | 52 | * Add a shape to this models store. | ||
51 | * @param shape the shape to be managed in the container. | 53 | * @param shape the shape to be managed in the container. | ||
52 | */ | 54 | */ | ||
53 | virtual void add(KoShape *shape) = 0; | 55 | virtual void add(KoShape *shape) = 0; | ||
54 | 56 | | |||
55 | /** | 57 | /** | ||
56 | * Remove a shape to be completely separated from the model. | 58 | * Remove a shape to be completely separated from the model. | ||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Line(s) | |||||
163 | * The base implementation notifies the grand parent of the shape that there was a | 165 | * The base implementation notifies the grand parent of the shape that there was a | ||
164 | * change in a shape. A reimplentation if this function should call this method when | 166 | * change in a shape. A reimplentation if this function should call this method when | ||
165 | * overwriding the function. | 167 | * overwriding the function. | ||
166 | * | 168 | * | ||
167 | * @param shape the shape that has been changed | 169 | * @param shape the shape that has been changed | ||
168 | * @param type this enum shows which change the shape has had. | 170 | * @param type this enum shows which change the shape has had. | ||
169 | */ | 171 | */ | ||
170 | virtual void childChanged(KoShape *shape, KoShape::ChangeType type); | 172 | virtual void childChanged(KoShape *shape, KoShape::ChangeType type); | ||
173 | | ||||
174 | virtual void shapeHasBeenAddedToHierarchy(KoShape *shape, KoShapeContainer *addedToSubtree); | ||||
175 | virtual void shapeToBeRemovedFromHierarchy(KoShape *shape, KoShapeContainer *removedFromSubtree); | ||||
176 | | ||||
177 | protected: | ||||
178 | KoShapeContainerModel(const KoShapeContainerModel &rhs); | ||||
171 | }; | 179 | }; | ||
172 | 180 | | |||
173 | #endif | 181 | #endif |