27 bool hoverEvent(QHoverEvent *e, Qt::CursorShape *cursor)
override;
31 void paint(QPainter *painter)
override;
39 int hitTest(QPointF canvas_coord);
49 const QPainterPath &
path()
const;
57 bool is_closed_shape_;
58 QList<PathNode> cache_;
Definition: canvas-control.h:16
Canvas & canvas()
Definition: canvas-control.cpp:34
Definition: path-edit.h:11
bool selected
Definition: path-edit.h:14
PathShape::NodeType type
Definition: path-edit.h:13
PathNode(PathShape::NodeType node_type)
Definition: path-edit.h:16
Definition: path-edit.h:9
void setTarget(ShapePtr &target)
Definition: path-edit.cpp:215
bool hoverEvent(QHoverEvent *e, Qt::CursorShape *cursor) override
Definition: path-edit.cpp:110
bool isActive() override
Definition: path-edit.cpp:19
void setPath(const QPainterPath &path)
Definition: path-edit.cpp:251
bool keyPressEvent(QKeyEvent *e) override
Definition: path-edit.cpp:239
qreal distance(QPointF point)
Definition: path-edit.cpp:106
PathEdit(Canvas *canvas) noexcept
Definition: path-edit.cpp:12
bool mouseMoveEvent(QMouseEvent *e) override
Definition: path-edit.cpp:33
void paint(QPainter *painter) override
Definition: path-edit.cpp:149
void moveElementTo(int index, QPointF local_coord)
Definition: path-edit.cpp:52
bool mouseReleaseEvent(QMouseEvent *e) override
Definition: path-edit.cpp:125
PathShape & target()
Definition: path-edit.cpp:211
const QPainterPath & path() const
Definition: path-edit.cpp:247
bool mousePressEvent(QMouseEvent *e) override
Definition: path-edit.cpp:21
int hitTest(QPointF canvas_coord)
Definition: path-edit.cpp:136
QPointF getLocalCoord(QPointF canvas_coord)
Definition: path-edit.cpp:207
void exit() override
Definition: path-edit.cpp:256
Definition: path-shape.h:7
NodeType
Definition: path-shape.h:9
In-canvas controls with its own painting and event handling functions.
Definition: canvas-control.h:8
shared_ptr< Shape > ShapePtr
Definition: shape.h:137