AntiMicroX
Public Types | Public Member Functions | Private Attributes
JoySensorPreset Class Reference

Defines presets for a sensor. More...

#include <joysensorpreset.h>

Inheritance diagram for JoySensorPreset:
[legend]
Collaboration diagram for JoySensorPreset:
[legend]

Public Types

enum  Preset {
  PRESET_NONE, PRESET_MOUSE, PRESET_MOUSE_INV_H, PRESET_MOUSE_INV_V,
  PRESET_MOUSE_INV_HV, PRESET_ARROWS, PRESET_WASD, PRESET_NUMPAD
}
 

Public Member Functions

 JoySensorPreset (JoySensor *sensor, QObject *parent=nullptr)
 
QList< PresetgetAvailablePresets ()
 Get available presets for the underlying sensor type. More...
 
Preset currentPreset ()
 Determines the preset used by the underlying sensor. More...
 
QString getPresetName (Preset)
 Get the translated name of a given preset. More...
 
void setSensorPreset (Preset)
 Assigns given preset to the underlying sensor This function defines the preset mappings and sensor parameters. More...
 
JoySensorIoThreadHelpergetHelper ()
 Get the internal JoySensorIoThreadHelper. More...
 

Private Attributes

JoySensorm_sensor
 
JoySensorIoThreadHelper m_helper
 

Detailed Description

Defines presets for a sensor.

Member Enumeration Documentation

◆ Preset

Enumerator
PRESET_NONE 
PRESET_MOUSE 
PRESET_MOUSE_INV_H 
PRESET_MOUSE_INV_V 
PRESET_MOUSE_INV_HV 
PRESET_ARROWS 
PRESET_WASD 
PRESET_NUMPAD 

Constructor & Destructor Documentation

◆ JoySensorPreset()

JoySensorPreset::JoySensorPreset ( JoySensor sensor,
QObject *  parent = nullptr 
)
explicit

Member Function Documentation

◆ currentPreset()

JoySensorPreset::Preset JoySensorPreset::currentPreset ( )

Determines the preset used by the underlying sensor.

Returns
The used preset if a preset is used or PRESET_NONE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAvailablePresets()

QList< JoySensorPreset::Preset > JoySensorPreset::getAvailablePresets ( )

Get available presets for the underlying sensor type.

Returns
QList of available presets
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHelper()

JoySensorIoThreadHelper & JoySensorPreset::getHelper ( )

Get the internal JoySensorIoThreadHelper.

◆ getPresetName()

QString JoySensorPreset::getPresetName ( Preset  preset)

Get the translated name of a given preset.

Returns
Translated preset name
Here is the caller graph for this function:

◆ setSensorPreset()

void JoySensorPreset::setSensorPreset ( Preset  preset)

Assigns given preset to the underlying sensor This function defines the preset mappings and sensor parameters.

Parameters
[in]presetThe preset to assign
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ m_helper

JoySensorIoThreadHelper JoySensorPreset::m_helper
private

◆ m_sensor

JoySensor* JoySensorPreset::m_sensor
private

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