KShare/cropeditor/drawing/lineitem.cpp
2017-05-01 18:43:54 +02:00

23 lines
414 B
C++

#include "lineitem.hpp"
LineItem::LineItem()
{
}
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()));
}
}
void LineItem::mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *)
{
}