KGameMouseIO Class Reference
The KGameMouseIO class. More...
#include <kgameio.h>
Inheritance diagram for KGameMouseIO:

Signals | |
void | signalMouseEvent (KGameIO *io, QDataStream &stream, QMouseEvent *m, bool *eatevent) |
Public Member Functions | |
KGameMouseIO (QWidget *parent, bool trackmouse=false) | |
void | setMouseTracking (bool b) |
virtual int | rtti () const |
Protected Member Functions | |
bool | eventFilter (QObject *o, QEvent *e) |
Detailed Description
The KGameMouseIO class.It is used to process mouse input from a widget and create moves for the player it belongs to.
- Author:
- Martin Heni <martin@heni-online.de>
Definition at line 248 of file kgameio.h.
Constructor & Destructor Documentation
|
Creates a mouse IO device. It captures all mouse event of the given widget and forwards them to the signal handler signalMouseEvent. Example:
Definition at line 170 of file kgameio.cpp. References KGameMouseIO(), and QWidget::setMouseTracking(). Referenced by KGameMouseIO(). |
Member Function Documentation
|
Manually activate or deactivate mouse tracking.
Definition at line 194 of file kgameio.cpp. References QObject::parent(), and setMouseTracking(). Referenced by setMouseTracking(). |
|
The idendification of the IO.
Implements KGameIO. Definition at line 189 of file kgameio.cpp. |
|
Signal handler for mouse events. This function is called on every mouse event. If appropriate it can generate a move for the player the device belongs to. If this is done and the event is eaten eatevent needs to be set to true.
Referenced by eventFilter(). |
|
Internal event filter.
Reimplemented from QObject. Definition at line 202 of file kgameio.cpp. References eventFilter(), KGameIO::player(), signalMouseEvent(), and QEvent::type(). Referenced by eventFilter(). |
The documentation for this class was generated from the following files: