#include <libmythbase/configuration.h>
|
| XmlConfiguration () |
|
| XmlConfiguration (QString fileName) |
|
bool | Load () |
|
bool | Save () |
|
bool | FileExists () |
|
bool | GetValue (const QString &setting, const bool defaultValue) |
|
int | GetValue (const QString &setting, const int defaultValue) |
|
QString | GetValue (const QString &setting, const QString &defaultValue) |
|
QString | GetValue (const QString &setting, const char *defaultValue) |
| get the string value stored as setting with a default C string. More...
|
|
void | SetValue (const QString &setting, bool value) |
|
void | SetValue (const QString &setting, int value) |
|
void | SetValue (const QString &setting, const char *value) |
| set value to a C string; just in case, for overload resolution More...
|
|
void | SetValue (const QString &setting, const QString &value) |
|
void | ClearValue (const QString &setting) |
|
template<typename T > |
std::enable_if_t< std::chrono::__is_duration< T >::value, T > | GetDuration (const QString &setting, T defaultValue=T::zero()) |
|
template<typename T > |
std::enable_if_t< std::chrono::__is_duration< T >::value > | SetDuration (const QString &setting, T value) |
|
|
QDomNode | FindNode (const QString &setting, bool create) |
|
QDomNode | FindNode (QStringList &path, QDomNode ¤t, bool create) |
|
QString | GetValue (const QString &setting) |
|
Definition at line 38 of file configuration.h.
◆ XmlConfiguration() [1/2]
XmlConfiguration::XmlConfiguration |
( |
| ) |
|
|
inline |
◆ XmlConfiguration() [2/2]
XmlConfiguration::XmlConfiguration |
( |
QString |
fileName | ) |
|
|
inlineexplicit |
◆ FindNode() [1/2]
QDomNode XmlConfiguration::FindNode |
( |
const QString & |
setting, |
|
|
bool |
create |
|
) |
| |
|
protected |
◆ FindNode() [2/2]
QDomNode XmlConfiguration::FindNode |
( |
QStringList & |
path, |
|
|
QDomNode & |
current, |
|
|
bool |
create |
|
) |
| |
|
protected |
◆ GetValue() [1/5]
QString XmlConfiguration::GetValue |
( |
const QString & |
setting | ) |
|
|
protected |
Definition at line 202 of file configuration.cpp.
Referenced by UPnpDeviceDesc::GetHostName(), MythHTTPServer::Init(), HTTPRequest::IsUrlProtected(), MediaRenderer::MediaRenderer(), MMulticastSocketDevice::MMulticastSocketDevice(), MythFEXML::MythFEXML(), UPnpDeviceDesc::OutputDevice(), anonymous_namespace{mythcontext.cpp}::GUISettingsCache::save(), SSDPExtension::SSDPExtension(), UPnpCDS::UPnpCDS(), UPnpCMGR::UPnpCMGR(), and UPnpMSRR::UPnpMSRR().
◆ Load()
bool XmlConfiguration::Load |
( |
| ) |
|
◆ Save()
bool XmlConfiguration::Save |
( |
| ) |
|
◆ FileExists()
bool XmlConfiguration::FileExists |
( |
| ) |
|
◆ GetValue() [2/5]
bool XmlConfiguration::GetValue |
( |
const QString & |
setting, |
|
|
const bool |
defaultValue |
|
) |
| |
|
inline |
◆ GetValue() [3/5]
int XmlConfiguration::GetValue |
( |
const QString & |
setting, |
|
|
const int |
defaultValue |
|
) |
| |
|
inline |
◆ GetValue() [4/5]
QString XmlConfiguration::GetValue |
( |
const QString & |
setting, |
|
|
const QString & |
defaultValue |
|
) |
| |
|
inline |
◆ GetValue() [5/5]
QString XmlConfiguration::GetValue |
( |
const QString & |
setting, |
|
|
const char * |
defaultValue |
|
) |
| |
|
inline |
get the string value stored as setting with a default C string.
This fixes overload resolution, making it choose this instead of the bool one.
Definition at line 87 of file configuration.h.
◆ SetValue() [1/4]
void XmlConfiguration::SetValue |
( |
const QString & |
setting, |
|
|
bool |
value |
|
) |
| |
|
inline |
◆ SetValue() [2/4]
void XmlConfiguration::SetValue |
( |
const QString & |
setting, |
|
|
int |
value |
|
) |
| |
|
inline |
◆ SetValue() [3/4]
void XmlConfiguration::SetValue |
( |
const QString & |
setting, |
|
|
const char * |
value |
|
) |
| |
|
inline |
set value to a C string; just in case, for overload resolution
- Note
- : This should probably never be used since the C string should have already been converted to a QString.
Definition at line 105 of file configuration.h.
◆ SetValue() [4/4]
void XmlConfiguration::SetValue |
( |
const QString & |
setting, |
|
|
const QString & |
value |
|
) |
| |
◆ ClearValue()
void XmlConfiguration::ClearValue |
( |
const QString & |
setting | ) |
|
◆ GetDuration()
template<typename T >
std::enable_if_t<std::chrono::__is_duration<T>::value, T> XmlConfiguration::GetDuration |
( |
const QString & |
setting, |
|
|
T |
defaultValue = T::zero() |
|
) |
| |
|
inline |
◆ SetDuration()
template<typename T >
std::enable_if_t<std::chrono::__is_duration<T>::value> XmlConfiguration::SetDuration |
( |
const QString & |
setting, |
|
|
T |
value |
|
) |
| |
|
inline |
◆ m_path
◆ m_fileName
◆ m_config
QDomDocument XmlConfiguration::m_config |
|
protected |
◆ m_rootNode
QDomNode XmlConfiguration::m_rootNode |
|
protected |
◆ kDefaultFilename
constexpr auto XmlConfiguration::kDefaultFilename = "config.xml" |
|
staticconstexpr |
The documentation for this class was generated from the following files: