2017-05-05 23:59:39 +02:00
|
|
|
#ifndef TEXTITEM_HPP
|
|
|
|
#define TEXTITEM_HPP
|
|
|
|
|
|
|
|
#include "drawitem.hpp"
|
|
|
|
#include <QGraphicsSimpleTextItem>
|
|
|
|
|
|
|
|
class TextItem : public DrawItem {
|
2017-05-09 17:26:00 +02:00
|
|
|
public:
|
|
|
|
QString name() override;
|
|
|
|
bool init(CropScene *) override;
|
|
|
|
void mouseDragEvent(QGraphicsSceneMouseEvent *e, CropScene *scene) override;
|
|
|
|
void mouseDragEndEvent(QGraphicsSceneMouseEvent *, CropScene *) override;
|
2017-05-05 23:59:39 +02:00
|
|
|
|
2017-05-09 17:26:00 +02:00
|
|
|
private:
|
|
|
|
QGraphicsSimpleTextItem *textItem = nullptr;
|
|
|
|
QString text;
|
2017-05-05 23:59:39 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TEXTITEM_HPP
|