KShare/cropeditor/drawing/lineitem.hpp

23 lines
450 B
C++
Raw Normal View History

2017-04-29 23:00:32 +02:00
#ifndef LINEITEM_HPP
#define LINEITEM_HPP
#include "drawitem.hpp"
class LineItem : public DrawItem
{
public:
LineItem();
2017-05-01 18:43:54 +02:00
QString name() override
2017-04-29 23:00:32 +02:00
{
2017-05-01 18:43:54 +02:00
return "Straight line";
2017-04-29 23:00:32 +02:00
}
2017-05-01 18:43:54 +02:00
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
2017-04-29 23:00:32 +02:00
private:
2017-05-01 18:43:54 +02:00
QPointF init;
QGraphicsLineItem *line;
2017-04-29 23:00:32 +02:00
};
#endif // LINEITEM_HPP