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
115 QRectF documentRectInPixels() const;
116
120 qreal pixelsPerInch() const;
121
125 QRectF documentRect() const;
126
133 KoDocumentResourceManager *resourceManager() const;
134
140 KoShapeControllerBase *documentBase() const;
141
142private:
143 class Private;
144 Private * const d;
145};
146
148
149#endif
Q_DECLARE_METATYPE(KisPaintopLodLimitations)