#include <kgameio.h>
Inheritance diagram for KGameMouseIO:


Signals | |
| void | signalMouseEvent (KGameIO *io, QDataStream &stream, QMouseEvent *m, bool *eatevent) |
| Signal handler for mouse events. | |
Public Member Functions | |
| KGameMouseIO (QWidget *parent, bool trackmouse=false) | |
| Creates a mouse IO device. | |
| virtual | ~KGameMouseIO () |
| void | setMouseTracking (bool b) |
| Manually activate or deactivate mouse tracking. | |
| virtual int | rtti () const |
| The idendification of the IO. | |
Protected Member Functions | |
| bool | eventFilter (QObject *o, QEvent *e) |
| Internal event filter. | |
It is used to process mouse input from a widget and create moves for the player it belongs to.
Definition at line 248 of file kgameio.h.
|
||||||||||||
|
Creates a mouse IO device. It captures all mouse event of the given widget and forwards them to the signal handler signalMouseEvent. Example: KGameMouseIO *input; input=new KGameMouseIO(mView); connect(input,SIGNAL(signalMouseEvent(KGameIO *,QDataStream &,QMouseEvent *,bool *)), this,SLOT(slotMouseInput(KGameIO *,QDataStream &,QMouseEvent *,bool *)));
Definition at line 170 of file kgameio.cpp. |
|
|
Definition at line 181 of file kgameio.cpp. |
|
||||||||||||
|
Internal event filter.
Definition at line 202 of file kgameio.cpp. References KGameIO::player(), KGameIO::sendInput(), and signalMouseEvent(). Here is the call graph for this function: ![]() |
|
|
The idendification of the IO.
Implements KGameIO. Definition at line 189 of file kgameio.cpp. References KGameIO::MouseIO. |
|
|
Manually activate or deactivate mouse tracking.
Definition at line 194 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(). |
1.4.6