Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_node_shape.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_NODE_SHAPE_H_
8#define KIS_NODE_SHAPE_H_
9
10#include <QObject>
11
12#include <KoShapeLayer.h>
13
14#include <kritaui_export.h>
15#include <kis_types.h>
16
17
18#define KIS_NODE_SHAPE_ID "KisNodeShape"
19
24class KRITAUI_EXPORT KisNodeShape : public QObject, public KoShapeLayer
25{
26 Q_OBJECT
27public:
29 ~KisNodeShape() override;
30
31 KisNodeSP node();
32
33 // Empty implementations as the node is not painted anywhere
34 QSizeF size() const override;
35 QRectF boundingRect() const override;
36 void setPosition(const QPointF &) override;
37 void paint(QPainter &painter) const override;
38
39private Q_SLOTS:
40 void editabilityChanged();
41
42private:
43 bool checkIfDescendant(KoShapeLayer *activeLayer);
44
45private:
46 struct Private;
47 Private * const m_d;
48};
49
50#endif
Private *const m_d
void paint(QPainter &painter) const override
reimplemented
QRectF boundingRect() const override
Get the bounding box of the shape.
virtual QSizeF size() const
Get the size of the shape in pt.
Definition KoShape.cpp:820
virtual void setPosition(const QPointF &position)
Set the position of the shape in pt.
Definition KoShape.cpp:295