AntiMicroX
Loading...
Searching...
No Matches
winvmultieventhandler.h
Go to the documentation of this file.
1/* antimicro Gamepad to KB+M event mapper
2 * Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef WINVMULTIEVENTHANDLER_H
19#define WINVMULTIEVENTHANDLER_H
20
21#include <QObject>
22#include <QVector>
23
24#include "baseeventhandler.h"
25
26#include <joybuttonslot.h>
27
28#include <vmulticlient.h>
29
31#include <antkeymapper.h>
32
34{
35 Q_OBJECT
36 public:
37 explicit WinVMultiEventHandler(QObject *parent = 0);
39
40 virtual bool init();
41 virtual bool cleanup();
42 virtual void sendKeyboardEvent(JoyButtonSlot *slot, bool pressed);
43 virtual void sendMouseButtonEvent(JoyButtonSlot *slot, bool pressed);
44 virtual void sendMouseEvent(int xDis, int yDis);
45 virtual void sendMouseAbsEvent(int xDis, int yDis, int screen);
46 virtual void sendMouseSpringEvent(unsigned int xDis, unsigned int yDis, unsigned int width, unsigned int height);
47
48 // TODO: Implement text event using information from QtWinKeyMapper.
49 virtual void sendTextEntryEvent(QString maintext);
50
51 virtual QString getName();
52 virtual QString getIdentifier();
53
54 protected:
55 pvmulti_client vmulti;
60 QVector<BYTE> keyboardKeys;
63
64 signals:
65
66 public slots:
67};
68
69#endif // WINVMULTIEVENTHANDLER_H
Base class for input event handlers.
Definition baseeventhandler.h:33
Represents action which can be performed after pressing button.
Definition joybuttonslot.h:38
Base class for platform-specific Qt key mappers.
Definition qtkeymapperbase.h:42
Input event handler class for Windows.
Definition winsendinputeventhandler.h:34
Definition winvmultieventhandler.h:34
virtual void sendMouseEvent(int xDis, int yDis)
Move cursor to selected relative location (deltax delaty)
Definition winvmultieventhandler.cpp:341
virtual void sendKeyboardEvent(JoyButtonSlot *slot, bool pressed)
Definition winvmultieventhandler.cpp:92
virtual void sendMouseSpringEvent(unsigned int xDis, unsigned int yDis, unsigned int width, unsigned int height)
Definition winvmultieventhandler.cpp:346
QtKeyMapperBase * nativeKeyMapper
Definition winvmultieventhandler.h:62
virtual void sendTextEntryEvent(QString maintext)
Definition winvmultieventhandler.cpp:367
virtual bool cleanup()
Definition winvmultieventhandler.cpp:75
pvmulti_client vmulti
Definition winvmultieventhandler.h:55
QVector< BYTE > keyboardKeys
Definition winvmultieventhandler.h:60
BYTE shiftKeys
Definition winvmultieventhandler.h:57
virtual void sendMouseButtonEvent(JoyButtonSlot *slot, bool pressed)
Definition winvmultieventhandler.cpp:277
virtual QString getName()
Definition winvmultieventhandler.cpp:369
BYTE extraKeys
Definition winvmultieventhandler.h:59
WinSendInputEventHandler sendInputHandler
Definition winvmultieventhandler.h:61
virtual void sendMouseAbsEvent(int xDis, int yDis, int screen)
Move cursor to selected absolute location (x, y) on selected display.
Definition winvmultieventhandler.cpp:357
~WinVMultiEventHandler()
Definition winvmultieventhandler.cpp:43
BYTE multiKeys
Definition winvmultieventhandler.h:58
virtual QString getIdentifier()
Definition winvmultieventhandler.cpp:371
BYTE mouseButtons
Definition winvmultieventhandler.h:56
virtual bool init()
Definition winvmultieventhandler.cpp:45