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