KShare/cropeditor/drawing/textitem.hpp
2017-07-08 21:40:09 +02:00

20 lines
475 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 *, CropScene *scene) override;
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
private:
QGraphicsSimpleTextItem *textItem = nullptr;
QString text;
};
#endif // TEXTITEM_HPP