Displays the rectangles and work on the image.
More...
#include <imagegraphicsscene.h>
Inherits QGraphicsScene.
|
void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| Detects when the user presses one button of the mouse. More...
|
|
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| Detects when the user releases one button of the mouse. More...
|
|
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
| Detects when the user moves his mouse all around the scene. More...
|
|
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
| Deprecated. Will be removed in a future release. More...
|
|
Displays the rectangles and work on the image.
This class is essential. When the user wants to draw, modify or annotate a rectangle, ImageGraphicsScene allows him to proceed so.
- Note
- The following
- Author
- Author
- David Carmona-Moreno
- Version
- Revision
- 1.0
- Date
- Date
- 2016/01/11 14:00:00
- Bug:
- When the user wants to modify one rectangle, its height and weight cannot be negative.
Contacts: nikol.nosp@m.aos..nosp@m.arvan.nosp@m.itop.nosp@m.oulos.nosp@m.@epf.nosp@m.l.ch and david.nosp@m..car.nosp@m.mona-.nosp@m.more.nosp@m.no@ep.nosp@m.fl.c.nosp@m.h
Created on: Mon Jan 12 14:00:00 2016
ImageGraphicsScene::ImageGraphicsScene |
( |
QGraphicsView * |
view_1, |
|
|
QPixmap * |
pixmap_1, |
|
|
QRectF |
sceneRectangle_1, |
|
|
CreateFileAbstraction * |
cfa_1 |
|
) |
| |
|
inline |
The constructor of the ImageGraphicsScene class.
- Parameters
-
view_1 | The QGraphicsView where the image is displayed |
pixmap_1 | The image we want to work with |
sceneRectangle_1 | The size of the ImageGraphicsScene |
cfa_1 | The text file which is associated to the image |
void ImageGraphicsScene::changeCursor |
( |
bool |
value | ) |
|
|
signal |
Deprecated signal. Will be deleted in a future release.
- Returns
- Void.
bool ImageGraphicsScene::checkModify |
( |
| ) |
const |
|
virtual |
Checks if we are in the "Modify" mode or not.
- Returns
- True if we are in the "Modify" mode, False if we are not
int ImageGraphicsScene::checkMouseMove |
( |
QPointF |
point | ) |
|
|
virtual |
Checks if the mouse is around one of the rectangle corners when we are in the "Modify" mode.
- Parameters
-
point | The mouse pointer coordinates |
- Returns
- Always returns 0
int ImageGraphicsScene::checkMousePress |
( |
QPointF |
point | ) |
|
|
virtual |
Checks if the mouse is pressing one of the rectangle corners when we are in the "Modify" mode.
- Parameters
-
point | The mouse pointer coordinates |
- Returns
- Always returns 0
Returns the text file.
- Returns
- The text file
bool ImageGraphicsScene::getDragButton |
( |
| ) |
const |
|
virtual |
Returns the state of the drag icon.
- Returns
- True if it is pressed by the user,False if it is not
bool ImageGraphicsScene::getDrawButton |
( |
| ) |
const |
|
virtual |
Returns the state of the draw icon.
- Returns
- True if it is pressed by the user, False if it is not
bool ImageGraphicsScene::getEraseButton |
( |
| ) |
const |
|
virtual |
Returns the state of the erase icon.
- Returns
- True if it is presed by the user, False if it is ot
QCursor * ImageGraphicsScene::getEraseCursor |
( |
| ) |
const |
|
virtual |
Returns the shape of the erase cursor.
- Returns
- The cursor shape
FileWriter * ImageGraphicsScene::getFileWriter |
( |
| ) |
const |
|
virtual |
Returns a list of all the rectangles in the scene.
- Returns
- The list of all the rectangles in the scene
QCursor * ImageGraphicsScene::getModifyCursor |
( |
| ) |
const |
|
virtual |
Returns the shape of the Modify cursor.
- Returns
- The cursor shape
bool ImageGraphicsScene::Iscontaining |
( |
RectangleDraw * |
rectangle, |
|
|
QPointF |
point |
|
) |
| const |
|
virtual |
Checks if the user is pressing on one rectangle.
- Parameters
-
rectangle | A rectangle |
param | The mouse pointer coordinates |
- Returns
- True if the user is pressing on one rectangle ,False if not
void ImageGraphicsScene::mouseDoubleClickEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
protected |
Deprecated. Will be removed in a future release.
- Returns
- Void.
void ImageGraphicsScene::mouseMoveEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
protected |
Detects when the user moves his mouse all around the scene.
- Returns
- Void.
void ImageGraphicsScene::mousePressEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
protected |
Detects when the user presses one button of the mouse.
- Returns
- Void.
void ImageGraphicsScene::mouseReleaseEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
protected |
Detects when the user releases one button of the mouse.
- Returns
- Void.
Sets the text file associated to the image.
- Parameters
-
createfileabstraction_1 | The text file associated to the image |
void ImageGraphicsScene::setDragButton |
( |
bool |
value | ) |
|
|
virtual |
Sets the state of the drag icon.
- Parameters
-
True | if the user is still dragging False if he has finished |
void ImageGraphicsScene::setDrawButton |
( |
bool |
value | ) |
|
|
virtual |
Sets the state of the draw icon.
- Parameters
-
True | if the user is still drawing, False if he has finished |
void ImageGraphicsScene::setEraseButton |
( |
bool |
value | ) |
|
|
virtual |
Sets the state of the erase icon.
- Parameters
-
True | if the user is still erasing, False if he has finished |
void ImageGraphicsScene::setFileWriter |
( |
FileWriter * |
filewriter_1 | ) |
|
|
virtual |
Sets the FielWriter object.
- Parameters
-
void ImageGraphicsScene::setId |
( |
int |
id | ) |
|
|
virtual |
Sets the rectangle ID.
- Parameters
-
id | The automatically computed ID |
void ImageGraphicsScene::setList |
( |
QList< RectangleDraw * > |
list_1 | ) |
|
|
virtual |
Sets the list of the rectangles drawn in th scene.
- Parameters
-
list_1 | The rectangles list |
The documentation for this class was generated from the following files:
- /media/david/4A52443C52442F4F/Users/David/Desktop/Projet EPFL/Ground_Truthing_20_10_2015/imagegraphicsscene.h
- /media/david/4A52443C52442F4F/Users/David/Desktop/Projet EPFL/Ground_Truthing_20_10_2015/imagegraphicsscene.cpp