AntiMicroX
Loading...
Searching...
No Matches
src
joysensorbuttonpushbutton.h
Go to the documentation of this file.
1
/* antimicrox Gamepad to KB+M event mapper
2
* Copyright (C) 2022 Max Maisel <max.maisel@posteo.de>
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
#pragma once
18
19
#include "
flashbuttonwidget.h
"
20
21
class
JoySensorButton
;
22
class
QWidget;
23
27
class
JoySensorButtonPushButton
:
public
FlashButtonWidget
28
{
29
Q_OBJECT
30
Q_PROPERTY
(
bool
isflashing
READ
isButtonFlashing
)
31
32
public
:
33
explicit
JoySensorButtonPushButton
(
JoySensorButton
*button,
bool
displayNames, QWidget *
parent
=
nullptr
);
34
35
JoySensorButton
*
getButton
();
36
void
tryFlash
();
37
38
protected
:
39
virtual
QString
generateLabel
()
override
;
40
41
public
slots
:
42
void
disableFlashes
()
override
;
43
void
enableFlashes
()
override
;
44
45
private
slots
:
46
void
showContextMenu
(
const
QPoint
&
point
);
47
48
private
:
49
JoySensorButton
*
m_button
;
50
};
FlashButtonWidget
Definition
flashbuttonwidget.h:28
FlashButtonWidget::isButtonFlashing
bool isButtonFlashing()
Definition
flashbuttonwidget.cpp:68
JoyDPadXml
Definition
joydpadxml.h:27
JoySensorButtonPushButton
A direction button in the SensorPushButtonGroup.
Definition
joysensorbuttonpushbutton.h:28
JoySensorButtonPushButton::m_button
JoySensorButton * m_button
Definition
joysensorbuttonpushbutton.h:49
JoySensorButtonPushButton::tryFlash
void tryFlash()
Highlights the button when mapped button is active.
Definition
joysensorbuttonpushbutton.cpp:113
JoySensorButtonPushButton::showContextMenu
void showContextMenu(const QPoint &point)
Shows sensor context menu.
Definition
joysensorbuttonpushbutton.cpp:102
JoySensorButtonPushButton::isflashing
bool isflashing
Definition
joysensorbuttonpushbutton.h:30
JoySensorButtonPushButton::enableFlashes
void enableFlashes() override
Enables highlight when the sensor axis is moved.
Definition
joysensorbuttonpushbutton.cpp:64
JoySensorButtonPushButton::generateLabel
virtual QString generateLabel() override
Generate the string that will be displayed on the button.
Definition
joysensorbuttonpushbutton.cpp:77
JoySensorButtonPushButton::getButton
JoySensorButton * getButton()
Get the JoySensorButton for this mapping.
Definition
joysensorbuttonpushbutton.cpp:46
JoySensorButtonPushButton::disableFlashes
void disableFlashes() override
Disables highlight when the sensor axis is moved.
Definition
joysensorbuttonpushbutton.cpp:51
JoySensorButton
Represents a sensor mapping in a SetJoystick.
Definition
joysensorbutton.h:31
flashbuttonwidget.h
Generated by
1.9.8