AntiMicroX
Loading...
Searching...
No Matches
joycontrolstickstatusbox.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 JOYCONTROLSTICKSTATUSBOX_H
20#define JOYCONTROLSTICKSTATUSBOX_H
21
22#include <QSize>
23#include <QWidget>
24
25class JoyControlStick;
26class QPaintEvent;
27
28class JoyControlStickStatusBox : public QWidget
29{
31
32 public:
33 explicit JoyControlStickStatusBox(QWidget *parent = nullptr);
34 explicit JoyControlStickStatusBox(JoyControlStick *stick, QWidget *parent = nullptr);
35
36 void setStick(JoyControlStick *stick);
37
39
40 virtual int heightForWidth(int width) const;
41 QSize sizeHint() const;
42
43 protected:
44 virtual void paintEvent(QPaintEvent *event);
45 void drawEightWayBox();
48
49 private:
51};
52
53#endif // JOYCONTROLSTICKSTATUSBOX_H
Definition joycontrolstickstatusbox.h:29
void drawEightWayBox()
Definition joycontrolstickstatusbox.cpp:101
void drawFourWayDiagonalBox()
Definition joycontrolstickstatusbox.cpp:444
void setStick(JoyControlStick *stick)
Definition joycontrolstickstatusbox.cpp:49
virtual int heightForWidth(int width) const
Definition joycontrolstickstatusbox.cpp:76
QSize sizeHint() const
Definition joycontrolstickstatusbox.cpp:78
JoyControlStick * getStick() const
Definition joycontrolstickstatusbox.cpp:74
JoyControlStick * m_stick
Definition joycontrolstickstatusbox.h:50
void drawFourWayCardinalBox()
Definition joycontrolstickstatusbox.cpp:275
virtual void paintEvent(QPaintEvent *event)
Definition joycontrolstickstatusbox.cpp:80
Represents stick of a joystick.
Definition joycontrolstick.h:38
Definition joydpadxml.h:27