KShare/cropeditor/drawing/lineitem.cpp

17 lines
421 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
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()));
}
2017-04-29 23:00:32 +02:00
}
void LineItem::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) {
}