SettingValue< T > Class Template Reference

#include <settingvalue.h>

Public Member Functions

 SettingValue (const char *keyName)
get (const T &defaultValue={}) const
 operator T () const
SettingValue< T > & operator= (const T &value)

Private Attributes

const QString m_keyName

Detailed Description

template<typename T>
class SettingValue< T >

Definition at line 38 of file settingvalue.h.

Constructor & Destructor Documentation

◆ SettingValue()

template<typename T >
SettingValue< T >::SettingValue ( const char *  keyName)

Definition at line 41 of file settingvalue.h.

42  : m_keyName {QLatin1String {keyName}}
43  {
44  }
const QString m_keyName
Definition: settingvalue.h:63

Member Function Documentation

◆ get()

◆ operator T()

template<typename T >
SettingValue< T >::operator T ( ) const

Definition at line 51 of file settingvalue.h.

52  {
53  return get();
54  }
T get(const T &defaultValue={}) const
Definition: settingvalue.h:46

◆ operator=()

template<typename T >
SettingValue<T>& SettingValue< T >::operator= ( const T &  value)

Definition at line 56 of file settingvalue.h.

57  {
59  return *this;
60  }
void storeValue(const QString &key, const T &value)
T value(const QString &key, const T &defaultValue={})
Definition: preferences.cpp:64

References SettingsStorage::instance(), SettingValue< T >::m_keyName, SettingsStorage::storeValue(), and anonymous_namespace{preferences.cpp}::value().

Here is the call graph for this function:

Member Data Documentation

◆ m_keyName

template<typename T >
const QString SettingValue< T >::m_keyName

Definition at line 63 of file settingvalue.h.

Referenced by SettingValue< T >::operator=().

The documentation for this class was generated from the following file: