Ground-Truthing GUI 1.0

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Signals | Public Member Functions | Protected Member Functions | List of all members
ImageGraphicsScene Class Reference

Displays the rectangles and work on the image. More...

`#include <imagegraphicsscene.h>`

Inherits QGraphicsScene.

## Signals
void | changeCursor (bool value)
| Deprecated signal. Will be deleted in a future release. More...

## Public Member Functions
| ImageGraphicsScene (QGraphicsView *view_1, QPixmap *pixmap_1, QRectF sceneRectangle_1, CreateFileAbstraction *cfa_1)
| The constructor of the ImageGraphicsScene class. More...
virtual | ~ImageGraphicsScene ()
| Class destructor.
virtual bool | Iscontaining (RectangleDraw *rectangle, QPointF point) const
| Checks if the user is pressing on one rectangle. More...
virtual void | setDrawButton (bool value)
| Sets the state of the draw icon. More...
virtual bool | getDrawButton () const
| Returns the state of the draw icon. More...
virtual void | setEraseButton (bool value)
| Sets the state of the erase icon. More...
virtual bool | getEraseButton () const
| Returns the state of the erase icon. More...
virtual void | setDoubleClick (bool value)
| Deprecated. Will be removed in a future release.
virtual bool | getDoubleClick () const
| Deprecated method. Will be removed in the future release.
virtual void | setDragButton (bool value)
| Sets the state of the drag icon. More...
virtual bool | getDragButton () const
| Returns the state of the drag icon. More...
virtual QCursor * | getEraseCursor () const
| Returns the shape of the erase cursor. More...
virtual QCursor * | getModifyCursor () const
| Returns the shape of the Modify cursor. More...
virtual QList< RectangleDraw * > | getList () const
| Returns a list of all the rectangles in the scene. More...
virtual void | setList (QList< RectangleDraw * > list_1)
| Sets the list of the rectangles drawn in th scene. More...
virtual void | setId (int id)
| Sets the rectangle ID. More...
virtual FileWriter * | getFileWriter () const
| Returns the FileWriter object. More...
virtual void | setFileWriter (FileWriter *filewriter_1)
| Sets the FielWriter object. More...
virtual int | checkMouseMove (QPointF point)
| Checks if the mouse is around one of the rectangle corners when we are in the "Modify" mode. More...
virtual int | checkMousePress (QPointF point)
| Checks if the mouse is pressing one of the rectangle corners when we are in the "Modify" mode. More...
virtual void | setIsSelected (bool state)
| Deprecated. Will be removed in a future release.
virtual bool | checkModify () const
| Checks if we are in the "Modify" mode or not. More...
virtual void | setModify (bool state)
| Deprecated. Will be remove in a future release.
virtual CreateFileAbstraction * | getCreateFileAbstraction () const
| Returns the text file. More...
virtual void | setCreateFileAbstraction (CreateFileAbstraction *createfileabstraction_1)
| Sets the text file associated to the image. More...

## Protected Member Functions
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...

## Detailed Description

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

## Constructor & Destructor Documentation

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

## Member Function Documentation

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

CreateFileAbstraction * ImageGraphicsScene::getCreateFileAbstraction | ( |  | ) | const
| virtual

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 the FileWriter object.

Returns
  The FileWriter object

QList< RectangleDraw * > ImageGraphicsScene::getList | ( |  | ) | 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.

void ImageGraphicsScene::setCreateFileAbstraction | ( | CreateFileAbstraction * | createfileabstraction_1 | ) |
| virtual

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

  filewriter_1 | The FileWriter object

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