Skip to content

Class QfSettings

ClassList > QfSettings

Inherits the following classes: QSettings

Public Signals

Type Name
signal void settingChanged (const QString & key)

Public Functions

Type Name
QfSettings (QObject * parent=nullptr)
Q_INVOKABLE void remove (const QString & key)
Q_INVOKABLE void setValue (const QString & key, const QVariant & value)
Q_INVOKABLE void sync ()
Q_INVOKABLE QVariant value (const QString & key, const QVariant & defaultValue)
Q_INVOKABLE bool valueBool (const QString & key, bool defaultValue)
Q_INVOKABLE int valueInt (const QString & key, int defaultValue)

Public Signals Documentation

signal settingChanged

void QfSettings::settingChanged;

Public Functions Documentation

function QfSettings

explicit QfSettings::QfSettings (
    QObject * parent=nullptr
) 

function remove

Q_INVOKABLE void QfSettings::remove (
    const QString & key
) 

Removes the given key from settings.


function setValue

Q_INVOKABLE void QfSettings::setValue (
    const QString & key,
    const QVariant & value
) 

function sync

Q_INVOKABLE void QfSettings::sync () 

Writes any unsaved changes to permanent storage, and reloads the settings.


function value

Q_INVOKABLE QVariant QfSettings::value (
    const QString & key,
    const QVariant & defaultValue
) 

function valueBool

Q_INVOKABLE bool QfSettings::valueBool (
    const QString & key,
    bool defaultValue
) 

Properly evaluates the returned value to be boolean. If the normal value() is used instead, a string "true" or "false" will be returned which will be evaluated to true either way by JS.


function valueInt

Q_INVOKABLE int QfSettings::valueInt (
    const QString & key,
    int defaultValue
) 

Properly evaluates the returned value to be int. If the normal value() is used instead, a string "1" or "-456" will be returned.



The documentation for this class was generated from the following file src/core/qfsettings.h