QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
JoystickManager Class Reference

#include <JoystickManager.h>

+ Inheritance diagram for JoystickManager:
+ Collaboration diagram for JoystickManager:

Public Slots

void init ()
 

Signals

void activeJoystickChanged (Joystick *joystick)
 
void activeJoystickEnabledForActiveVehicleChanged ()
 
void availableJoystickNamesChanged ()
 

Public Member Functions

 JoystickManager (QObject *parent=nullptr)
 Number of connected joysticks.
 
 ~JoystickManager () override
 
QStringList availableJoystickNames () const
 
int joystickCount () const
 
JoystickactiveJoystick ()
 
bool activeJoystickEnabledForActiveVehicle () const
 
void setActiveJoystickEnabledForActiveVehicle (bool enabled)
 
Q_INVOKABLE QStringList linkedGroupMembers (const QString &groupId) const
 
Q_INVOKABLE JoystickjoystickByName (const QString &name) const
 Get joystick by name (returns nullptr if not found)
 

Static Public Member Functions

static JoystickManagerinstance ()
 

Detailed Description

Definition at line 12 of file JoystickManager.h.

Constructor & Destructor Documentation

◆ JoystickManager()

JoystickManager::JoystickManager ( QObject *  parent = nullptr)
explicit

Number of connected joysticks.

List of available joystick names Note: The active joystick name may be not in this list if the joystick is not currently connected

Definition at line 25 of file JoystickManager.cc.

References MultiVehicleManager::activeVehicleChanged(), AndroidEvents::instance(), MultiVehicleManager::instance(), SDLJoystick::pumpEvents(), Fact::rawValueChanged(), and AndroidEvents::resumed().

◆ ~JoystickManager()

JoystickManager::~JoystickManager ( )
override

Definition at line 64 of file JoystickManager.cc.

References JoystickSDL::shutdown().

Member Function Documentation

◆ activeJoystick()

Joystick * JoystickManager::activeJoystick ( )

Definition at line 166 of file JoystickManager.cc.

Referenced by JoystickComponent::setupComplete().

◆ activeJoystickChanged

void JoystickManager::activeJoystickChanged ( Joystick joystick)
signal

◆ activeJoystickEnabledForActiveVehicle()

bool JoystickManager::activeJoystickEnabledForActiveVehicle ( ) const

◆ activeJoystickEnabledForActiveVehicleChanged

void JoystickManager::activeJoystickEnabledForActiveVehicleChanged ( )
signal

◆ availableJoystickNames()

QStringList JoystickManager::availableJoystickNames ( ) const
inline

Definition at line 39 of file JoystickManager.h.

◆ availableJoystickNamesChanged

void JoystickManager::availableJoystickNamesChanged ( )
signal

◆ init

void JoystickManager::init ( )
slot

Definition at line 86 of file JoystickManager.cc.

References JoystickSDL::init().

◆ instance()

◆ joystickByName()

Joystick * JoystickManager::joystickByName ( const QString &  name) const

Get joystick by name (returns nullptr if not found)

Definition at line 364 of file JoystickManager.cc.

◆ joystickCount()

int JoystickManager::joystickCount ( ) const
inline

Definition at line 40 of file JoystickManager.h.

◆ linkedGroupMembers()

QStringList JoystickManager::linkedGroupMembers ( const QString &  groupId) const

Get all joysticks in a linked group Returns empty list if groupId is empty or no matches found

Definition at line 349 of file JoystickManager.cc.

◆ setActiveJoystickEnabledForActiveVehicle()

void JoystickManager::setActiveJoystickEnabledForActiveVehicle ( bool  enabled)

The documentation for this class was generated from the following files: