swift
src
input
joystick.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (C) 2014 swift Project Community / Contributors
2
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6
#ifndef SWIFT_INPUT_JOYSTICK_H
7
#define SWIFT_INPUT_JOYSTICK_H
8
9
#include <memory>
10
11
#include <QObject>
12
13
#include "
input/swiftinputexport.h
"
14
#include "
misc/input/hotkeycombination.h
"
15
16
namespace
swift::input
17
{
21
class
SWIFT_INPUT_EXPORT
IJoystick
:
public
QObject
22
{
23
Q_OBJECT
24
25
public
:
27
IJoystick
(QObject *parent =
nullptr
);
28
30
virtual
~IJoystick
() {}
31
33
static
std::unique_ptr<IJoystick> create(QObject *parent =
nullptr
);
34
36
virtual
swift::misc::input::CJoystickButtonList
getAllAvailableJoystickButtons
()
const
{
return
{}; }
37
38
signals:
40
void
buttonCombinationChanged
(
const
swift::misc::input::CHotkeyCombination
&);
41
42
protected
:
44
virtual
bool
init
() {
return
false
; }
45
};
46
}
// namespace swift::input
47
48
#endif
// SWIFT_INPUT_JOYSTICK_H
swift::input::IJoystick
Abstract interface for native joystick handling.
Definition:
joystick.h:22
swift::input::IJoystick::getAllAvailableJoystickButtons
virtual swift::misc::input::CJoystickButtonList getAllAvailableJoystickButtons() const
Get all available joystick buttons.
Definition:
joystick.h:36
swift::input::IJoystick::~IJoystick
virtual ~IJoystick()
Destructor.
Definition:
joystick.h:30
swift::input::IJoystick::buttonCombinationChanged
void buttonCombinationChanged(const swift::misc::input::CHotkeyCombination &)
Joystick button combination has changed.
swift::input::IJoystick::init
virtual bool init()
Initializes the platform joystick devices.
Definition:
joystick.h:44
swift::misc::input::CHotkeyCombination
Value object representing hotkey sequence.
Definition:
hotkeycombination.h:26
swift::misc::input::CJoystickButtonList
Value object encapsulating a list of joystick buttons.
Definition:
joystickbuttonlist.h:27
hotkeycombination.h
swiftinputexport.h
SWIFT_INPUT_EXPORT
#define SWIFT_INPUT_EXPORT
Export a class or function from the library.
Definition:
swiftinputexport.h:20
Generated on Mon Mar 24 2025 16:42:21 for swift by
1.9.1