MythTV  0.26-pre
Public Types | Public Member Functions | Public Attributes
JoystickMap Class Reference

Holds the buttonMapType and axisMapType structs which map actions to events. More...

#include <jsmenu.h>

List of all members.

Public Types

typedef std::vector
< buttonMapType
button_map_t
typedef std::vector< axisMapTypeaxis_map_t

Public Member Functions

void AddButton (int in_button, QString in_keystr, int in_chord=-1)
void AddAxis (int in_axis, int in_from, int in_to, QString in_keystr)
const button_map_tbuttonMap () const
const axis_map_taxisMap () const

Public Attributes

button_map_t m_buttonMap
axis_map_t m_axisMap

Detailed Description

Holds the buttonMapType and axisMapType structs which map actions to events.

We build a map of how joystick buttons and axes (axes are for sticks and thumb controllers) are mapped into keystrokes. For buttons, it's mostly very simple: joystick button number corresponds to a key sequence that is sent to MythTV. We complicate it a little by allowing for 'chords', which means that if you hold down the 'chord' button while pressing the other button, we use the alternate mapping For axes, it's not very complicated. For each axis (ie up/down or left/right), we define a range; the first time the joystick moves into that range, we send the assigned keystring.

Definition at line 50 of file jsmenu.h.


Member Typedef Documentation

Definition at line 65 of file jsmenu.h.

typedef std::vector<axisMapType> JoystickMap::axis_map_t

Definition at line 66 of file jsmenu.h.


Member Function Documentation

void JoystickMap::AddButton ( int  in_button,
QString  in_keystr,
int  in_chord = -1 
) [inline]

Definition at line 53 of file jsmenu.h.

Referenced by JoystickMenuThread::ReadConfig().

void JoystickMap::AddAxis ( int  in_axis,
int  in_from,
int  in_to,
QString  in_keystr 
) [inline]

Definition at line 59 of file jsmenu.h.

Referenced by JoystickMenuThread::ReadConfig().

const button_map_t& JoystickMap::buttonMap ( ) const [inline]

Definition at line 67 of file jsmenu.h.

Referenced by JoystickMenuThread::ButtonUp().

const axis_map_t& JoystickMap::axisMap ( ) const [inline]

Definition at line 68 of file jsmenu.h.

Referenced by JoystickMenuThread::AxisChange().


Member Data Documentation

Definition at line 70 of file jsmenu.h.

Referenced by AddButton(), and buttonMap().

Definition at line 71 of file jsmenu.h.

Referenced by AddAxis(), and axisMap().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends