KShare/cropeditor/drawing/rectitem.hpp
ArsenArsen d0eaec047a Fix the encoder, add rectangles, and add undraw
undraw = way to delete drawings
2017-06-26 15:43:12 +02:00

22 lines
464 B
C++

#ifndef RECTITEM_HPP
#define RECTITEM_HPP
#include "drawitem.hpp"
class RectItem : public DrawItem {
public:
RectItem();
~RectItem();
QString name() override {
return "Rectangle";
}
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
private:
QGraphicsRectItem *rect = nullptr;
QPointF initPos;
};
#endif // RECTITEM_HPP