KShare/cropeditor/drawing/textitem.hpp
2017-06-29 19:09:39 +02:00

20 lines
476 B
C++

#ifndef TEXTITEM_HPP
#define TEXTITEM_HPP
#include "drawitem.hpp"
#include <QGraphicsSimpleTextItem>
class TextItem : public DrawItem {
public:
QString name() override;
bool init(CropScene *s) override;
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
private:
QGraphicsSimpleTextItem *textItem = nullptr;
QString text;
};
#endif // TEXTITEM_HPP