AntiMicroX
Loading...
Searching...
No Matches
xtesteventhandler.h
Go to the documentation of this file.
1/* antimicrox Gamepad to KB+M event mapper
2 * Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com>
3 * Copyright (C) 2020 Jagoda Górska <juliagoda.pl@protonmail>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef XTESTEVENTHANDLER_H
20#define XTESTEVENTHANDLER_H
21
22#include "baseeventhandler.h"
23
24class JoyButtonSlot;
25
27{
28 Q_OBJECT
29
30 public:
31 explicit XTestEventHandler(QObject *parent = nullptr);
32 virtual ~XTestEventHandler();
33
34 bool init() override;
35 bool cleanup() override;
36
37 void sendKeyboardEvent(JoyButtonSlot *slot, bool pressed) override;
38 void sendMouseButtonEvent(JoyButtonSlot *slot, bool pressed) override;
39 void sendMouseEvent(int xDis, int yDis) override;
40 void sendMouseAbsEvent(int xDis, int yDis, int screen) override;
41
42 void sendMouseSpringEvent(int xDis, int yDis, int width, int height) override;
43
44 void sendTextEntryEvent(QString maintext) override;
45
46 QString getName() override;
47 QString getIdentifier() override;
48 void printPostMessages() override;
49};
50
51#endif // XTESTEVENTHANDLER_H
Base class for input event handlers.
Definition baseeventhandler.h:33
Represents action which can be performed after pressing button.
Definition joybuttonslot.h:38
Definition xtesteventhandler.h:27
void sendMouseSpringEvent(int xDis, int yDis, int width, int height) override
Do nothing by default. Useful for child classes to define behavior.
Definition xtesteventhandler.cpp:174
virtual ~XTestEventHandler()
Definition xtesteventhandler.cpp:36
bool init() override
Definition xtesteventhandler.cpp:38
void sendMouseAbsEvent(int xDis, int yDis, int screen) override
Move cursor to selected absolute location (x, y) on selected display.
Definition xtesteventhandler.cpp:93
QString getName() override
Definition xtesteventhandler.cpp:100
void sendMouseEvent(int xDis, int yDis) override
Move cursor to selected relative location (deltax delaty)
Definition xtesteventhandler.cpp:86
void sendKeyboardEvent(JoyButtonSlot *slot, bool pressed) override
Definition xtesteventhandler.cpp:52
void sendTextEntryEvent(QString maintext) override
Definition xtesteventhandler.cpp:104
bool cleanup() override
Definition xtesteventhandler.cpp:50
QString getIdentifier() override
Definition xtesteventhandler.cpp:102
void printPostMessages() override
Do nothing by default. Allow child classes to specify text to output to a text stream.
Definition xtesteventhandler.cpp:182
void sendMouseButtonEvent(JoyButtonSlot *slot, bool pressed) override
Definition xtesteventhandler.cpp:72