AntiMicroX
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
DPadContextMenu Class Reference

#include <dpadcontextmenu.h>

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

Public Member Functions

 DPadContextMenu (JoyDPad *dpad, QWidget *parent=nullptr)
 
void buildMenu ()
 Generate the context menu that will be shown to a user when the person right clicks on the DPad settings button. More...
 

Protected Member Functions

int getPresetIndex ()
 Find the appropriate menu item index for the currently assigned slots that are assigned to a DPad. More...
 

Private Slots

void setDPadPreset (QAction *action)
 Assign the appropriate slots to DPad buttons based on the preset item that was chosen. More...
 
void setDPadMode (QAction *action)
 Set the appropriate mode for a DPad based on the item chosen. More...
 
void openMouseSettingsDialog ()
 Open a mouse settings dialog for changing the mouse speed settings for all DPad buttons. More...
 

Private Member Functions

DPadContextMenuHelpergetHelper ()
 
void generateActionPreset (QAction *action, QString actionText, int currentPreset, int &presetMode, QActionGroup *presetGroup)
 
void generateActionMode (QActionGroup *modesGroup, QAction *action, QString actionText, int currentPreset, int presetMode)
 

Private Attributes

JoyDPaddpad
 
DPadContextMenuHelper helper
 

Constructor & Destructor Documentation

◆ DPadContextMenu()

DPadContextMenu::DPadContextMenu ( JoyDPad dpad,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ buildMenu()

void DPadContextMenu::buildMenu ( )

Generate the context menu that will be shown to a user when the person right clicks on the DPad settings button.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateActionMode()

void DPadContextMenu::generateActionMode ( QActionGroup *  modesGroup,
QAction *  action,
QString  actionText,
int  currentPreset,
int  presetMode 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateActionPreset()

void DPadContextMenu::generateActionPreset ( QAction *  action,
QString  actionText,
int  currentPreset,
int &  presetMode,
QActionGroup *  presetGroup 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHelper()

DPadContextMenuHelper & DPadContextMenu::getHelper ( )
private
Here is the caller graph for this function:

◆ getPresetIndex()

int DPadContextMenu::getPresetIndex ( )
protected

Find the appropriate menu item index for the currently assigned slots that are assigned to a DPad.

Returns
Menu index that corresponds to the currently assigned preset choice. 0 means that no matching preset was found.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openMouseSettingsDialog

void DPadContextMenu::openMouseSettingsDialog ( )
privateslot

Open a mouse settings dialog for changing the mouse speed settings for all DPad buttons.

Here is the caller graph for this function:

◆ setDPadMode

void DPadContextMenu::setDPadMode ( QAction *  action)
privateslot

Set the appropriate mode for a DPad based on the item chosen.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDPadPreset

void DPadContextMenu::setDPadPreset ( QAction *  action)
privateslot

Assign the appropriate slots to DPad buttons based on the preset item that was chosen.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ dpad

JoyDPad* DPadContextMenu::dpad
private

◆ helper

DPadContextMenuHelper DPadContextMenu::helper
private

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