AntiMicroX
Loading...
Searching...
No Matches
antimicrosettings.h
Go to the documentation of this file.
1/* antimicrox Gamepad to KB+M event mapper
2 * Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com>
3 * Copyright (C) 2020 Jagoda Górska <juliagoda.pl@protonmail>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef ANTIMICROSETTINGS_H
20#define ANTIMICROSETTINGS_H
21
22#include "commandlineutility.h"
23
24#include <QSettings>
25
26class AntiMicroSettings : public QSettings
27{
28 Q_OBJECT
29
30 public:
31 explicit AntiMicroSettings(const QString &fileName, Format format, QObject *parent = nullptr);
32
33 QVariant runtimeValue(const QString &key, const QVariant &defaultValue = QVariant()) const;
35 QMutex *getLock();
36 QSettings &getCmdSettings();
37
38 static const bool defaultDisabledWinEnhanced;
39
40 void applySettingsToLogger(CommandLineUtility &cmdutility, Logger *logger = nullptr);
41
42 protected:
43 QSettings cmdSettings;
44 QMutex lock;
45};
46
47#endif // ANTIMICROSETTINGS_H
Definition antimicrosettings.h:27
static const bool defaultDisabledWinEnhanced
Definition antimicrosettings.h:38
QMutex * getLock()
Definition antimicrosettings.cpp:95
void applySettingsToLogger(CommandLineUtility &cmdutility, Logger *logger=nullptr)
applies settings from command line to logger
Definition antimicrosettings.cpp:73
QSettings & getCmdSettings()
Definition antimicrosettings.cpp:97
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
QSettings cmdSettings
Definition antimicrosettings.h:43
void importFromCommandLine(CommandLineUtility &cmdutility)
Import relevant options given on the command line into a QSettings instance. Used to override any opt...
Definition antimicrosettings.cpp:58
QMutex lock
Definition antimicrosettings.h:44
Definition commandlineutility.h:82
Custom singleton class used for logging across application.
Definition logger.h:58