AntiMicroX
Public Member Functions | Static Public Attributes | Protected Attributes
AntiMicroSettings Class Reference

#include <antimicrosettings.h>

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

Public Member Functions

 AntiMicroSettings (const QString &fileName, Format format, QObject *parent=nullptr)
 
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. More...
 
void importFromCommandLine (CommandLineUtility &cmdutility)
 Import relevant options given on the command line into a QSettings instance. Used to override any options that might be present in the main settings file. Keys will have to be changed to the appropriate config key. More...
 
QMutex * getLock ()
 
QSettings & getCmdSettings ()
 
void applySettingsToLogger (CommandLineUtility &cmdutility, Logger *logger=nullptr)
 applies settings from command line to logger More...
 

Static Public Attributes

static const bool defaultDisabledWinEnhanced = false
 

Protected Attributes

QSettings cmdSettings
 
QMutex lock
 

Constructor & Destructor Documentation

◆ AntiMicroSettings()

AntiMicroSettings::AntiMicroSettings ( const QString &  fileName,
Format  format,
QObject *  parent = nullptr 
)
explicit

Member Function Documentation

◆ applySettingsToLogger()

void AntiMicroSettings::applySettingsToLogger ( CommandLineUtility cmdutility,
Logger logger_ptr = nullptr 
)

applies settings from command line to logger

Parameters
cmdutility
loggerpointer to logger, if nullptr then getInstance() is used
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCmdSettings()

QSettings & AntiMicroSettings::getCmdSettings ( )
Here is the caller graph for this function:

◆ getLock()

QMutex * AntiMicroSettings::getLock ( )
Here is the caller graph for this function:

◆ importFromCommandLine()

void AntiMicroSettings::importFromCommandLine ( CommandLineUtility cmdutility)

Import relevant options given on the command line into a QSettings instance. Used to override any options that might be present in the main settings file. Keys will have to be changed to the appropriate config key.

Parameters
Interpretedoptions set on the command line.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ runtimeValue()

QVariant AntiMicroSettings::runtimeValue ( const QString &  key,
const QVariant &  defaultValue = QVariant() 
) const

Get the currently used value such as an setting overridden with a command line argument.

Parameters
Settingkey
Defaultvalue to use if key does not exist
Returns
Stored value or the default value passed
Here is the caller graph for this function:

Field Documentation

◆ cmdSettings

QSettings AntiMicroSettings::cmdSettings
protected

◆ defaultDisabledWinEnhanced

const bool AntiMicroSettings::defaultDisabledWinEnhanced = false
static

◆ lock

QMutex AntiMicroSettings::lock
protected

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