25 #include <QGraphicsRectItem> 27 #include <QGraphicsPixmapItem> 29 #include <QGraphicsSceneMouseEvent> 30 #include <QGraphicsSceneHoverEvent> 31 #include <QGraphicsSceneDragDropEvent> 32 #include <QGraphicsItem> 54 QGraphicsPixmapItem *item;
81 RectangleDraw():id(0),point(0,0),item(NULL),topRight(0,0),bottomRight(0,0),bottomLeft(0,0),rectF(0,0,0,0),
82 height(0),width(0),annotation(
"Insert your annotation"),wordNumber(
"0"),lineNumber(
"0"),checkDelete(false)
85 this->setFlag(QGraphicsItem::ItemSendsGeometryChanges,
false);
91 virtual int getId()
const;
96 virtual void setId(
int id);
106 virtual void setPoint(QPointF point);
171 virtual QGraphicsPixmapItem*
getItem()
const;
176 virtual void setItem(QGraphicsPixmapItem *item);
203 #endif // RECTANGLEDRAW virtual QString getWordNumber() const
Returns the word number inserted by the user.
Definition: rectangledraw.cpp:51
virtual void setTopRight(QPointF point)
Sets the Top-Right point coordinates.
Definition: rectangledraw.cpp:75
virtual QGraphicsPixmapItem * getItem() const
Returns the little icon which indicates if the rectangle has been annotated or not.
Definition: rectangledraw.cpp:56
virtual QString getLineNumber() const
Returns the line number inserted by the user.
Definition: rectangledraw.cpp:26
RectangleDraw()
The constructor of the RectangleDraw class.
Definition: rectangledraw.h:81
virtual void setPoint(QPointF point)
Sets the Top-Left point coordinates.
Definition: rectangledraw.cpp:20
virtual QRectF getRectF() const
Returns the rectangle coordinates.
Definition: rectangledraw.cpp:120
virtual void setAnnotation(QString annotation)
Sets the comment inserted by the user.
Definition: rectangledraw.cpp:41
virtual void setCheckDelete(bool checkDelete_1)
Sets the state of the variable checking if the user wants to delete the rectangel.
Definition: rectangledraw.cpp:125
virtual void setLineNumber(QString lineNumber)
Sets the line number inserted by the user.
Definition: rectangledraw.cpp:31
virtual void setId(int id)
Sets the rectangle id.
Definition: rectangledraw.cpp:10
virtual QPointF getBottomRight()
Returns the Bottom-Right point coordinates.
Definition: rectangledraw.cpp:80
virtual QPointF getPoint() const
Returns the Top-Left point coordinates.
Definition: rectangledraw.cpp:15
virtual void setRectF(QRectF rect)
Sets the rectangle coordinates.
Definition: rectangledraw.cpp:115
virtual QPointF getBottomLeft()
Returns the Bottom-Left point coordianates.
Definition: rectangledraw.cpp:95
virtual void adjustSize(int x, int y)
Deprecated method. Will be remove in a future release.
Definition: rectangledraw.cpp:109
virtual int getId() const
Returns the rectangle ID.
Definition: rectangledraw.cpp:5
virtual void setWordNumber(QString word)
Sets the word number inserted by the user.
Definition: rectangledraw.cpp:46
Describes a rectangle drawn by the user.
Definition: rectangledraw.h:34
virtual QPointF getTopRight()
Returns Top-Right point coordinates.
Definition: rectangledraw.cpp:66
virtual void setItem(QGraphicsPixmapItem *item)
Sets the little icon which indicats if the user has annotatted the rectangle.
Definition: rectangledraw.cpp:61
virtual QString getAnnotation() const
Returns the comment inserted by the user.
Definition: rectangledraw.cpp:36
virtual void setBottomRight(QPointF point)
Sets Bottom-Right point coordinates.
Definition: rectangledraw.cpp:90
virtual void setBottomLeft(QPointF point)
Sets the Bottom-Left point coordinates.
Definition: rectangledraw.cpp:104
virtual bool getCheckDelete() const
Check if the user wants to delete the rectangle or not.
Definition: rectangledraw.cpp:130