Bits and Droids connector
Connect your microcontroller to handle MFS2020 commands.
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SettingsHandler Class Reference

#include <settingshandler.h>

Inheritance diagram for SettingsHandler:
ComSettingsHandler

Public Member Functions

 SettingsHandler ()
 
virtual void storeValue (QString group, QString key, QVariant value)
 
virtual QVariant * retrieveSetting (const QString &group, const QString &key)
 
QStringList * retrieveKeys (QString group)
 
void clearKeys (QString group)
 
void removeSetting (QString group, QString key)
 
QString getPath ()
 
void storeSubGroup (QString group, QString subGroup, QString key, QVariant value)
 
QStringList * retrieveSubKeys (QString group, QString subGroup)
 
QVariant * retrieveSubSetting (QString group, QString subGroup, QString key)
 
void checkEventFilePresent ()
 
void migrate ()
 Migrates the settings to the latest version When we make changes to the connector there is a chance that the settings have to be altered as well. In order to reduce the risk of breaking the settings we migrate the settings to the latest version. This function will migrate the settings to the latest version. It will do this by checking the version of the settings and then running the migrations that are required to get to the latest version. More...
 

Private Attributes

QString path
 
QSettings * settings
 

Constructor & Destructor Documentation

◆ SettingsHandler()

SettingsHandler::SettingsHandler ( )

Member Function Documentation

◆ checkEventFilePresent()

void SettingsHandler::checkEventFilePresent ( )

◆ clearKeys()

void SettingsHandler::clearKeys ( QString  group)

◆ getPath()

QString SettingsHandler::getPath ( )
inline

◆ migrate()

void SettingsHandler::migrate ( )

Migrates the settings to the latest version When we make changes to the connector there is a chance that the settings have to be altered as well. In order to reduce the risk of breaking the settings we migrate the settings to the latest version. This function will migrate the settings to the latest version. It will do this by checking the version of the settings and then running the migrations that are required to get to the latest version.

The ID of the migration is the creation date of the migration( in the format YYYYMMDDVV where YYYY is the year, MM is the month, DD is the day and VV is the version

◆ removeSetting()

void SettingsHandler::removeSetting ( QString  group,
QString  key 
)

◆ retrieveKeys()

QStringList * SettingsHandler::retrieveKeys ( QString  group)

◆ retrieveSetting()

QVariant * SettingsHandler::retrieveSetting ( const QString &  group,
const QString &  key 
)
virtual

◆ retrieveSubKeys()

QStringList * SettingsHandler::retrieveSubKeys ( QString  group,
QString  subGroup 
)

◆ retrieveSubSetting()

QVariant * SettingsHandler::retrieveSubSetting ( QString  group,
QString  subGroup,
QString  key 
)

◆ storeSubGroup()

void SettingsHandler::storeSubGroup ( QString  group,
QString  subGroup,
QString  key,
QVariant  value 
)

◆ storeValue()

void SettingsHandler::storeValue ( QString  group,
QString  key,
QVariant  value 
)
virtual

Member Data Documentation

◆ path

QString SettingsHandler::path
private
Initial value:
=
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)

◆ settings

QSettings* SettingsHandler::settings
private
Initial value:
=
new QSettings(QSettings::IniFormat, QSettings::UserScope,
"Bits and Droids", "settings")

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