QGamepadKeyNavigation Class

Provides support for keyboard events triggered by gamepads. 更多...

头: #include <QGamepadKeyNavigation>
qmake: QT += gamepad
继承: QObject

特性

公共函数

QGamepadKeyNavigation (QObject * parent = nullptr)
bool active () const
Qt::Key buttonAKey () const
Qt::Key buttonBKey () const
Qt::Key buttonGuideKey () const
Qt::Key buttonL1Key () const
Qt::Key buttonL2Key () const
Qt::Key buttonL3Key () const
Qt::Key buttonR1Key () const
Qt::Key buttonR2Key () const
Qt::Key buttonR3Key () const
Qt::Key buttonSelectKey () const
Qt::Key buttonStartKey () const
Qt::Key buttonXKey () const
Qt::Key buttonYKey () const
Qt::Key downKey () const
QGamepad * gamepad () const
Qt::Key leftKey () const
Qt::Key rightKey () const
Qt::Key upKey () const

公共槽

void setActive (bool isActive )
void setButtonAKey (Qt::Key key )
void setButtonBKey (Qt::Key key )
void setButtonGuideKey (Qt::Key key )
void setButtonL1Key (Qt::Key key )
void setButtonL2Key (Qt::Key key )
void setButtonL3Key (Qt::Key key )
void setButtonR1Key (Qt::Key key )
void setButtonR2Key (Qt::Key key )
void setButtonR3Key (Qt::Key key )
void setButtonSelectKey (Qt::Key key )
void setButtonStartKey (Qt::Key key )
void setButtonXKey (Qt::Key key )
void setButtonYKey (Qt::Key key )
void setDownKey (Qt::Key key )
void setGamepad (QGamepad * gamepad )
void setLeftKey (Qt::Key key )
void setRightKey (Qt::Key key )
void setUpKey (Qt::Key key )

信号

void activeChanged (bool isActive )
void buttonAKeyChanged (Qt::Key key )
void buttonBKeyChanged (Qt::Key key )
void buttonGuideKeyChanged (Qt::Key key )
void buttonL1KeyChanged (Qt::Key key )
void buttonL2KeyChanged (Qt::Key key )
void buttonL3KeyChanged (Qt::Key key )
void buttonR1KeyChanged (Qt::Key key )
void buttonR2KeyChanged (Qt::Key key )
void buttonR3KeyChanged (Qt::Key key )
void buttonSelectKeyChanged (Qt::Key key )
void buttonStartKeyChanged (Qt::Key key )
void buttonXKeyChanged (Qt::Key key )
void buttonYKeyChanged (Qt::Key key )
void downKeyChanged (Qt::Key key )
void gamepadChanged (QGamepad * gamepad )
void leftKeyChanged (Qt::Key key )
void rightKeyChanged (Qt::Key key )
void upKeyChanged (Qt::Key key )

额外继承成员

详细描述

Provides support for keyboard events triggered by gamepads.

QGamepadKeyNavigation provides support for keyboard events triggered by gamepads.

特性文档编制

active : bool

访问函数:

bool active () const
void setActive (bool isActive )

通知程序信号:

void activeChanged (bool isActive )

buttonAKey : Qt::Key

访问函数:

Qt::Key buttonAKey () const
void setButtonAKey (Qt::Key key )

通知程序信号:

void buttonAKeyChanged (Qt::Key key )

buttonBKey : Qt::Key

访问函数:

Qt::Key buttonBKey () const
void setButtonBKey (Qt::Key key )

通知程序信号:

void buttonBKeyChanged (Qt::Key key )

buttonGuideKey : Qt::Key

访问函数:

Qt::Key buttonGuideKey () const
void setButtonGuideKey (Qt::Key key )

通知程序信号:

void buttonGuideKeyChanged (Qt::Key key )

buttonL1Key : Qt::Key

访问函数:

Qt::Key buttonL1Key () const
void setButtonL1Key (Qt::Key key )

通知程序信号:

void buttonL1KeyChanged (Qt::Key key )

buttonL2Key : Qt::Key

访问函数:

Qt::Key buttonL2Key () const
void setButtonL2Key (Qt::Key key )

通知程序信号:

void buttonL2KeyChanged (Qt::Key key )

buttonL3Key : Qt::Key

访问函数:

Qt::Key buttonL3Key () const
void setButtonL3Key (Qt::Key key )

通知程序信号:

void buttonL3KeyChanged (Qt::Key key )

buttonR1Key : Qt::Key

访问函数:

Qt::Key buttonR1Key () const
void setButtonR1Key (Qt::Key key )

通知程序信号:

void buttonR1KeyChanged (Qt::Key key )

buttonR2Key : Qt::Key

访问函数:

Qt::Key buttonR2Key () const
void setButtonR2Key (Qt::Key key )

通知程序信号:

void buttonR2KeyChanged (Qt::Key key )

buttonR3Key : Qt::Key

访问函数:

Qt::Key buttonR3Key () const
void setButtonR3Key (Qt::Key key )

通知程序信号:

void buttonR3KeyChanged (Qt::Key key )

buttonSelectKey : Qt::Key

访问函数:

Qt::Key buttonSelectKey () const
void setButtonSelectKey (Qt::Key key )

通知程序信号:

void buttonSelectKeyChanged (Qt::Key key )

buttonStartKey : Qt::Key

访问函数:

Qt::Key buttonStartKey () const
void setButtonStartKey (Qt::Key key )

通知程序信号:

void buttonStartKeyChanged (Qt::Key key )

buttonXKey : Qt::Key

访问函数:

Qt::Key buttonXKey () const
void setButtonXKey (Qt::Key key )

通知程序信号:

void buttonXKeyChanged (Qt::Key key )

buttonYKey : Qt::Key

访问函数:

Qt::Key buttonYKey () const
void setButtonYKey (Qt::Key key )

通知程序信号:

void buttonYKeyChanged (Qt::Key key )

downKey : Qt::Key

访问函数:

Qt::Key downKey () const
void setDownKey (Qt::Key key )

通知程序信号:

void downKeyChanged (Qt::Key key )

gamepad : QGamepad *

访问函数:

QGamepad * gamepad () const
void setGamepad (QGamepad * gamepad )

通知程序信号:

void gamepadChanged (QGamepad * gamepad )

leftKey : Qt::Key

访问函数:

Qt::Key leftKey () const
void setLeftKey (Qt::Key key )

通知程序信号:

void leftKeyChanged (Qt::Key key )

rightKey : Qt::Key

访问函数:

Qt::Key rightKey () const
void setRightKey (Qt::Key key )

通知程序信号:

void rightKeyChanged (Qt::Key key )

upKey : Qt::Key

访问函数:

Qt::Key upKey () const
void setUpKey (Qt::Key key )

通知程序信号:

void upKeyChanged (Qt::Key key )

成员函数文档编制

QGamepadKeyNavigation:: QGamepadKeyNavigation ( QObject * parent = nullptr)

Constructs a QGamepadNavigation object with the given parent .

bool QGamepadKeyNavigation:: active () const

* Returns whether key navigation on the gamepad is active or not.

注意: Getter 函数对于特性 active .

另请参阅 setActive ().

Qt::Key QGamepadKeyNavigation:: buttonAKey () const

Returns the key mapping of A button.

注意: Getter 函数对于特性 buttonAKey .

另请参阅 setButtonAKey ().

Qt::Key QGamepadKeyNavigation:: buttonBKey () const

Returns the key mapping of the B button.

注意: Getter 函数对于特性 buttonBKey .

另请参阅 setButtonBKey ().

Qt::Key QGamepadKeyNavigation:: buttonGuideKey () const

Returns the key mapping of the Guide button.

注意: Getter 函数对于特性 buttonGuideKey .

另请参阅 setButtonGuideKey ().

Qt::Key QGamepadKeyNavigation:: buttonL1Key () const

Returns the key mapping of the left shoulder button.

注意: Getter 函数对于特性 buttonL1Key .

另请参阅 setButtonL1Key ().

Qt::Key QGamepadKeyNavigation:: buttonL2Key () const

Returns the key mapping of the left trigger button.

注意: Getter 函数对于特性 buttonL2Key .

另请参阅 setButtonL2Key ().

Qt::Key QGamepadKeyNavigation:: buttonL3Key () const

Returns the key mapping of the left stick button.

注意: Getter 函数对于特性 buttonL3Key .

另请参阅 setButtonL3Key ().

Qt::Key QGamepadKeyNavigation:: buttonR1Key () const

Returns the key mapping of the Right shoulder button.

注意: Getter 函数对于特性 buttonR1Key .

另请参阅 setButtonR1Key ().

Qt::Key QGamepadKeyNavigation:: buttonR2Key () const

Returns the key mapping of the Right trigger button.

注意: Getter 函数对于特性 buttonR2Key .

另请参阅 setButtonR2Key ().

Qt::Key QGamepadKeyNavigation:: buttonR3Key () const

Returns the key mapping of the right stick button.

注意: Getter 函数对于特性 buttonR3Key .

另请参阅 setButtonR3Key ().

Qt::Key QGamepadKeyNavigation:: buttonSelectKey () const

Returns the key mapping of the Select button.

注意: Getter 函数对于特性 buttonSelectKey .

另请参阅 setButtonSelectKey ().

Qt::Key QGamepadKeyNavigation:: buttonStartKey () const

Returns the key mapping of the Start button.

注意: Getter 函数对于特性 buttonStartKey .

另请参阅 setButtonStartKey ().

Qt::Key QGamepadKeyNavigation:: buttonXKey () const

Returns the key mapping of the X button.

注意: Getter 函数对于特性 buttonXKey .

另请参阅 setButtonXKey ().

Qt::Key QGamepadKeyNavigation:: buttonYKey () const

Returns the key mapping of the Y button.

注意: Getter 函数对于特性 buttonYKey .

另请参阅 setButtonYKey ().

Qt::Key QGamepadKeyNavigation:: downKey () const

Returns the key mapping of the Down button.

注意: Getter 函数对于特性 downKey .

另请参阅 setDownKey ().

QGamepad *QGamepadKeyNavigation:: gamepad () const

Returns a pointer the current QGamepad

注意: Getter 函数对于特性 gamepad .

另请参阅 setGamepad ().

Qt::Key QGamepadKeyNavigation:: leftKey () const

Returns the key mapping of the Left button.

注意: Getter 函数对于特性 leftKey .

另请参阅 setLeftKey ().

Qt::Key QGamepadKeyNavigation:: rightKey () const

Returns the key mapping of the Right button.

注意: Getter 函数对于特性 rightKey .

另请参阅 setRightKey ().

[slot] void QGamepadKeyNavigation:: setActive ( bool isActive )

Activates key navigation if isActive is true, disables it otherwise.

注意: Setter 函数对于特性 active .

另请参阅 active ().

[slot] void QGamepadKeyNavigation:: setButtonAKey ( Qt::Key key )

* Sets the mapping of the A button with the keycode * specified in key .

注意: Setter 函数对于特性 buttonAKey .

另请参阅 buttonAKey ().

[slot] void QGamepadKeyNavigation:: setButtonBKey ( Qt::Key key )

* Sets the mapping of the B button with the keycode * specified in key .

注意: Setter 函数对于特性 buttonBKey .

另请参阅 buttonBKey ().

[slot] void QGamepadKeyNavigation:: setButtonGuideKey ( Qt::Key key )

* Sets the mapping of the Guide button with the keycode * specified in key .

注意: Setter 函数对于特性 buttonGuideKey .

另请参阅 buttonGuideKey ().

[slot] void QGamepadKeyNavigation:: setButtonL1Key ( Qt::Key key )

* Sets the mapping of the left shoulder button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonL1Key .

另请参阅 buttonL1Key ().

[slot] void QGamepadKeyNavigation:: setButtonL2Key ( Qt::Key key )

* Sets the mapping of the left trigger button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonL2Key .

另请参阅 buttonL2Key ().

[slot] void QGamepadKeyNavigation:: setButtonL3Key ( Qt::Key key )

* Sets the mapping of the left stick button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonL3Key .

另请参阅 buttonL3Key ().

[slot] void QGamepadKeyNavigation:: setButtonR1Key ( Qt::Key key )

* Sets the mapping of the right shoulder button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonR1Key .

另请参阅 buttonR1Key ().

[slot] void QGamepadKeyNavigation:: setButtonR2Key ( Qt::Key key )

* Sets the mapping of the right trigger button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonR2Key .

另请参阅 buttonR2Key ().

[slot] void QGamepadKeyNavigation:: setButtonR3Key ( Qt::Key key )

* Sets the mapping of the right stick button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonR3Key .

另请参阅 buttonR3Key ().

[slot] void QGamepadKeyNavigation:: setButtonSelectKey ( Qt::Key key )

* Sets the mapping of the Select button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonSelectKey .

另请参阅 buttonSelectKey ().

[slot] void QGamepadKeyNavigation:: setButtonStartKey ( Qt::Key key )

* Sets the mapping of the Start button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonStartKey .

另请参阅 buttonStartKey ().

[slot] void QGamepadKeyNavigation:: setButtonXKey ( Qt::Key key )

* Sets the mapping of the X button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonXKey .

另请参阅 buttonXKey ().

[slot] void QGamepadKeyNavigation:: setButtonYKey ( Qt::Key key )

* Sets the mapping of the Y button with the * keycode specified in key .

注意: Setter 函数对于特性 buttonYKey .

另请参阅 buttonYKey ().

[slot] void QGamepadKeyNavigation:: setDownKey ( Qt::Key key )

* Sets the mapping of the Down button with the * keycode specified in key .

注意: Setter 函数对于特性 downKey .

另请参阅 downKey ().

[slot] void QGamepadKeyNavigation:: setGamepad ( QGamepad * gamepad )

* Selects the specified gamepad .

注意: Setter 函数对于特性 gamepad .

另请参阅 gamepad ().

[slot] void QGamepadKeyNavigation:: setLeftKey ( Qt::Key key )

* Sets the mapping of the Left button with the * keycode specified in key .

注意: Setter 函数对于特性 leftKey .

另请参阅 leftKey ().

[slot] void QGamepadKeyNavigation:: setRightKey ( Qt::Key key )

* Sets the mapping of the Right button with the * keycode specified in key .

注意: Setter 函数对于特性 rightKey .

另请参阅 rightKey ().

[slot] void QGamepadKeyNavigation:: setUpKey ( Qt::Key key )

* Sets the mapping of the Up button with the * keycode specified in key .

注意: Setter 函数对于特性 upKey .

另请参阅 upKey ().

Qt::Key QGamepadKeyNavigation:: upKey () const

Returns the key mapping of the Up button.

注意: Getter 函数对于特性 upKey .

另请参阅 setUpKey ().