swift
Loading...
Searching...
No Matches
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
15
16namespace swift::input
17{
22 {
24
25 public:
27 IJoystick(QObject *parent = nullptr);
28
30 ~IJoystick() override = default;
31
33 static std::unique_ptr<IJoystick> create(QObject *parent = nullptr);
34
37
38 signals:
41
42 protected:
44 virtual bool init() { return false; }
45 };
46} // namespace swift::input
47
48#endif // SWIFT_INPUT_JOYSTICK_H
virtual swift::misc::input::CJoystickButtonList getAllAvailableJoystickButtons() const
Get all available joystick buttons.
Definition joystick.h:36
void buttonCombinationChanged(const swift::misc::input::CHotkeyCombination &)
Joystick button combination has changed.
static std::unique_ptr< IJoystick > create(QObject *parent=nullptr)
Creates a native joystick handler object.
Definition joystick.cpp:21
IJoystick(QObject *parent=nullptr)
Constructor.
Definition joystick.cpp:19
~IJoystick()=default
Destructor.
virtual bool init()
Initializes the platform joystick devices.
Definition joystick.h:44
Value object representing hotkey sequence.
Value object encapsulating a list of joystick buttons.
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QObject * parent() const const
#define SWIFT_INPUT_EXPORT
Export a class or function from the library.