Krita Source Code Documentation
Loading...
Searching...
No Matches
KoParameterShape.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2006 Thorsten Zachmann <zachmann@kde.org>
3 SPDX-FileCopyrightText: 2007 Thomas Zander <zander@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KOPARAMETERSHAPE_H
9#define KOPARAMETERSHAPE_H
10
11#include "KoPathShape.h"
12#include "kritaflake_export.h"
13
14class KoParameterShapePrivate;
16
34class KRITAFLAKE_EXPORT KoParameterShape : public KoPathShape
35{
36public:
38 ~KoParameterShape() override;
39
50 void moveHandle(int handleId, const QPointF &point, Qt::KeyboardModifiers modifiers = Qt::NoModifier);
51
58 int handleIdAt(const QRectF &rect) const;
59
65 QPointF handlePosition(int handleId) const;
66
73 void paintHandles(KisHandlePainterHelper &handlesHelper);
74
81 void paintHandle(KisHandlePainterHelper &handlesHelper, int handleId);
82
84 void setSize(const QSizeF &size) override;
85
93 bool isParametricShape() const;
94
104 void setParametricShape(bool parametric);
105
106 QPointF normalize() override;
107
109 int handleCount() const;
110
111protected:
117
122 void setHandles(const QList<QPointF> &handles);
123
126
136 virtual void moveHandleAction(int handleId, const QPointF & point, Qt::KeyboardModifiers modifiers = Qt::NoModifier) = 0;
137
143 virtual void updatePath(const QSizeF &size) = 0;
144
145private:
146 class Private;
147 QSharedDataPointer<Private> d;
148};
149
150#endif /* KOPARAMETERSHAPE_H */
The KisHandlePainterHelper class is a special helper for painting handles around objects....
QSharedDataPointer< Private > d
QList< QPointF > handles() const
virtual void moveHandleAction(int handleId, const QPointF &point, Qt::KeyboardModifiers modifiers=Qt::NoModifier)=0
Updates the internal state of a KoParameterShape.
virtual void updatePath(const QSizeF &size)=0
Update the path of the parameter shape.
The position of a path point within a path shape.
Definition KoPathShape.h:63
virtual QPointF normalize()
Normalizes the path data.
void setSize(const QSizeF &size) override