Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeController.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 *
3 * SPDX-FileCopyrightText: 2006-2007, 2010 Thomas Zander <zander@kde.org>
4 * SPDX-FileCopyrightText: 2006-2008 Thorsten Zachmann <zachmann@kde.org>
5 *
6 * SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8
9#ifndef KOSHAPECONTROLLER_H
10#define KOSHAPECONTROLLER_H
11
12#include "kritaflake_export.h"
13
14#include <QObject>
15#include <QList>
16#include <QMetaType>
17
18class KoCanvasBase;
19class KoShape;
22class KUndo2Command;
24
34class KRITAFLAKE_EXPORT KoShapeController : public QObject
35{
36 Q_OBJECT
37
38public:
45 KoShapeController(KoCanvasBase *canvas, KoShapeControllerBase *shapeController);
47 ~KoShapeController() override;
48
52 void reset();
53
65 KUndo2Command* addShape(KoShape *shape, KoShapeContainer *parentShape, KUndo2Command *parent = 0);
66
76 KUndo2Command* addShapeDirect(KoShape *shape, KoShapeContainer *parentShape, KUndo2Command *parent = 0);
77
87 KUndo2Command* addShapesDirect(const QList<KoShape*> shape, KoShapeContainer *parentShape, KUndo2Command *parent = 0);
88
98 KUndo2Command* removeShape(KoShape *shape, KUndo2Command *parent = 0);
99
109 KUndo2Command* removeShapes(const QList<KoShape*> &shapes, KUndo2Command *parent = 0);
110
120 void setShapeControllerBase(KoShapeControllerBase *shapeController);
121
126 QRectF documentRectInPixels() const;
127
131 qreal pixelsPerInch() const;
132
136 QRectF documentRect() const;
137
144 KoDocumentResourceManager *resourceManager() const;
145
151 KoShapeControllerBase *documentBase() const;
152
153private:
154 class Private;
155 Private * const d;
156};
157
159
160#endif
Q_DECLARE_METATYPE(KisPaintopLodLimitations)