ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
#include <src/ckb/ckbsettings.h>
Public Member Functions | |
CkbSettings () | |
CkbSettings (const QString &basePath, bool eraseExisting=false) | |
CkbSettings (QSettings &settings) | |
~CkbSettings () | |
void | beginGroup (const QString &prefix) |
void | endGroup () |
QStringList | childGroups () const |
QStringList | childKeys () const |
bool | contains (const QString &key) const |
bool | containsGroup (const QString &group) |
QVariant | value (const QString &key, const QVariant &defaultValue=QVariant()) const |
void | setValue (const QString &key, const QVariant &value) |
void | remove (const QString &key) |
Static Public Member Functions | |
static QVariant | get (const QString &key, const QVariant &defaultValue=QVariant()) |
static void | set (const QString &key, const QVariant &value) |
static bool | isBusy () |
static void | cleanUp () |
Private Member Functions | |
QString | pwd () const |
QString | pwd (const QString &key) const |
Private Attributes | |
QSettings * | backing |
QStringList | groups |
QStringList | removeCache |
QMap< QString, QVariant > | writeCache |
Definition at line 11 of file ckbsettings.h.
CkbSettings::CkbSettings | ( | ) |
Definition at line 61 of file ckbsettings.cpp.
CkbSettings::CkbSettings | ( | const QString & | basePath, |
bool | eraseExisting = false |
||
) |
Definition at line 65 of file ckbsettings.cpp.
References beginGroup().
CkbSettings::CkbSettings | ( | QSettings & | settings | ) |
Definition at line 77 of file ckbsettings.cpp.
CkbSettings::~CkbSettings | ( | ) |
Definition at line 145 of file ckbsettings.cpp.
References backing, removeCache, and writeCache.
void CkbSettings::beginGroup | ( | const QString & | prefix | ) |
Definition at line 81 of file ckbsettings.cpp.
References groups.
Referenced by CkbSettings(), KbAnim::save(), and SGroup::SGroup().
QStringList CkbSettings::childGroups | ( | ) | const |
Definition at line 89 of file ckbsettings.cpp.
References backing, current, lockMutex, and pwd().
Referenced by containsGroup(), and GradientDialog::GradientDialog().
QStringList CkbSettings::childKeys | ( | ) | const |
Definition at line 100 of file ckbsettings.cpp.
References backing, current, lockMutex, and pwd().
Referenced by GradientDialog::GradientDialog(), KbAnim::KbAnim(), KbBind::load(), KbLight::load(), and KbBind::loadGlobalRemap().
|
static |
Definition at line 46 of file ckbsettings.cpp.
References _globalSettings, cacheWritesInProgress(), and globalThread.
Referenced by MainWindow::cleanup().
bool CkbSettings::contains | ( | const QString & | key | ) | const |
Definition at line 111 of file ckbsettings.cpp.
References backing, lockMutex, and pwd().
Referenced by KbMode::KbMode(), KbProfile::KbProfile(), and KbPerf::load().
bool CkbSettings::containsGroup | ( | const QString & | group | ) |
Definition at line 116 of file ckbsettings.cpp.
References childGroups().
Referenced by KbPerf::load().
void CkbSettings::endGroup | ( | ) |
Definition at line 85 of file ckbsettings.cpp.
References groups.
Referenced by KbAnim::save(), and SGroup::~SGroup().
|
static |
Definition at line 155 of file ckbsettings.cpp.
References globalCache, globalSettings(), lockMutexCache, and lockMutexStatic2.
Referenced by MainWindow::closeEvent(), KbLightWidget::KbLightWidget(), MainWindow::MainWindow(), AutoRun::once(), and MainWindow::timerTick().
|
static |
Definition at line 42 of file ckbsettings.cpp.
References cacheWritesInProgress().
Referenced by Kb::autoSave(), and ExtraSettingsWidget::pollUpdates().
|
inlineprivate |
Definition at line 51 of file ckbsettings.h.
References groups.
Referenced by childGroups(), childKeys(), contains(), remove(), setValue(), and value().
|
inlineprivate |
Definition at line 52 of file ckbsettings.h.
Referenced by pwd().
void CkbSettings::remove | ( | const QString & | key | ) |
Definition at line 141 of file ckbsettings.cpp.
References pwd(), and removeCache.
Referenced by SettingsWidget::SettingsWidget().
|
static |
Definition at line 166 of file ckbsettings.cpp.
References globalCache, globalSettings(), lockMutexCache, lockMutexStatic, and value().
Referenced by MainWindow::closeEvent(), AutoRun::enable(), AutoRun::isEnabled(), SettingsWidget::on_autoFWBox_clicked(), ExtraSettingsWidget::on_delayBox_clicked(), ExtraSettingsWidget::on_ditherBox_clicked(), SettingsWidget::on_layoutBox_activated(), ExtraSettingsWidget::on_mAccelBox_clicked(), ExtraSettingsWidget::on_sAccelBox_clicked(), KbLightWidget::on_showAnimBox_clicked(), ExtraSettingsWidget::on_sSpeedBox_valueChanged(), ExtraSettingsWidget::on_trayBox_clicked(), MPerfWidget::on_xyBox_clicked(), and ExtraSettingsWidget::pollUpdates().
void CkbSettings::setValue | ( | const QString & | key, |
const QVariant & | value | ||
) |
Definition at line 131 of file ckbsettings.cpp.
References globalCache, lockMutexCache, pwd(), value(), and writeCache.
Referenced by ExtraSettingsWidget::on_fpsBox_valueChanged(), KbProfile::save(), KbPerf::save(), KbAnim::save(), KbBind::save(), KbMode::save(), KbLight::save(), Kb::save(), KbBind::saveGlobalRemap(), SettingsWidget::SettingsWidget(), and GradientDialog::~GradientDialog().
QVariant CkbSettings::value | ( | const QString & | key, |
const QVariant & | defaultValue = QVariant() |
||
) | const |
Definition at line 126 of file ckbsettings.cpp.
References backing, lockMutex, and pwd().
Referenced by ExtraSettingsWidget::ExtraSettingsWidget(), GradientDialog::GradientDialog(), KbAnim::KbAnim(), KbMode::KbMode(), KbProfile::KbProfile(), KbPerf::load(), KbBind::load(), KbLight::load(), Kb::load(), KbBind::loadGlobalRemap(), set(), SettingsWidget::SettingsWidget(), and setValue().
|
private |
Definition at line 46 of file ckbsettings.h.
Referenced by childGroups(), childKeys(), contains(), value(), and ~CkbSettings().
|
private |
Definition at line 47 of file ckbsettings.h.
Referenced by beginGroup(), endGroup(), and pwd().
|
private |
Definition at line 48 of file ckbsettings.h.
Referenced by remove(), and ~CkbSettings().
|
private |
Definition at line 49 of file ckbsettings.h.
Referenced by setValue(), and ~CkbSettings().