Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_shape_selection_model.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2007 Sven Langkamp <sven.langkamp@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_SHAPE_SELECTION_MODEL_H
8#define KIS_SHAPE_SELECTION_MODEL_H
9
10#include <QObject>
11#include <QRect>
13#include "kis_types.h"
16
18
22class KisShapeSelectionModel: public QObject, public KoShapeContainerModel
23{
24 Q_OBJECT
25public:
27 ~KisShapeSelectionModel() override;
28
29 void add(KoShape *child) override;
30 void remove(KoShape *child) override;
31
32 void setUpdatesEnabled(bool enabled);
33 bool updatesEnabled() const;
34
35 void setClipped(const KoShape *child, bool clipping) override;
36 bool isClipped(const KoShape *child) const override;
37 void setInheritsTransform(const KoShape *shape, bool inherit) override;
38 bool inheritsTransform(const KoShape *shape) const override;
39
40 int count() const override;
41 QList<KoShape*> shapes() const override;
42
44 void childChanged(KoShape * child, KoShape::ChangeType type) override;
45 void setShapeSelection(KisShapeSelection* selection);
46
47 void setResolutionProxy(KisImageResolutionProxySP newResolutionProxy);
49
50private Q_SLOTS:
51 void requestUpdate(const QRect &updateRect);
52
53private:
54 QMap<KoShape*, QRectF> m_shapeMap;
58
60};
61
62#endif
void setInheritsTransform(const KoShape *shape, bool inherit) override
KisShapeSelection * m_shapeSelection
void containerChanged(KoShapeContainer *, KoShape::ChangeType) override
bool isClipped(const KoShape *child) const override
void setShapeSelection(KisShapeSelection *selection)
KisShapeSelectionModel(KisImageResolutionProxySP resolutionProxy, KisSelectionWSP selection, KisShapeSelection *shapeSelection)
void setClipped(const KoShape *child, bool clipping) override
KisImageResolutionProxySP resolutionProxy() const
QMap< KoShape *, QRectF > m_shapeMap
void remove(KoShape *child) override
void add(KoShape *child) override
void requestUpdate(const QRect &updateRect)
void childChanged(KoShape *child, KoShape::ChangeType type) override
bool inheritsTransform(const KoShape *shape) const override
QList< KoShape * > shapes() const override
void setResolutionProxy(KisImageResolutionProxySP newResolutionProxy)
KisImageResolutionProxySP m_resolutionProxy
ChangeType
Used by shapeChanged() to select which change was made.
Definition KoShape.h:95