QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
DVEventInterface Class Referenceabstract

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

#include <dveventinterface.h>

Inherits QObject.

Collaboration diagram for DVEventInterface:
Collaboration graph

Signals

void finish ()
 finish emitted when the interface finishes its job

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 current action. isFinish return true, and emit finish.
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 does nothing, to create new event behavior, we must create new class from this. Each method returns a bool: True if the method does something, else return false. Each method of DVEventInterface returns false; isRunning() returns true if action is started but not finished. By default: return false. isFinish() returns true when the action is finished, or not started. By default: return true.

Constructor & Destructor Documentation

◆ DVEventInterface()

DVEventInterface::DVEventInterface ( DiagramView * dv)

◆ ~DVEventInterface()

DVEventInterface::~DVEventInterface ( )
overridepure virtual

Member Function Documentation

◆ finish

void DVEventInterface::finish ( )
signal

finish emitted when the interface finishes its job

Here is the caller graph for this function:

◆ isFinish()

bool DVEventInterface::isFinish ( ) const
virtual

◆ isRunning()

bool DVEventInterface::isRunning ( ) const
virtual

◆ keyPressEvent()

bool DVEventInterface::keyPressEvent ( QKeyEvent * event)
virtual

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

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

◆ KeyReleaseEvent()

bool DVEventInterface::KeyReleaseEvent ( QKeyEvent * event)
virtual

◆ mouseDoubleClickEvent()

bool DVEventInterface::mouseDoubleClickEvent ( QMouseEvent * event)
virtual

◆ mouseMoveEvent()

bool DVEventInterface::mouseMoveEvent ( QMouseEvent * event)
virtual

◆ mousePressEvent()

bool DVEventInterface::mousePressEvent ( QMouseEvent * event)
virtual

◆ mouseReleaseEvent()

bool DVEventInterface::mouseReleaseEvent ( QMouseEvent * event)
virtual

◆ wheelEvent()

bool DVEventInterface::wheelEvent ( QWheelEvent * event)
virtual

Member Data Documentation

◆ m_abort

bool DVEventInterface::m_abort
protected

◆ m_diagram

Diagram* DVEventInterface::m_diagram
protected

◆ m_dv

DiagramView* DVEventInterface::m_dv
protected

◆ m_running

bool DVEventInterface::m_running
protected

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