1#ifndef TBQ_CORE_SETTINGSINI_H
2#define TBQ_CORE_SETTINGSINI_H
4#include "toolboxqt/toolboxqt_global.h"
11#define mSettings tbq::SettingsIni::instance()
21 using CbHook = std::function<bool(
const QFileInfo &fileInfo)>;
30 bool loadSettings(
const QFileInfo &fileInfo);
31 QFileInfo getPath()
const;
33 void groupBegin(TB_QTCOMPAT_STR_VIEW keyGroup);
36 void setValue(TB_QTCOMPAT_STR_VIEW key,
const QVariant &value);
37 QVariant getValue(TB_QTCOMPAT_STR_VIEW key,
const QVariant &defaultValue = QVariant())
const;
40 void setHooksPreLoadSettings(
CbHook hookPreload);
41 void setHooksPostLoadSettings(
CbHook hookPostload);
44 static bool defaultHook(
const QFileInfo &fileInfo);
47 std::unique_ptr<QSettings> m_settings;
Class used to manage INI configuration file.
Definition: settingsini.h:17
std::function< bool(const QFileInfo &fileInfo)> CbHook
Custom callback hook use to implement custom behaviour.
Definition: settingsini.h:21