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

The DiagramEventAddShape class This event manage the creation of a shape. More...

#include <diagrameventaddshape.h>

Inheritance diagram for DiagramEventAddShape:
Inheritance graph
Collaboration diagram for DiagramEventAddShape:
Collaboration graph

Public Member Functions

 DiagramEventAddShape (Diagram *diagram, QetShapeItem::ShapeType shape_type)
 DiagramEventAddShape::DiagramEventAddShape Default constructor. More...
 
 ~DiagramEventAddShape () override
 DiagramEventAddShape::~DiagramEventAddShape. More...
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 DiagramEventAddShape::mousePressEvent Action when mouse is pressed. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 DiagramEventAddShape::mouseMoveEvent Action when mouse move. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 DiagramEventAddShape::mouseReleaseEvent Action when mouse button is released. More...
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 DiagramEventAddShape::mouseDoubleClickEvent Action when mouse button is double clicked. More...
 
void init () override
 
- Public Member Functions inherited from DiagramEventInterface
 DiagramEventInterface (Diagram *diagram)
 
 ~DiagramEventInterface () override=0
 
virtual void wheelEvent (QGraphicsSceneWheelEvent *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
 

Protected Attributes

QetShapeItem::ShapeType m_shape_type
 
QetShapeItemm_shape_item
 
QGraphicsLineItem * m_help_horiz
 
QGraphicsLineItem * m_help_verti
 
- Protected Attributes inherited from DiagramEventInterface
Diagramm_diagram
 
bool m_running
 
bool m_abort
 

Private Member Functions

void updateHelpCross (const QPointF &p)
 DiagramEventAddShape::updateHelpCross Create and update the position of the cross to help user for draw new shape. More...
 

Additional Inherited Members

- Signals inherited from DiagramEventInterface
void finish ()
 

Detailed Description

The DiagramEventAddShape class This event manage the creation of a shape.

Constructor & Destructor Documentation

◆ DiagramEventAddShape()

DiagramEventAddShape::DiagramEventAddShape ( Diagram diagram,
QetShapeItem::ShapeType  shape_type 
)

DiagramEventAddShape::DiagramEventAddShape Default constructor.

Parameters
diagram: the diagram where this event must operate
shape_type: the type of shape to draw
Here is the call graph for this function:

◆ ~DiagramEventAddShape()

DiagramEventAddShape::~DiagramEventAddShape ( )
override

DiagramEventAddShape::~DiagramEventAddShape.

Here is the call graph for this function:

Member Function Documentation

◆ init()

void DiagramEventAddShape::init ( )
overridevirtual

Reimplemented from DiagramEventInterface.

Here is the caller graph for this function:

◆ mouseDoubleClickEvent()

void DiagramEventAddShape::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overridevirtual

DiagramEventAddShape::mouseDoubleClickEvent Action when mouse button is double clicked.

Parameters
event: event of mouse double click

Reimplemented from DiagramEventInterface.

Here is the call graph for this function:

◆ mouseMoveEvent()

void DiagramEventAddShape::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overridevirtual

DiagramEventAddShape::mouseMoveEvent Action when mouse move.

Parameters
event: event of mouse move

Reimplemented from DiagramEventInterface.

Here is the call graph for this function:

◆ mousePressEvent()

void DiagramEventAddShape::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overridevirtual

DiagramEventAddShape::mousePressEvent Action when mouse is pressed.

Parameters
event: event of mouse press

Reimplemented from DiagramEventInterface.

Here is the call graph for this function:

◆ mouseReleaseEvent()

void DiagramEventAddShape::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overridevirtual

DiagramEventAddShape::mouseReleaseEvent Action when mouse button is released.

Parameters
event: event of mouse release

Reimplemented from DiagramEventInterface.

Here is the call graph for this function:

◆ updateHelpCross()

void DiagramEventAddShape::updateHelpCross ( const QPointF &  p)
private

DiagramEventAddShape::updateHelpCross Create and update the position of the cross to help user for draw new shape.

Parameters
p: the center of the cross
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_help_horiz

QGraphicsLineItem* DiagramEventAddShape::m_help_horiz
protected

◆ m_help_verti

QGraphicsLineItem * DiagramEventAddShape::m_help_verti
protected

◆ m_shape_item

QetShapeItem* DiagramEventAddShape::m_shape_item
protected

◆ m_shape_type

QetShapeItem::ShapeType DiagramEventAddShape::m_shape_type
protected

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