KShare/cropeditor/drawing/pathitem.cpp
ArsenArsen 37ce6f1eda Add clang-format; Make text and blur less annoying
I didn't read the clang-format documentation properly
2017-05-09 17:26:00 +02:00

22 lines
517 B
C++

#include "pathitem.hpp"
PathItem::PathItem() {
}
PathItem::~PathItem() {
delete path;
}
void PathItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
if (path == nullptr) {
path = new QPainterPath(e->scenePos());
pathItem = scene->addPath(*path, scene->pen(), scene->brush());
} else {
path->quadTo(path->currentPosition(), e->scenePos());
pathItem->setPath(*path);
}
}
void PathItem::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) {
}