KShare/cropeditor/drawing/lineitem.cpp
2017-07-08 21:40:09 +02:00

17 lines
421 B
C++

#include "lineitem.hpp"
LineItem::LineItem() {
}
void LineItem::mouseDragEvent(QGraphicsSceneMouseEvent *, CropScene *scene) {
if (init.isNull()) {
init = scene->cursorPosition();
line = scene->addLine(QLineF(init, init), scene->pen());
} else {
line->setLine(QLineF(init, scene->cursorPosition()));
}
}
void LineItem::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) {
}