24 #ifndef ADDICONPICTURE 25 #define ADDICONPICTURE 27 #include <QGraphicsScene> 29 #include <QGraphicsPixmapItem> 32 #include <rectangledraw.h> 39 QGraphicsScene *scene;
46 QGraphicsPixmapItem *item;
57 image=
new QImage(
"../Icons/annotation.png");
58 item=
new QGraphicsPixmapItem(QPixmap::fromImage(*image));
59 item->setPos(rectangle->rect().topLeft());
67 virtual QGraphicsPixmapItem*
getItem()
const;
70 #endif // ADDICONPICTURE virtual QGraphicsPixmapItem * getItem() const
Return the little item which is associated to a rectangle when it is annotated.
Definition: addiconpicture.cpp:3
AddIconPicture(QGraphicsScene *scene_1, RectangleDraw *rectangle)
The constructor of the AddIconPicture class.
Definition: addiconpicture.h:55
Adds an icon at the top-left corner of a rectangle.
Definition: addiconpicture.h:34
Describes a rectangle drawn by the user.
Definition: rectangledraw.h:34
virtual void setItem(QGraphicsPixmapItem *item)
Sets the little icon which indicats if the user has annotatted the rectangle.
Definition: rectangledraw.cpp:61