2017-04-29 23:00:32 +02:00
|
|
|
#ifndef LINEITEM_HPP
|
|
|
|
#define LINEITEM_HPP
|
|
|
|
|
|
|
|
#include "drawitem.hpp"
|
|
|
|
|
2017-05-06 13:21:12 +02:00
|
|
|
class LineItem : public DrawItem {
|
2017-06-14 23:34:58 +02:00
|
|
|
public:
|
2017-05-09 17:26:00 +02:00
|
|
|
LineItem();
|
|
|
|
QString name() override {
|
|
|
|
return "Straight line";
|
|
|
|
}
|
|
|
|
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
|
|
|
|
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
|
2017-04-29 23:00:32 +02:00
|
|
|
|
2017-06-14 23:34:58 +02:00
|
|
|
private:
|
2017-05-09 17:26:00 +02:00
|
|
|
QPointF init;
|
|
|
|
QGraphicsLineItem *line;
|
2017-04-29 23:00:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LINEITEM_HPP
|