KShare/cropeditor/drawing/lineitem.cpp

17 lines
402 B
C++
Raw Normal View History

2017-04-29 23:00:32 +02:00
#include "lineitem.hpp"
LineItem::LineItem() {
}
2017-04-29 23:00:32 +02:00
2017-05-06 13:21:12 +02:00
void LineItem::mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) {
if (init.isNull()) {
init = e->scenePos();
line = scene->addLine(QLineF(init, init), scene->pen());
} else {
line->setLine(QLineF(init, e->scenePos()));
}
2017-04-29 23:00:32 +02:00
}
void LineItem::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) {
}