Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeContainerModel.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006-2007, 2010 Thomas Zander <zander@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KOSHAPECONTAINERMODEL_H
8#define KOSHAPECONTAINERMODEL_H
9
10#include "kritaflake_export.h"
11
12#include <KoShape.h>
13
14#include <QList>
15#include <QPointF>
16
18
27class KRITAFLAKE_EXPORT KoShapeContainerModel
28{
29public:
32
34 virtual ~KoShapeContainerModel();
35
36 void deleteOwnedShapes();
37
42 virtual void add(KoShape *shape) = 0;
43
48 virtual void remove(KoShape *shape) = 0;
49
62 virtual void setClipped(const KoShape *shape, bool clipping) = 0;
63
76 virtual bool isClipped(const KoShape *shape) const = 0;
77
90 virtual void setInheritsTransform(const KoShape *shape, bool inherit) = 0;
91
104 virtual bool inheritsTransform(const KoShape *shape) const = 0;
105
110 virtual int count() const = 0;
111
116 virtual QList<KoShape*> shapes() const = 0;
117
126 virtual void containerChanged(KoShapeContainer *container, KoShape::ChangeType type) = 0;
127
137 virtual void proposeMove(KoShape *shape, QPointF &move);
138
151 virtual void childChanged(KoShape *shape, KoShape::ChangeType type);
152
153 virtual void shapeHasBeenAddedToHierarchy(KoShape *shape, KoShapeContainer *addedToSubtree);
154 virtual void shapeToBeRemovedFromHierarchy(KoShape *shape, KoShapeContainer *removedFromSubtree);
155
156protected:
158};
159
160#endif
virtual bool isClipped(const KoShape *shape) const =0
virtual void containerChanged(KoShapeContainer *container, KoShape::ChangeType type)=0
virtual void remove(KoShape *shape)=0
virtual void add(KoShape *shape)=0
virtual bool inheritsTransform(const KoShape *shape) const =0
virtual int count() const =0
virtual void setInheritsTransform(const KoShape *shape, bool inherit)=0
virtual void setClipped(const KoShape *shape, bool clipping)=0
virtual QList< KoShape * > shapes() const =0
ChangeType
Used by shapeChanged() to select which change was made.
Definition KoShape.h:95