QElectroTech  0.8-dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DiagramEventAddImage Class Reference

The DiagramEventAddImage class This diagram event, handle the adding of an image in a diagram. More...

#include <diagrameventaddimage.h>

Inheritance diagram for DiagramEventAddImage:
Inheritance graph
Collaboration diagram for DiagramEventAddImage:
Collaboration graph

Public Member Functions

 DiagramEventAddImage (Diagram *diagram)
 DiagramEventAddImage::DiagramEventAddImage Default constructor. More...
 
 ~DiagramEventAddImage () override
 DiagramEventAddImage::~DiagramEventAddImage. More...
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 DiagramEventAddImage::mousePressEvent Action when mouse is pressed. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 DiagramEventAddImage::mouseMoveEvent Action when mouse move. More...
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 DiagramEventAddImage::mouseDoubleClickEvent This method is only use to overwrite double click. When double click, image propertie dialog isn't open. More...
 
void wheelEvent (QGraphicsSceneWheelEvent *event) override
 DiagramEventAddImage::wheelEvent Action when mouse wheel is rotate. More...
 
bool isNull () const
 DiagramEventAddImage::isNull. More...
 
- Public Member Functions inherited from DiagramEventInterface
 DiagramEventInterface (Diagram *diagram)
 
 ~DiagramEventInterface () override=0
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 DiagramEventInterface::keyPressEvent By default, press escape key abort the curent action. More...
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual bool isRunning () const
 
virtual void init ()
 

Private Member Functions

void openDialog ()
 DiagramEventAddImage::openDialog Open dialog for select the image to add. More...
 

Private Attributes

DiagramImageItemm_image
 
bool m_is_added
 

Additional Inherited Members

- Signals inherited from DiagramEventInterface
void finish ()
 
- Protected Attributes inherited from DiagramEventInterface
Diagramm_diagram
 
bool m_running
 
bool m_abort
 

Detailed Description

The DiagramEventAddImage class This diagram event, handle the adding of an image in a diagram.

Constructor & Destructor Documentation

◆ DiagramEventAddImage()

DiagramEventAddImage::DiagramEventAddImage ( Diagram diagram)

DiagramEventAddImage::DiagramEventAddImage Default constructor.

Parameters
diagram: diagram where operate this event
Here is the call graph for this function:

◆ ~DiagramEventAddImage()

DiagramEventAddImage::~DiagramEventAddImage ( )
override

DiagramEventAddImage::~DiagramEventAddImage.

Here is the call graph for this function:

Member Function Documentation

◆ isNull()

bool DiagramEventAddImage::isNull ( ) const

DiagramEventAddImage::isNull.

Returns
: true if image can't be loaded, otherwise return false.
Here is the caller graph for this function:

◆ mouseDoubleClickEvent()

void DiagramEventAddImage::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overridevirtual

DiagramEventAddImage::mouseDoubleClickEvent This method is only use to overwrite double click. When double click, image propertie dialog isn't open.

Parameters
event: event of mouse double click.

Reimplemented from DiagramEventInterface.

◆ mouseMoveEvent()

void DiagramEventAddImage::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overridevirtual

DiagramEventAddImage::mouseMoveEvent Action when mouse move.

Parameters
event: event of mouse move

Reimplemented from DiagramEventInterface.

Here is the call graph for this function:

◆ mousePressEvent()

void DiagramEventAddImage::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overridevirtual

DiagramEventAddImage::mousePressEvent Action when mouse is pressed.

Parameters
event: event of mouse pressed

Reimplemented from DiagramEventInterface.

Here is the call graph for this function:

◆ openDialog()

void DiagramEventAddImage::openDialog ( )
private

DiagramEventAddImage::openDialog Open dialog for select the image to add.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wheelEvent()

void DiagramEventAddImage::wheelEvent ( QGraphicsSceneWheelEvent *  event)
overridevirtual

DiagramEventAddImage::wheelEvent Action when mouse wheel is rotate.

Parameters
eventevet of mouse wheel

Reimplemented from DiagramEventInterface.

Member Data Documentation

◆ m_image

DiagramImageItem* DiagramEventAddImage::m_image
private

◆ m_is_added

bool DiagramEventAddImage::m_is_added
private

The documentation for this class was generated from the following files: