swift
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"
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 
37 
38  signals:
41 
42  protected:
44  virtual bool init() { return false; }
45  };
46 } // namespace swift::input
47 
48 #endif // SWIFT_INPUT_JOYSTICK_H
Abstract interface for native joystick handling.
Definition: joystick.h:22
virtual swift::misc::input::CJoystickButtonList getAllAvailableJoystickButtons() const
Get all available joystick buttons.
Definition: joystick.h:36
virtual ~IJoystick()
Destructor.
Definition: joystick.h:30
void buttonCombinationChanged(const swift::misc::input::CHotkeyCombination &)
Joystick button combination has changed.
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.
#define SWIFT_INPUT_EXPORT
Export a class or function from the library.