2017-04-29 23:00:32 +02:00
|
|
|
#include "lineitem.hpp"
|
|
|
|
|
2017-05-09 17:26:00 +02:00
|
|
|
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) {
|
2017-05-09 17:26:00 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2017-05-09 17:26:00 +02:00
|
|
|
void LineItem::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) {
|
|
|
|
}
|