QElectroTech  0.70
Signals | Public Member Functions | Protected Attributes | List of all members
DVEventInterface Class Referenceabstract

The DVEventInterface class This class is the main interface for manage event of a Diagram View. This do nothing, for create new event behavior, we must to create new class from this. Each method return a bool: True if the methode do something else return false. Each method of DVEventInterface return false; isRunning() return true if action is started but not finish. By default return false. isFinish() return true when the action is finish, or not started. By default return true. More...

#include <dveventinterface.h>

Signals

void finish ()
 finish emited when the interface finish is work More...
 

Public Member Functions

 DVEventInterface (DiagramView *dv)
 
 ~DVEventInterface () override=0
 
virtual bool mouseDoubleClickEvent (QMouseEvent *event)
 
virtual bool mousePressEvent (QMouseEvent *event)
 
virtual bool mouseMoveEvent (QMouseEvent *event)
 
virtual bool mouseReleaseEvent (QMouseEvent *event)
 
virtual bool wheelEvent (QWheelEvent *event)
 
virtual bool keyPressEvent (QKeyEvent *event)
 DVEventInterface::keyPressEvent By default, press escape key abort the curent action. isFinish return true, and emit finish. More...
 
virtual bool KeyReleaseEvent (QKeyEvent *event)
 
virtual bool isRunning () const
 
virtual bool isFinish () const
 

Protected Attributes

DiagramViewm_dv
 
Diagramm_diagram
 
bool m_running
 
bool m_abort
 

Detailed Description

The DVEventInterface class This class is the main interface for manage event of a Diagram View. This do nothing, for create new event behavior, we must to create new class from this. Each method return a bool: True if the methode do something else return false. Each method of DVEventInterface return false; isRunning() return true if action is started but not finish. By default return false. isFinish() return true when the action is finish, or not started. By default return true.

Definition at line 38 of file dveventinterface.h.

Constructor & Destructor Documentation

◆ DVEventInterface()

DVEventInterface::DVEventInterface ( DiagramView dv)

Definition at line 22 of file dveventinterface.cpp.

◆ ~DVEventInterface()

DVEventInterface::~DVEventInterface ( )
overridepure virtual

Definition at line 31 of file dveventinterface.cpp.

Member Function Documentation

◆ finish

void DVEventInterface::finish ( )
signal

finish emited when the interface finish is work

Referenced by keyPressEvent(), and DiagramView::setEventInterface().

◆ isFinish()

bool DVEventInterface::isFinish ( ) const
virtual

Definition at line 87 of file dveventinterface.cpp.

References m_running.

◆ isRunning()

bool DVEventInterface::isRunning ( ) const
virtual

Definition at line 83 of file dveventinterface.cpp.

References m_running.

◆ keyPressEvent()

bool DVEventInterface::keyPressEvent ( QKeyEvent *  event)
virtual

DVEventInterface::keyPressEvent By default, press escape key abort the curent action. isFinish return true, and emit finish.

Parameters
event
Returns

Definition at line 66 of file dveventinterface.cpp.

References finish(), m_abort, and m_running.

Referenced by DiagramView::keyPressEvent().

◆ KeyReleaseEvent()

bool DVEventInterface::KeyReleaseEvent ( QKeyEvent *  event)
virtual

Definition at line 78 of file dveventinterface.cpp.

Referenced by DiagramView::keyReleaseEvent().

◆ mouseDoubleClickEvent()

bool DVEventInterface::mouseDoubleClickEvent ( QMouseEvent *  event)
virtual

Definition at line 34 of file dveventinterface.cpp.

◆ mouseMoveEvent()

bool DVEventInterface::mouseMoveEvent ( QMouseEvent *  event)
virtual

Definition at line 44 of file dveventinterface.cpp.

Referenced by DiagramView::mouseMoveEvent().

◆ mousePressEvent()

bool DVEventInterface::mousePressEvent ( QMouseEvent *  event)
virtual

Definition at line 39 of file dveventinterface.cpp.

Referenced by DiagramView::mousePressEvent().

◆ mouseReleaseEvent()

bool DVEventInterface::mouseReleaseEvent ( QMouseEvent *  event)
virtual

Definition at line 49 of file dveventinterface.cpp.

Referenced by DiagramView::mouseReleaseEvent().

◆ wheelEvent()

bool DVEventInterface::wheelEvent ( QWheelEvent *  event)
virtual

Definition at line 54 of file dveventinterface.cpp.

Referenced by DiagramView::wheelEvent().

Member Data Documentation

◆ m_abort

bool DVEventInterface::m_abort
protected

Definition at line 66 of file dveventinterface.h.

Referenced by keyPressEvent().

◆ m_diagram

Diagram* DVEventInterface::m_diagram
protected

Definition at line 64 of file dveventinterface.h.

◆ m_dv

DiagramView* DVEventInterface::m_dv
protected

Definition at line 63 of file dveventinterface.h.

◆ m_running

bool DVEventInterface::m_running
protected

Definition at line 65 of file dveventinterface.h.

Referenced by isFinish(), isRunning(), and keyPressEvent().


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