25 lines
495 B
C++
25 lines
495 B
C++
#ifndef LINEITEM_HPP
|
|
#define LINEITEM_HPP
|
|
|
|
#include "../cropscene.hpp"
|
|
#include "drawitem.hpp"
|
|
|
|
class LineItem : public DrawItem
|
|
{
|
|
public:
|
|
LineItem();
|
|
~LineItem();
|
|
QString name()
|
|
{
|
|
return "Line";
|
|
}
|
|
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene);
|
|
void mouseDragEndEvent(QGraphicsSceneMouseEvent *e, CropScene *scene);
|
|
|
|
private:
|
|
QPainterPath *path = nullptr;
|
|
QGraphicsPathItem *pathItem = nullptr;
|
|
};
|
|
|
|
#endif // LINEITEM_HPP
|