QuasarAppLib
settingslistner.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#include "isettings.h"
9#include "settingslistner.h"
10
11namespace QuasarAppUtils {
12
14
16 if (settings) {
17
18 auto listner = [this](QString key, QVariant val){
19 this->handleSettingsChanged(key, val);
20 };
21
22 _listnerConnection = QObject::connect(settings,
24 listner);
25 }
26}
27
29 QObject::disconnect(_listnerConnection);
30}
31
32}
static ISettings * instance()
instance This method returns pointer to current settings object.
Definition isettings.cpp:43
void valueChanged(QString key, QVariant value)
valueChanged This signal when value of the key settings changed
virtual void handleSettingsChanged(const QString &key, const QVariant &value)=0
handleSettingsChanged This method will be invoked when settings of application has bean changed.
The QuasaraAppUtils class This lib include base functions for the all applications of QuasarApp group...
Definition helpdata.cpp:18
void gen(int size, QByteArray &result)