KShare/cropeditor/drawing/textitem.hpp

20 lines
475 B
C++
Raw Normal View History

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:
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-06-14 23:34:58 +02:00
private:
QGraphicsSimpleTextItem *textItem = nullptr;
QString text;
2017-05-05 23:59:39 +02:00
};
#endif // TEXTITEM_HPP