Manage the settings read write from/to config file, on settings changed will emit a signal to update components accordingly.
More...
#include <SettingsManager.h>
|
void | settingsChanged (const settings::type &type, const QJsonDocument &data) |
| Emits whenever a config part changed. More...
|
|
|
| SettingsManager (Hyperion *hyperion, const quint8 &instance, const QString &configFile) |
| Construct a settings manager and assign a hyperion instance hyperion The parent hyperion instance instance Instance number of Hyperion.
|
|
| SettingsManager (const quint8 &instance, const QString &configFile) |
| Construct a settings manager for HyperionDaemon.
|
|
bool | saveSettings (QJsonObject config, const bool &correct=false) |
| Save a complete json config. More...
|
|
const QJsonDocument | getSetting (const settings::type &type) |
| get a single setting json from config More...
|
|
const QJsonObject & | getSettings () |
| get the full settings object of this instance (with global settings) More...
|
|
Manage the settings read write from/to config file, on settings changed will emit a signal to update components accordingly.
§ getSetting()
const QJsonDocument SettingsManager::getSetting |
( |
const settings::type & |
type | ) |
|
get a single setting json from config
- Parameters
-
type | The settings::type from enum |
- Returns
- The requested json data as QJsonDocument
§ getSettings()
const QJsonObject& SettingsManager::getSettings |
( |
| ) |
|
|
inline |
get the full settings object of this instance (with global settings)
- Returns
- The requested json
§ saveSettings()
bool SettingsManager::saveSettings |
( |
QJsonObject |
config, |
|
|
const bool & |
correct = false |
|
) |
| |
Save a complete json config.
- Parameters
-
config | The entire config object |
correct | If true will correct json against schema before save |
- Returns
- True on success else false
§ settingsChanged
void SettingsManager::settingsChanged |
( |
const settings::type & |
type, |
|
|
const QJsonDocument & |
data |
|
) |
| |
|
signal |
Emits whenever a config part changed.
- Parameters
-
type | The settings type from enum |
data | The data as QJsonDocument |
The documentation for this class was generated from the following files: