 |
AntiMicroX
|
Go to the documentation of this file.
22 #include <SDL2/SDL_joystick.h>
24 #include <QMainWindow>
26 #include <QSystemTrayIcon>
28 #ifdef CHECK_FOR_UPDATES
29 #include <QNetworkAccessManager>
30 #include <QNetworkReply>
59 bool graphical =
true, QWidget *parent =
nullptr);
75 virtual void showEvent(QShowEvent *event);
79 bool eventFilter(QObject *obj, QEvent *event)
override;
101 void fillButtonsMap(QMap<SDL_JoystickID, InputDevice *> *joysticks);
142 void restartAsElevated();
179 #ifdef CHECK_FOR_UPDATES
180 QNetworkAccessManager m_network_manager;
181 void networkManagerFinished(QNetworkReply *reply);
182 void updateButtonPressed();
186 #endif // MAINWINDOW_H
Definition: commandlineutility.h:29
bool hasControllerID()
Definition: commandlineutility.cpp:389
void openCalibration()
Definition: mainwindow.cpp:1085
#define VERBOSE()
Definition: logger.h:42
void trayIconClickAction(QSystemTrayIcon::ActivationReason reason)
Definition: mainwindow.cpp:675
QTranslator * m_translator
Definition: mainwindow.h:166
virtual void showEvent(QShowEvent *event)
Definition: mainwindow.cpp:939
bool isUniqueIDLocked(QString uniqueID)
Definition: autoprofilewatcher.cpp:607
#define DEBUG()
Definition: logger.h:41
QString getUniqueID() const
Definition: autoprofileinfo.cpp:58
Definition: commandlineutility.h:81
const QString programVersion
Definition: common.h:152
void checkAutoProfileWatcherTimer()
Definition: mainwindow.cpp:1646
void fillButtonsID(InputDevice *joystick)
Definition: mainwindow.cpp:345
void mainMenuChange(QMenu *tempMenu)
Definition: mainwindow.cpp:689
void saveAppConfig()
Definition: mainwindow.cpp:703
bool m_graphical
Definition: mainwindow.h:177
void reloadTranslations(QTranslator *translator, QTranslator *appTranslator, QString language)
Reload main application and base Qt translation files.
Definition: common.cpp:125
CommandLineUtility * m_cmdutility
Definition: mainwindow.h:164
QTranslator * getTranslator() const
Definition: mainwindow.cpp:1808
void loadConfigFile(QString fileLocation, int joystickIndex=0)
Definition: mainwindow.cpp:996
bool isKeypadUnlocked()
Definition: mainwindow.cpp:1830
bool signalDisconnect
Definition: mainwindow.h:175
Opens calibration window used for calibration.
Definition: calibration.h:40
bool hasControllerID()
Definition: commandlineutility.h:51
int getControllerNumber()
Definition: commandlineutility.h:47
void checkHideEmptyOption()
Definition: mainwindow.cpp:1380
#define INFO()
Definition: logger.h:43
void handleInstanceDisconnect()
Definition: mainwindow.cpp:1052
void changeLanguage(QString language)
Change language used by the application.
Definition: mainwindow.cpp:1251
void selectControllerJoyTab(QString GUID)
Select appropriate tab that has a device with the specified GUID.
Definition: mainwindow.cpp:1745
QIcon loadIcon(const QString &name, const QString &fallback_location)
Universal method for loading icons.
Definition: common.cpp:162
void readConfig(int index)
#define CHECK_BATTERIES_MSEC
Definition: mainwindow.cpp:86
MainWindow(QMap< SDL_JoystickID, InputDevice * > *joysticks, CommandLineUtility *cmdutility, AntiMicroSettings *settings, bool graphical=true, QWidget *parent=nullptr)
Definition: mainwindow.cpp:88
void openMainSettingsDialog()
Build list of current input devices and pass it to settings dialog instance. Open Settings dialog.
Definition: mainwindow.cpp:1216
void setTranslator(QTranslator *translator)
Definition: mainwindow.cpp:1806
static void disconnectWindowTimer()
Definition: autoprofilewatcher.cpp:67
int getJoyStartSetNumber()
Definition: commandlineutility.h:63
void setAppTranslator(QTranslator *translator)
Definition: mainwindow.cpp:1810
The joystick "Properties" window. Shows various raw values to the user.
Definition: joystickstatuswindow.h:36
void openJoystickStatusWindow()
Definition: mainwindow.cpp:1058
void testMappingUpdateNow(int index, InputDevice *device)
Definition: mainwindow.cpp:1434
~MainWindow()
Definition: mainwindow.cpp:224
Definition: mainsettingsdialog.h:39
void autoprofileLoad(AutoProfileInfo *info)
Definition: mainwindow.cpp:1542
void checkEachTenMinutesBattery(QMap< SDL_JoystickID, InputDevice * > *joysticks)
Definition: mainwindow.cpp:1884
const QMap< int, QList< QAction * > > & getProfileActions()
Definition: mainwindow.cpp:1828
void openKeyCheckerDialog()
Definition: mainwindow.cpp:1073
void alterConfigFromSettings()
Definition: mainwindow.cpp:237
void showBatteryLevel(SDL_JoystickPowerLevel powerLevSDL, QString batteryLev, QString percent, InputDevice *device)
Check state of batteries in controllers and notify user (only when powerLevSDL matches current batter...
Definition: mainwindow.cpp:1688
void propogateNameDisplayStatus(JoyTabWidget *tabwidget, bool displayNames)
Definition: mainwindow.cpp:1154
Definition: antimicrosettings.h:26
QTranslator * getAppTranslator() const
Definition: mainwindow.cpp:1812
AntiMicroSettings * m_settings
Definition: mainwindow.h:165
QAction * updateJoy
Definition: mainwindow.h:173
void populateTrayIcon()
Definition: mainwindow.cpp:426
void refreshTabHelperThreads()
Definition: mainwindow.cpp:1816
void propogateMappingUpdate(QString mapping, InputDevice *device)
Definition: mainwindow.cpp:1432
void changeWindowStatus()
Definition: mainwindow.cpp:1776
bool isCurrentDefault()
is this autoprofile loaded by default? There is one default profile for all of controllers and there ...
Definition: autoprofileinfo.cpp:117
Definition: aboutdialog.h:30
void showStickAssignmentDialog()
Show abstracted controller dialog for use in SDL 1.2. No longer used for versions of the program runn...
Definition: mainwindow.cpp:1283
void mappingUpdated(QString mapping, InputDevice *device)
void singleTrayProfileMenuShow()
Display a version of the tray menu that shows all recent profiles for all controllers in one list.
Definition: mainwindow.cpp:1301
Definition: qkeydisplaydialog.h:31
void foundApplicableProfile(AutoProfileInfo *info)
void joystickRefreshRequested()
Definition: aboutdialog.h:26
Definition: mainwindow.h:53
void loadAppConfig(bool forceRefresh=false)
Definition: mainwindow.cpp:750
void stopTimer()
Definition: autoprofilewatcher.cpp:75
void updateMenuOptions()
TODO: Check if method is save to remove.
Definition: mainwindow.cpp:1670
const QString githubIssuesPage
Definition: common.h:141
void syncProfileAssignment()
Definition: autoprofilewatcher.cpp:336
General input device (which is not a typical gamepad like steering wheels, flight sticks etc....
Definition: joystick.h:34
QList< AutoProfileInfo * > * getCustomDefaults()
Definition: autoprofilewatcher.cpp:591
void quitProgram()
Definition: mainwindow.cpp:645
void enableFlashActions()
Definition: mainwindow.cpp:817
void removeJoyTabs()
Definition: mainwindow.cpp:1038
if the work is an executable linked with the with the complete machine readable work that uses the as object code and or source so that the user can modify the Library and then relink to produce a modified executable containing the modified rather than copying library functions into the if the user installs as long as the modified version is interface compatible with the version that the work was made with c Accompany the work with a written valid for at least three to give the same user the materials specified in for a charge no more than the cost of performing this distribution d If distribution of the work is made by offering access to copy from a designated offer equivalent access to copy the above specified materials from the same place e Verify that the user has already received a copy of these materials or that you have already sent this user a copy For an the required form of the work that uses the Library must include any data and utility programs needed for reproducing the executable from it as a special the materials to be distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system Such a contradiction means you cannot use both them and the Library together in an executable that you distribute You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities not covered by this and distribute such a combined provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise and provided that you do these two uncombined with any other library facilities This must be distributed under the terms of the Sections above b Give prominent notice with the combined library of the fact that part of it is a work based on the and explaining where to find the accompanying uncombined form of the same work You may not link or distribute the Library except as expressly provided under this License Any attempt otherwise to link or distribute the Library is and will automatically terminate your rights under this License parties who have received or from you under this License will not have their licenses terminated so long as such parties remain in full compliance You are not required to accept this since you have not signed it nothing else grants you permission to modify or distribute the Library or its derivative works These actions are prohibited by law if you do not accept this License by modifying or distributing the you indicate your acceptance of this License to do and all its terms and conditions for distributing or modifying the Library or works based on it Each time you redistribute the the recipient automatically receives a license from the original licensor to link with or modify the Library subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties with this License as a consequence of a court judgment or allegation of patent infringement or for any other reason(not limited to patent issues)
bool hasControllerNumber()
Definition: commandlineutility.h:45
QMap< int, QList< QAction * > > profileActions
Definition: mainwindow.h:159
void makeJoystickTabs()
Definition: mainwindow.cpp:307
const QList< ControllerOptionsInfo > & getControllerOptionsList()
Definition: commandlineutility.cpp:407
void removeJoyTab(SDL_JoystickID deviceID)
Definition: mainwindow.cpp:1463
const QString wikiPage
Definition: common.h:142
QTranslator * m_appTranslator
Definition: mainwindow.h:167
void changeStartSetNumber(int startSetNumber, QString controllerID)
Definition: mainwindow.cpp:1169
bool showTrayIcon
Definition: mainwindow.h:176
QMenu * trayIconMenu
Definition: mainwindow.h:162
void convertGUIDtoUniqueID(InputDevice *currentDevice, QString controlEntryLastSelectedGUID)
Definition: mainwindow.cpp:1848
void retranslateUi()
Definition: mainwindow.cpp:1814
QString getProfileLocation() const
Definition: autoprofileinfo.cpp:73
bool isUnloadRequested()
Definition: commandlineutility.h:57
void startJoystickRefresh()
Definition: mainwindow.cpp:415
QString getControllerID()
Definition: commandlineutility.h:53
void openWikiPage()
Definition: mainwindow.cpp:1083
Definition: advancestickassignmentdialog.h:35
Ui::MainWindow * ui
Definition: mainwindow.h:156
void refreshTrayIconMenu()
Definition: mainwindow.cpp:662
static AutoProfileWatcher * getAutoProfileWatcherInstance()
Definition: autoprofilewatcher.cpp:65
bool hasProfile()
Definition: commandlineutility.h:39
void fillButtonsMap(QMap< SDL_JoystickID, InputDevice * > *joysticks)
Definition: mainwindow.cpp:352
bool eventFilter(QObject *obj, QEvent *event) override
Definition: mainwindow.cpp:1838
int getStartSetNumber()
Definition: commandlineutility.h:61
QString getProfileLocation()
Definition: commandlineutility.h:41
AboutDialog * aboutDialog
Definition: mainwindow.h:163
QMap< SDL_JoystickID, InputDevice * > * m_joysticks
Definition: mainwindow.h:158
#define WARN()
Definition: logger.h:44
void startTimer()
Definition: autoprofilewatcher.cpp:73
void changeLanguage(QString language)
QAction * hideAction
Definition: mainwindow.h:170
QVariant runtimeValue(const QString &key, const QVariant &defaultValue=QVariant()) const
Get the currently used value such as an setting overridden with a command line argument.
Definition: antimicrosettings.cpp:37
void addJoyTab(InputDevice *device)
Definition: mainwindow.cpp:1507
QAction * restoreAction
Definition: mainwindow.h:171
Links information about targeted application with recommended profile.
Definition: autoprofileinfo.h:29
const QString githubProjectPage
Definition: common.h:140
void unloadCurrentConfig(int joystickIndex=0)
Definition: mainwindow.cpp:1112
QAction * closeAction
Definition: mainwindow.h:172
void openAboutDialog()
Definition: mainwindow.cpp:994
bool hasControllerNumber()
Definition: commandlineutility.cpp:379
it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Lesser General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number
Definition: lgpl-2.1.txt:423
void disableFlashActions()
Definition: mainwindow.cpp:759
bool getGraphicalStatus()
Definition: mainwindow.cpp:1804
bool isHiddenRequested()
Definition: commandlineutility.cpp:385
void profileTrayActionTriggered(QAction *action, bool checked)
Definition: mainwindow.cpp:1352
int getControllerNumber()
Definition: commandlineutility.cpp:383
QSystemTrayIcon * trayIcon
Definition: mainwindow.h:161
Manages auto profile functionality. Allows for profiles to be associated with specific applications.
Definition: autoprofilewatcher.h:35
bool shouldListControllers()
Definition: commandlineutility.cpp:399
bool isTrayHidden()
Definition: commandlineutility.cpp:375
virtual void closeEvent(QCloseEvent *event)
Check if the program should really quit or if it should be minimized.
Definition: mainwindow.cpp:1264
virtual void changeEvent(QEvent *event)
Definition: mainwindow.cpp:969
AutoProfileWatcher * appWatcher
Definition: mainwindow.h:168
void joystickTrayShow(QMenu *tempmenu)
Definition: mainwindow.cpp:896
bool hasProfile()
Definition: commandlineutility.cpp:377
void openGitHubPage()
Definition: mainwindow.cpp:1079
void fillButtons()
Definition: mainwindow.cpp:305
void openIssuesPage()
Definition: mainwindow.cpp:1081
void hideWindow()
Definition: mainwindow.cpp:889
QString getProfileLocation()
Definition: commandlineutility.cpp:381