AntiMicroX
Public Member Functions | Protected Attributes
BaseEventHandler Class Referenceabstract

Base class for input event handlers. More...

#include <baseeventhandler.h>

Inheritance diagram for BaseEventHandler:
[legend]
Collaboration diagram for BaseEventHandler:
[legend]

Public Member Functions

 BaseEventHandler (QObject *parent=nullptr)
 
virtual ~BaseEventHandler ()
 
virtual bool init ()=0
 
virtual bool cleanup ()=0
 
virtual void sendKeyboardEvent (JoyButtonSlot *slot, bool pressed)=0
 
virtual void sendMouseButtonEvent (JoyButtonSlot *slot, bool pressed)=0
 
virtual void sendMouseEvent (int xDis, int yDis)=0
 Move cursor to selected relative location (deltax delaty) More...
 
virtual void sendMouseAbsEvent (int xDis, int yDis, int screen)
 Move cursor to selected absolute location (x, y) on selected display. More...
 
virtual void sendMouseSpringEvent (int xDis, int yDis, int width, int height)
 Do nothing by default. Useful for child classes to define behavior. More...
 
virtual void sendTextEntryEvent (QString maintext)
 
virtual QString getName ()=0
 
virtual QString getIdentifier ()=0
 
virtual void printPostMessages ()
 Do nothing by default. Allow child classes to specify text to output to a text stream. More...
 
QString getErrorString ()
 

Protected Attributes

QString lastErrorString
 

Detailed Description

Base class for input event handlers.

It manages mouse movements and keyboard strokes

Constructor & Destructor Documentation

◆ BaseEventHandler()

BaseEventHandler::BaseEventHandler ( QObject *  parent = nullptr)
explicit

◆ ~BaseEventHandler()

BaseEventHandler::~BaseEventHandler ( )
virtual

Member Function Documentation

◆ cleanup()

virtual bool BaseEventHandler::cleanup ( )
pure virtual

Implemented in UInputEventHandler, WinSendInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

◆ getErrorString()

QString BaseEventHandler::getErrorString ( )

◆ getIdentifier()

virtual QString BaseEventHandler::getIdentifier ( )
pure virtual

Implemented in UInputEventHandler, WinSendInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

◆ getName()

virtual QString BaseEventHandler::getName ( )
pure virtual

Implemented in UInputEventHandler, WinSendInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

◆ init()

virtual bool BaseEventHandler::init ( )
pure virtual

Implemented in UInputEventHandler, WinSendInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

◆ printPostMessages()

void BaseEventHandler::printPostMessages ( )
virtual

Do nothing by default. Allow child classes to specify text to output to a text stream.

Reimplemented in UInputEventHandler, and XTestEventHandler.

Here is the caller graph for this function:

◆ sendKeyboardEvent()

virtual void BaseEventHandler::sendKeyboardEvent ( JoyButtonSlot slot,
bool  pressed 
)
pure virtual

Implemented in UInputEventHandler, WinSendInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

◆ sendMouseAbsEvent()

void BaseEventHandler::sendMouseAbsEvent ( int  xDis,
int  yDis,
int  screen 
)
virtual

Move cursor to selected absolute location (x, y) on selected display.

Do nothing by default. Useful for child classes to define behavior.

Parameters
Displacementof X coordinate
Displacementof Y coordinate
Screennumber or -1 to use default

Reimplemented in UInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

◆ sendMouseButtonEvent()

virtual void BaseEventHandler::sendMouseButtonEvent ( JoyButtonSlot slot,
bool  pressed 
)
pure virtual

Implemented in UInputEventHandler, WinSendInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

◆ sendMouseEvent()

virtual void BaseEventHandler::sendMouseEvent ( int  xDis,
int  yDis 
)
pure virtual

Move cursor to selected relative location (deltax delaty)

Implemented in UInputEventHandler, WinSendInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

◆ sendMouseSpringEvent()

void BaseEventHandler::sendMouseSpringEvent ( int  xDis,
int  yDis,
int  width,
int  height 
)
virtual

Do nothing by default. Useful for child classes to define behavior.

Parameters
Displacementof X coordinate
Displacementof Y coordinate
Boundingbox width
Boundingbox height

Reimplemented in UInputEventHandler, WinSendInputEventHandler, and XTestEventHandler.

Here is the caller graph for this function:

◆ sendTextEntryEvent()

void BaseEventHandler::sendTextEntryEvent ( QString  maintext)
virtual

Reimplemented in UInputEventHandler, WinSendInputEventHandler, XTestEventHandler, and WinVMultiEventHandler.

Here is the caller graph for this function:

Field Documentation

◆ lastErrorString

QString BaseEventHandler::lastErrorString
protected

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