AntiMicroX
Loading...
Searching...
No Matches
src
dpadpushbuttongroup.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 DPADPUSHBUTTONGROUP_H
20
#define DPADPUSHBUTTONGROUP_H
21
22
#include <QGridLayout>
23
24
class
JoyDPad
;
25
class
QWidget;
26
class
JoyDPadButtonWidget
;
27
class
DPadPushButton
;
28
class
JoyButtonWidget
;
29
class
JoyDPadButton
;
30
31
class
DPadPushButtonGroup
:
public
QGridLayout
32
{
33
Q_OBJECT
34
35
public
:
36
explicit
DPadPushButtonGroup
(
JoyDPad
*
dpad
,
bool
keypadUnlocked
,
bool
displayNames
=
false
, QWidget *parent =
nullptr
);
37
38
JoyDPad
*
getDPad
()
const
;
39
40
protected
:
41
void
generateButtons
();
42
43
signals:
44
void
buttonSlotChanged
();
45
46
public
slots:
47
void
changeButtonLayout
();
48
void
toggleNameDisplay
();
49
50
private
slots:
51
void
propogateSlotsChanged
();
52
void
openDPadButtonDialog
(
JoyButtonWidget
*buttonWidget);
53
void
showDPadDialog
();
54
55
private
:
56
JoyDPad
*
dpad
;
57
bool
keypadUnlocked
;
58
bool
displayNames
;
59
60
JoyDPadButtonWidget
*
upButton
;
61
JoyDPadButtonWidget
*
downButton
;
62
JoyDPadButtonWidget
*
leftButton
;
63
JoyDPadButtonWidget
*
rightButton
;
64
65
JoyDPadButtonWidget
*
upLeftButton
;
66
JoyDPadButtonWidget
*
upRightButton
;
67
JoyDPadButtonWidget
*
downLeftButton
;
68
JoyDPadButtonWidget
*
downRightButton
;
69
70
DPadPushButton
*
dpadWidget
;
71
72
JoyDPadButtonWidget
*
generateBtnForGrid
(QHash<int, JoyDPadButton *> *buttons,
int
dpadDirection,
int
cellRow,
73
int
cellCol);
74
};
75
76
#endif
// DPADPUSHBUTTONGROUP_H
DPadPushButtonGroup
Definition
dpadpushbuttongroup.h:32
DPadPushButtonGroup::keypadUnlocked
bool keypadUnlocked
Definition
dpadpushbuttongroup.h:57
DPadPushButtonGroup::dpad
JoyDPad * dpad
Definition
dpadpushbuttongroup.h:56
DPadPushButtonGroup::buttonSlotChanged
void buttonSlotChanged()
DPadPushButtonGroup::displayNames
bool displayNames
Definition
dpadpushbuttongroup.h:58
DPadPushButtonGroup::upButton
JoyDPadButtonWidget * upButton
Definition
dpadpushbuttongroup.h:60
DPadPushButtonGroup::downRightButton
JoyDPadButtonWidget * downRightButton
Definition
dpadpushbuttongroup.h:68
DPadPushButtonGroup::leftButton
JoyDPadButtonWidget * leftButton
Definition
dpadpushbuttongroup.h:62
DPadPushButtonGroup::upLeftButton
JoyDPadButtonWidget * upLeftButton
Definition
dpadpushbuttongroup.h:65
DPadPushButtonGroup::openDPadButtonDialog
void openDPadButtonDialog(JoyButtonWidget *buttonWidget)
Definition
dpadpushbuttongroup.cpp:117
DPadPushButtonGroup::downLeftButton
JoyDPadButtonWidget * downLeftButton
Definition
dpadpushbuttongroup.h:67
DPadPushButtonGroup::downButton
JoyDPadButtonWidget * downButton
Definition
dpadpushbuttongroup.h:61
DPadPushButtonGroup::getDPad
JoyDPad * getDPad() const
Definition
dpadpushbuttongroup.cpp:115
DPadPushButtonGroup::rightButton
JoyDPadButtonWidget * rightButton
Definition
dpadpushbuttongroup.h:63
DPadPushButtonGroup::propogateSlotsChanged
void propogateSlotsChanged()
Definition
dpadpushbuttongroup.cpp:113
DPadPushButtonGroup::dpadWidget
DPadPushButton * dpadWidget
Definition
dpadpushbuttongroup.h:70
DPadPushButtonGroup::upRightButton
JoyDPadButtonWidget * upRightButton
Definition
dpadpushbuttongroup.h:66
DPadPushButtonGroup::toggleNameDisplay
void toggleNameDisplay()
Definition
dpadpushbuttongroup.cpp:132
DPadPushButtonGroup::changeButtonLayout
void changeButtonLayout()
Definition
dpadpushbuttongroup.cpp:81
DPadPushButtonGroup::showDPadDialog
void showDPadDialog()
Definition
dpadpushbuttongroup.cpp:126
DPadPushButtonGroup::generateBtnForGrid
JoyDPadButtonWidget * generateBtnForGrid(QHash< int, JoyDPadButton * > *buttons, int dpadDirection, int cellRow, int cellCol)
Definition
dpadpushbuttongroup.cpp:66
DPadPushButtonGroup::generateButtons
void generateButtons()
Definition
dpadpushbuttongroup.cpp:45
DPadPushButton
Definition
dpadpushbutton.h:28
JoyButtonWidget
Definition
joybuttonwidget.h:28
JoyDPadButtonWidget
Definition
joydpadbuttonwidget.h:28
JoyDPadButton
Definition
joydpadbutton.h:28
JoyDPad
Definition
joydpad.h:25
Generated by
1.9.8