Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeGroup.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006 Thomas Zander <zander@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KOSHAPEGROUP_H
8#define KOSHAPEGROUP_H
9
10#include "KoShapeContainer.h"
11
12
13#include "kritaflake_export.h"
14
17class KoShapeGroupPrivate;
18
34class KRITAFLAKE_EXPORT KoShapeGroup : public KoShapeContainer
35{
36public:
40 ~KoShapeGroup() override;
41
42 KoShape* cloneShape() const override;
43
45 void paintComponent(QPainter &painter) const override;
47 bool hitTest(const QPointF &position) const override;
48 QSizeF size() const override;
49 void setSize(const QSizeF &size) override;
50 QRectF outlineRect() const override;
52 QRectF boundingRect() const override;
53
54private:
56
64 void invalidateSizeCache();
65
66private:
67 KoShapeGroup(const KoShapeGroup &rhs);
68
69private:
70 void tryUpdateCachedSize() const;
71
72 void shapeChanged(ChangeType type, KoShape *shape = 0) override;
73
74 class Private;
75 QScopedPointer<Private> d;
76};
77
78#endif
virtual void paintComponent(QPainter &painter) const =0
Paint the component Implement this method to allow the shape to paint itself, just like the KoShape::...
void shapeChanged(ChangeType type, KoShape *shape=0) override
QScopedPointer< Private > d
virtual QSizeF size() const
Get the size of the shape in pt.
Definition KoShape.cpp:820
virtual QRectF outlineRect() const
Definition KoShape.cpp:637
virtual QRectF boundingRect() const
Get the bounding box of the shape.
Definition KoShape.cpp:335
ChangeType
Used by shapeChanged() to select which change was made.
Definition KoShape.h:95
virtual KoShape * cloneShape() const
creates a deep copy of the shape or shape's subtree
Definition KoShape.cpp:200
virtual bool hitTest(const QPointF &position) const
Check if the shape is hit on position.
Definition KoShape.cpp:308
virtual void setSize(const QSizeF &size)
Resize the shape.
Definition KoShape.cpp:276