AntiMicroX
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Slots | Private Attributes | Static Private Attributes
JoyTabWidget Class Reference

Widget containing tab representing selected joystick. More...

#include <joytabwidget.h>

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

Public Slots

void openConfigFileDialog ()
 
void fillButtons ()
 Create and render all push buttons corresponding to joystick controls for all sets. More...
 
void saveDeviceSettings (bool sync=false)
 
void loadDeviceSettings ()
 
void changeNameDisplay (bool displayNames)
 
void changeCurrentSet (int index)
 
void loadConfigFile (QString fileLocation)
 
void refreshButtons ()
 

Signals

void joystickConfigChanged (int index)
 
void joystickAxisRefreshLabels (int axisIndex)
 
void namesDisplayChanged (bool status)
 
void forceTabUnflash (JoyTabWidget *tabWidget)
 
void mappingUpdated (QString mapping, InputDevice *device)
 

Public Member Functions

 JoyTabWidget (InputDevice *joystick, AntiMicroSettings *settings, QWidget *parent=nullptr)
 
void saveSettings ()
 
void loadSettings (bool forceRefresh=false)
 
void setCurrentConfig (int index)
 
void unloadConfig ()
 
void checkHideEmptyOption ()
 
void refreshHelperThread ()
 
void convToUniqueIDControllerGroupSett (QSettings *sett, QString guidControllerSett, QString uniqueControllerSett)
 
bool isDisplayingNames ()
 
bool discardUnsavedProfileChanges ()
 
int getCurrentConfigIndex ()
 
QHash< int, QString > * recentConfigs ()
 
QString getCurrentConfigName ()
 
QString getConfigName (int index)
 
InputDevicegetJoystick ()
 

Static Public Member Functions

static bool changesNotSaved ()
 

Protected Member Functions

virtual void changeEvent (QEvent *event)
 
void removeCurrentButtons ()
 
void retranslateUi ()
 
void disconnectMainComboBoxEvents ()
 
void reconnectMainComboBoxEvents ()
 
void disconnectCheckUnsavedEvent ()
 
void reconnectCheckUnsavedEvent ()
 
void fillSetButtons (SetJoystick *set)
 
void removeSetButtons (SetJoystick *set)
 
bool isKeypadUnlocked ()
 

Static Protected Attributes

static const int DEFAULTNUMBERPROFILES = 5
 

Private Slots

void saveConfigFile ()
 
void resetJoystick ()
 
void saveAsConfig ()
 
void removeConfig ()
 
void changeJoyConfig (int index)
 
void showAxisDialog ()
 
void showButtonDialog ()
 
void showStickAssignmentDialog ()
 
void showQuickSetDialog ()
 
void showKeyDelayDialog ()
 
void showSetNamesDialog ()
 
void toggleNames ()
 
void updateBatteryIcon ()
 
void changeSetOne ()
 
void changeSetTwo ()
 
void changeSetThree ()
 
void changeSetFour ()
 
void changeSetFive ()
 
void changeSetSix ()
 
void changeSetSeven ()
 
void changeSetEight ()
 
void displayProfileEditNotification ()
 
void removeProfileEditNotification ()
 
void checkForUnsavedProfile (int newindex=-1)
 
void checkStickDisplay ()
 
void checkSensorDisplay ()
 
void checkDPadButtonDisplay ()
 
void checkAxisButtonDisplay ()
 
void checkButtonDisplay ()
 
void checkStickEmptyDisplay ()
 
void checkSensorEmptyDisplay ()
 
void checkDPadButtonEmptyDisplay ()
 
void checkAxisButtonEmptyDisplay ()
 
void checkButtonEmptyDisplay ()
 
void editCurrentProfileItemText (QString text)
 
void refreshCopySetActions ()
 
void performSetCopy ()
 
void disableCopyCurrentSet ()
 
void refreshSetButtons ()
 
void openGameControllerMappingWindow ()
 
void propogateMappingUpdate (QString mapping, InputDevice *device)
 

Private Attributes

QVBoxLayout * verticalLayout
 
QHBoxLayout * configHorizontalLayout
 
QLabel * batteryIcon
 
QPushButton * removeButton
 
QPushButton * loadButton
 
QPushButton * saveButton
 
QPushButton * resetButton
 
QPushButton * namesPushButton
 
QPushButton * saveAsButton
 
QPushButton * delayButton
 
QComboBox * configBox
 
QGridLayout * gridLayout
 
QGridLayout * gridLayout2
 
QGridLayout * gridLayout3
 
QGridLayout * gridLayout4
 
QGridLayout * gridLayout5
 
QGridLayout * gridLayout6
 
QGridLayout * gridLayout7
 
QGridLayout * gridLayout8
 
QSpacerItem * spacer1
 
QSpacerItem * spacer2
 
QSpacerItem * spacer3
 
AxisEditDialogaxisDialog
 
QPushButton * setPushButton1
 
QPushButton * setPushButton2
 
QPushButton * setPushButton3
 
QPushButton * setPushButton4
 
QPushButton * setPushButton5
 
QPushButton * setPushButton6
 
QPushButton * setPushButton7
 
QPushButton * setPushButton8
 
QPushButton * setsMenuButton
 
QAction * setAction1
 
QAction * setAction2
 
QAction * setAction3
 
QAction * setAction4
 
QAction * setAction5
 
QAction * setAction6
 
QAction * setAction7
 
QAction * setAction8
 
QMenu * copySetMenu
 
QHBoxLayout * horizontalLayout_2
 
QHBoxLayout * horizontalLayout_3
 
QPushButton * stickAssignPushButton
 
QPushButton * quickSetPushButton
 
QPushButton * gameControllerMappingPushButton
 
QSpacerItem * verticalSpacer_2
 
QStackedWidget * stackedWidget_2
 
QWidget * page
 
QWidget * page_2
 
QWidget * page_3
 
QWidget * page_4
 
QWidget * page_5
 
QWidget * page_6
 
QWidget * page_7
 
QWidget * page_8
 
QPushButton * pushButton
 
QSpacerItem * verticalSpacer_3
 
InputDevicem_joystick
 
bool displayingNames
 
AntiMicroSettingsm_settings
 
int comboBoxIndex = 0
 
bool hideEmptyButtons = false
 
QString oldProfileName
 
JoyTabWidgetHelper tabHelper
 
SDL_JoystickPowerLevel m_old_power_level = SDL_JOYSTICK_POWER_UNKNOWN
 
QTimer * m_battery_updater
 

Static Private Attributes

static bool changedNotSaved = false
 

Detailed Description

Widget containing tab representing selected joystick.

It is visible in main window of application.

Constructor & Destructor Documentation

◆ JoyTabWidget()

JoyTabWidget::JoyTabWidget ( InputDevice joystick,
AntiMicroSettings settings,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ changeCurrentSet

void JoyTabWidget::changeCurrentSet ( int  index)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeEvent()

void JoyTabWidget::changeEvent ( QEvent *  event)
protectedvirtual
Here is the call graph for this function:

◆ changeJoyConfig

void JoyTabWidget::changeJoyConfig ( int  index)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeNameDisplay

void JoyTabWidget::changeNameDisplay ( bool  displayNames)
slot
Here is the caller graph for this function:

◆ changeSetEight

void JoyTabWidget::changeSetEight ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetFive

void JoyTabWidget::changeSetFive ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetFour

void JoyTabWidget::changeSetFour ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetOne

void JoyTabWidget::changeSetOne ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetSeven

void JoyTabWidget::changeSetSeven ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetSix

void JoyTabWidget::changeSetSix ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetThree

void JoyTabWidget::changeSetThree ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetTwo

void JoyTabWidget::changeSetTwo ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changesNotSaved()

bool JoyTabWidget::changesNotSaved ( )
static

◆ checkAxisButtonDisplay

void JoyTabWidget::checkAxisButtonDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkAxisButtonEmptyDisplay

void JoyTabWidget::checkAxisButtonEmptyDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkButtonDisplay

void JoyTabWidget::checkButtonDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkButtonEmptyDisplay

void JoyTabWidget::checkButtonEmptyDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkDPadButtonDisplay

void JoyTabWidget::checkDPadButtonDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkDPadButtonEmptyDisplay

void JoyTabWidget::checkDPadButtonEmptyDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkForUnsavedProfile

void JoyTabWidget::checkForUnsavedProfile ( int  newindex = -1)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkHideEmptyOption()

void JoyTabWidget::checkHideEmptyOption ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkSensorDisplay

void JoyTabWidget::checkSensorDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkSensorEmptyDisplay

void JoyTabWidget::checkSensorEmptyDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkStickDisplay

void JoyTabWidget::checkStickDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkStickEmptyDisplay

void JoyTabWidget::checkStickEmptyDisplay ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convToUniqueIDControllerGroupSett()

void JoyTabWidget::convToUniqueIDControllerGroupSett ( QSettings *  sett,
QString  guidControllerSett,
QString  uniqueControllerSett 
)
Here is the caller graph for this function:

◆ disableCopyCurrentSet

void JoyTabWidget::disableCopyCurrentSet ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discardUnsavedProfileChanges()

bool JoyTabWidget::discardUnsavedProfileChanges ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnectCheckUnsavedEvent()

void JoyTabWidget::disconnectCheckUnsavedEvent ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnectMainComboBoxEvents()

void JoyTabWidget::disconnectMainComboBoxEvents ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ displayProfileEditNotification

void JoyTabWidget::displayProfileEditNotification ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ editCurrentProfileItemText

void JoyTabWidget::editCurrentProfileItemText ( QString  text)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillButtons

void JoyTabWidget::fillButtons ( )
slot

Create and render all push buttons corresponding to joystick controls for all sets.

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

◆ fillSetButtons()

void JoyTabWidget::fillSetButtons ( SetJoystick set)
protected
Here is the caller graph for this function:

◆ forceTabUnflash

void JoyTabWidget::forceTabUnflash ( JoyTabWidget tabWidget)
signal
Here is the caller graph for this function:

◆ getConfigName()

QString JoyTabWidget::getConfigName ( int  index)
Here is the caller graph for this function:

◆ getCurrentConfigIndex()

int JoyTabWidget::getCurrentConfigIndex ( )
Here is the caller graph for this function:

◆ getCurrentConfigName()

QString JoyTabWidget::getCurrentConfigName ( )
Here is the caller graph for this function:

◆ getJoystick()

InputDevice * JoyTabWidget::getJoystick ( )
Here is the caller graph for this function:

◆ isDisplayingNames()

bool JoyTabWidget::isDisplayingNames ( )
Here is the caller graph for this function:

◆ isKeypadUnlocked()

bool JoyTabWidget::isKeypadUnlocked ( )
protected
Here is the caller graph for this function:

◆ joystickAxisRefreshLabels

void JoyTabWidget::joystickAxisRefreshLabels ( int  axisIndex)
signal

◆ joystickConfigChanged

void JoyTabWidget::joystickConfigChanged ( int  index)
signal
Here is the caller graph for this function:

◆ loadConfigFile

void JoyTabWidget::loadConfigFile ( QString  fileLocation)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadDeviceSettings

void JoyTabWidget::loadDeviceSettings ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadSettings()

void JoyTabWidget::loadSettings ( bool  forceRefresh = false)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mappingUpdated

void JoyTabWidget::mappingUpdated ( QString  mapping,
InputDevice device 
)
signal
Here is the caller graph for this function:

◆ namesDisplayChanged

void JoyTabWidget::namesDisplayChanged ( bool  status)
signal
Here is the caller graph for this function:

◆ openConfigFileDialog

void JoyTabWidget::openConfigFileDialog ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openGameControllerMappingWindow

void JoyTabWidget::openGameControllerMappingWindow ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ performSetCopy

void JoyTabWidget::performSetCopy ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ propogateMappingUpdate

void JoyTabWidget::propogateMappingUpdate ( QString  mapping,
InputDevice device 
)
privateslot
Here is the caller graph for this function:

◆ recentConfigs()

QHash< int, QString > * JoyTabWidget::recentConfigs ( )
Here is the caller graph for this function:

◆ reconnectCheckUnsavedEvent()

void JoyTabWidget::reconnectCheckUnsavedEvent ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reconnectMainComboBoxEvents()

void JoyTabWidget::reconnectMainComboBoxEvents ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshButtons

void JoyTabWidget::refreshButtons ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshCopySetActions

void JoyTabWidget::refreshCopySetActions ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshHelperThread()

void JoyTabWidget::refreshHelperThread ( )
Here is the caller graph for this function:

◆ refreshSetButtons

void JoyTabWidget::refreshSetButtons ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeConfig

void JoyTabWidget::removeConfig ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCurrentButtons()

void JoyTabWidget::removeCurrentButtons ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeProfileEditNotification

void JoyTabWidget::removeProfileEditNotification ( )
privateslot
Here is the caller graph for this function:

◆ removeSetButtons()

void JoyTabWidget::removeSetButtons ( SetJoystick set)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetJoystick

void JoyTabWidget::resetJoystick ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void JoyTabWidget::retranslateUi ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveAsConfig

void JoyTabWidget::saveAsConfig ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveConfigFile

void JoyTabWidget::saveConfigFile ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveDeviceSettings

void JoyTabWidget::saveDeviceSettings ( bool  sync = false)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveSettings()

void JoyTabWidget::saveSettings ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCurrentConfig()

void JoyTabWidget::setCurrentConfig ( int  index)
Here is the caller graph for this function:

◆ showAxisDialog

void JoyTabWidget::showAxisDialog ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showButtonDialog

void JoyTabWidget::showButtonDialog ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showKeyDelayDialog

void JoyTabWidget::showKeyDelayDialog ( )
privateslot
Here is the caller graph for this function:

◆ showQuickSetDialog

void JoyTabWidget::showQuickSetDialog ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showSetNamesDialog

void JoyTabWidget::showSetNamesDialog ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showStickAssignmentDialog

void JoyTabWidget::showStickAssignmentDialog ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toggleNames

void JoyTabWidget::toggleNames ( )
privateslot
Here is the caller graph for this function:

◆ unloadConfig()

void JoyTabWidget::unloadConfig ( )
Here is the caller graph for this function:

◆ updateBatteryIcon

void JoyTabWidget::updateBatteryIcon ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ axisDialog

AxisEditDialog* JoyTabWidget::axisDialog
private

◆ batteryIcon

QLabel* JoyTabWidget::batteryIcon
private

◆ changedNotSaved

bool JoyTabWidget::changedNotSaved = false
staticprivate

◆ comboBoxIndex

int JoyTabWidget::comboBoxIndex = 0
private

◆ configBox

QComboBox* JoyTabWidget::configBox
private

◆ configHorizontalLayout

QHBoxLayout* JoyTabWidget::configHorizontalLayout
private

◆ copySetMenu

QMenu* JoyTabWidget::copySetMenu
private

◆ DEFAULTNUMBERPROFILES

const int JoyTabWidget::DEFAULTNUMBERPROFILES = 5
staticprotected

◆ delayButton

QPushButton* JoyTabWidget::delayButton
private

◆ displayingNames

bool JoyTabWidget::displayingNames
private

◆ gameControllerMappingPushButton

QPushButton* JoyTabWidget::gameControllerMappingPushButton
private

◆ gridLayout

QGridLayout* JoyTabWidget::gridLayout
private

◆ gridLayout2

QGridLayout* JoyTabWidget::gridLayout2
private

◆ gridLayout3

QGridLayout* JoyTabWidget::gridLayout3
private

◆ gridLayout4

QGridLayout* JoyTabWidget::gridLayout4
private

◆ gridLayout5

QGridLayout* JoyTabWidget::gridLayout5
private

◆ gridLayout6

QGridLayout* JoyTabWidget::gridLayout6
private

◆ gridLayout7

QGridLayout* JoyTabWidget::gridLayout7
private

◆ gridLayout8

QGridLayout* JoyTabWidget::gridLayout8
private

◆ hideEmptyButtons

bool JoyTabWidget::hideEmptyButtons = false
private

◆ horizontalLayout_2

QHBoxLayout* JoyTabWidget::horizontalLayout_2
private

◆ horizontalLayout_3

QHBoxLayout* JoyTabWidget::horizontalLayout_3
private

◆ loadButton

QPushButton* JoyTabWidget::loadButton
private

◆ m_battery_updater

QTimer* JoyTabWidget::m_battery_updater
private

◆ m_joystick

InputDevice* JoyTabWidget::m_joystick
private

◆ m_old_power_level

SDL_JoystickPowerLevel JoyTabWidget::m_old_power_level = SDL_JOYSTICK_POWER_UNKNOWN
private

◆ m_settings

AntiMicroSettings* JoyTabWidget::m_settings
private

◆ namesPushButton

QPushButton* JoyTabWidget::namesPushButton
private

◆ oldProfileName

QString JoyTabWidget::oldProfileName
private

◆ page

QWidget* JoyTabWidget::page
private

◆ page_2

QWidget* JoyTabWidget::page_2
private

◆ page_3

QWidget* JoyTabWidget::page_3
private

◆ page_4

QWidget* JoyTabWidget::page_4
private

◆ page_5

QWidget* JoyTabWidget::page_5
private

◆ page_6

QWidget* JoyTabWidget::page_6
private

◆ page_7

QWidget* JoyTabWidget::page_7
private

◆ page_8

QWidget* JoyTabWidget::page_8
private

◆ pushButton

QPushButton* JoyTabWidget::pushButton
private

◆ quickSetPushButton

QPushButton* JoyTabWidget::quickSetPushButton
private

◆ removeButton

QPushButton* JoyTabWidget::removeButton
private

◆ resetButton

QPushButton* JoyTabWidget::resetButton
private

◆ saveAsButton

QPushButton* JoyTabWidget::saveAsButton
private

◆ saveButton

QPushButton* JoyTabWidget::saveButton
private

◆ setAction1

QAction* JoyTabWidget::setAction1
private

◆ setAction2

QAction* JoyTabWidget::setAction2
private

◆ setAction3

QAction* JoyTabWidget::setAction3
private

◆ setAction4

QAction* JoyTabWidget::setAction4
private

◆ setAction5

QAction* JoyTabWidget::setAction5
private

◆ setAction6

QAction* JoyTabWidget::setAction6
private

◆ setAction7

QAction* JoyTabWidget::setAction7
private

◆ setAction8

QAction* JoyTabWidget::setAction8
private

◆ setPushButton1

QPushButton* JoyTabWidget::setPushButton1
private

◆ setPushButton2

QPushButton* JoyTabWidget::setPushButton2
private

◆ setPushButton3

QPushButton* JoyTabWidget::setPushButton3
private

◆ setPushButton4

QPushButton* JoyTabWidget::setPushButton4
private

◆ setPushButton5

QPushButton* JoyTabWidget::setPushButton5
private

◆ setPushButton6

QPushButton* JoyTabWidget::setPushButton6
private

◆ setPushButton7

QPushButton* JoyTabWidget::setPushButton7
private

◆ setPushButton8

QPushButton* JoyTabWidget::setPushButton8
private

◆ setsMenuButton

QPushButton* JoyTabWidget::setsMenuButton
private

◆ spacer1

QSpacerItem* JoyTabWidget::spacer1
private

◆ spacer2

QSpacerItem* JoyTabWidget::spacer2
private

◆ spacer3

QSpacerItem* JoyTabWidget::spacer3
private

◆ stackedWidget_2

QStackedWidget* JoyTabWidget::stackedWidget_2
private

◆ stickAssignPushButton

QPushButton* JoyTabWidget::stickAssignPushButton
private

◆ tabHelper

JoyTabWidgetHelper JoyTabWidget::tabHelper
private

◆ verticalLayout

QVBoxLayout* JoyTabWidget::verticalLayout
private

◆ verticalSpacer_2

QSpacerItem* JoyTabWidget::verticalSpacer_2
private

◆ verticalSpacer_3

QSpacerItem* JoyTabWidget::verticalSpacer_3
private

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