Thu, 14 Apr 2022 11:08:20 +0300
work on circle tool
186 | 1 | #include "circletool.h" |
2 | ||
3 | CircleTool::CircleTool(Document *document) : | |
4 | AbstractDrawTool{document} | |
5 | { | |
6 | } | |
7 | ||
8 | QString CircleTool::name() const | |
9 | { | |
10 | return tr("Circle"); | |
11 | } | |
12 | ||
13 | QString CircleTool::toolTip() const | |
14 | { | |
15 | return tr("Draw circular primitives like circles or discs"); | |
16 | } | |
17 | ||
18 | void CircleTool::overpaint(Canvas *canvas, QPainter *painter) const | |
19 | { | |
20 | if (this->previewPolygon.size() >= 2) | |
21 | { | |
22 | canvas->drawWorldPolyline() | |
23 | } | |
24 | } | |
25 | ||
26 | QString CircleTool::iconName() const | |
27 | { | |
28 | return ":/icons/linetype-circularprimitive.png"; | |
29 | } | |
30 | ||
31 | void CircleTool::closeShape() | |
32 | { | |
33 | ||
34 | } |