QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
QetGraphicsItem Class Referenceabstract

#include <qetgraphicsitem.h>

Inheritance diagram for QetGraphicsItem:
Inheritance graph
Collaboration diagram for QetGraphicsItem:
Collaboration graph

Public Member Functions

 QetGraphicsItem (QGraphicsItem *parent=nullptr)
 QetGraphicsItem::QetGraphicsItem Default constructor.
 
 ~QetGraphicsItem () override=0
 
Diagramdiagram () const
 
virtual void setPos (const QPointF &p)
 
virtual void setPos (qreal x, qreal y)
 
virtual bool isMovable () const
 
virtual void setMovable (bool movable)
 
bool isHovered () const
 
virtual void editProperty ()
 
virtual QString name () const
 
QET::GraphicsItemState state () const
 QetGraphicsItem::state.
 

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 QetGraphicsItem::mouseReleaseEvent handle mouse release click.
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 

Protected Attributes

bool is_movable_
 
bool m_first_move
 
bool snap_to_grid_
 
QPointF m_mouse_to_origin_movement
 
QET::GraphicsItemState m_state = QET:: GIOK
 

Private Attributes

bool m_hovered {false}
 

Constructor & Destructor Documentation

◆ QetGraphicsItem()

QetGraphicsItem::QetGraphicsItem ( QGraphicsItem *  parent = nullptr)

QetGraphicsItem::QetGraphicsItem Default constructor.

Parameters
parent: Parent Item

◆ ~QetGraphicsItem()

QetGraphicsItem::~QetGraphicsItem ( )
overridepure virtual

Member Function Documentation

◆ diagram()

Diagram * QetGraphicsItem::diagram ( ) const
  @brief QetGraphicsItem::diagram

return the diagram of this item

◆ editProperty()

virtual void QetGraphicsItem::editProperty ( )
inlinevirtual

Reimplemented in DiagramImageItem, Element, and QetShapeItem.

Here is the caller graph for this function:

◆ hoverEnterEvent()

void QetGraphicsItem::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected
Here is the caller graph for this function:

◆ hoverLeaveEvent()

void QetGraphicsItem::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected
Here is the caller graph for this function:

◆ isHovered()

bool QetGraphicsItem::isHovered ( ) const
Here is the caller graph for this function:

◆ isMovable()

virtual bool QetGraphicsItem::isMovable ( ) const
inlinevirtual
Here is the caller graph for this function:

◆ mouseDoubleClickEvent()

void QetGraphicsItem::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected
  @brief QetGraphicsItem::mouseDoubleClickEvent

handle the mouse double click

Parameters
event
Here is the call graph for this function:

◆ mouseMoveEvent()

void QetGraphicsItem::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected
  @brief QetGraphicsItem::mouseMoveEvent

handle mouse movement

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

◆ mousePressEvent()

void QetGraphicsItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected
  @brief QetGraphicsItem::mousePressEvent

handle the mouse click

Parameters
event
Here is the caller graph for this function:

◆ mouseReleaseEvent()

void QetGraphicsItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

QetGraphicsItem::mouseReleaseEvent handle mouse release click.

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

◆ name()

virtual QString QetGraphicsItem::name ( ) const
inlinevirtual

Reimplemented in DiagramImageItem, Element, QetShapeItem, and TerminalStripItem.

Here is the caller graph for this function:

◆ setMovable()

virtual void QetGraphicsItem::setMovable ( bool  movable)
inlinevirtual
Here is the caller graph for this function:

◆ setPos() [1/2]

void QetGraphicsItem::setPos ( const QPointF &  p)
virtual
  @brief QetGraphicsItem::setPos

set the position of the item to p

Parameters
pthe new position of item
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPos() [2/2]

void QetGraphicsItem::setPos ( qreal  x,
qreal  y 
)
virtual
  @brief QetGraphicsItem::setPos

set the position of the item

Parameters
xnew abscisse of item
ynew ordonne of item
Here is the call graph for this function:

◆ state()

QET::GraphicsItemState QetGraphicsItem::state ( ) const

QetGraphicsItem::state.

Returns
the current state of this item
Here is the caller graph for this function:

Member Data Documentation

◆ is_movable_

bool QetGraphicsItem::is_movable_
protected

◆ m_first_move

bool QetGraphicsItem::m_first_move
protected

◆ m_hovered

bool QetGraphicsItem::m_hovered {false}
private

◆ m_mouse_to_origin_movement

QPointF QetGraphicsItem::m_mouse_to_origin_movement
protected

◆ m_state

QET::GraphicsItemState QetGraphicsItem::m_state = QET:: GIOK
protected

◆ snap_to_grid_

bool QetGraphicsItem::snap_to_grid_
protected

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