27#include <QtCore/QString>
29#include <QtXml/QDomDocument>
63 int read_int(
const QString& node,
int default_value,
bool inexistent_ok=
true,
bool empty_ok=
true,
bool bSilent =
false );
73 bool read_bool(
const QString& node,
bool default_value,
bool inexistent_ok=
true,
bool empty_ok=
true,
bool bSilent =
false );
84 bool read_bool(
const QString& node,
bool default_value,
bool* pFound,
bool inexistent_ok=
true,
bool empty_ok=
true,
bool bSilent =
false );
94 float read_float(
const QString& node,
float default_value,
bool inexistent_ok=
true,
bool empty_ok=
true,
bool bSilent =
false );
95 float read_float(
const QString& node,
float default_value,
bool *pFound,
bool inexistent_ok=
true,
bool empty_ok=
true,
bool bSilent =
false );
105 QString
read_string(
const QString& node,
const QString& default_value,
bool inexistent_ok=
true,
bool empty_ok=
true,
bool bSilent =
false );
106 QColor
read_color(
const QString& node,
const QColor& defaultValue = QColor( 97, 167, 251 ),
bool inexistent_ok=
true,
bool empty_ok=
true,
bool bSilent =
false );
117 QString
read_attribute(
const QString& attribute,
const QString& default_value,
bool inexistent_ok,
bool empty_ok,
bool bSilent =
false );
125 QString
read_text(
bool empty_ok,
bool bSilent =
false );
132 void write_int(
const QString& node,
const int value );
138 void write_bool(
const QString& node,
const bool value );
144 void write_float(
const QString& node,
const float value );
150 void write_string(
const QString& node,
const QString& value );
151 void write_color(
const QString& node,
const QColor& color );
158 void write_attribute(
const QString& attribute,
const QString& value );
168 QString
read_child_node(
const QString& node,
bool inexistent_ok,
bool empty_ok,
bool bSilent =
false );
194 bool read(
const QString& filepath,
const QString& schemapath=
nullptr,
bool bSilent =
false );
199 bool write(
const QString& filepath );
205 XMLNode set_root(
const QString& node_name,
const QString& xmlns =
nullptr );
XMLDoc is a subclass of QDomDocument with read and write methods.
XMLNode set_root(const QString &node_name, const QString &xmlns=nullptr)
create the xml header and root node
bool read(const QString &filepath, const QString &schemapath=nullptr, bool bSilent=false)
read the content of an xml file
bool write(const QString &filepath)
write itself into a file
XMLDoc()
basic constructor
XMLNode is a subclass of QDomNode with read and write values methods.
int read_int(const QString &node, int default_value, bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
reads an integer stored into a child node
void write_attribute(const QString &attribute, const QString &value)
write a string as an attribute of the node
QString read_child_node(const QString &node, bool inexistent_ok, bool empty_ok, bool bSilent=false)
reads a string stored into a child node
bool read_bool(const QString &node, bool default_value, bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
reads a boolean stored into a child node
QString read_attribute(const QString &attribute, const QString &default_value, bool inexistent_ok, bool empty_ok, bool bSilent=false)
reads an attribute from the node
QColor read_color(const QString &node, const QColor &defaultValue=QColor(97, 167, 251), bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
void write_child_node(const QString &node, const QString &text)
write a string into a child node
QString read_string(const QString &node, const QString &default_value, bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
reads a string stored into a child node
float read_float(const QString &node, float default_value, bool inexistent_ok=true, bool empty_ok=true, bool bSilent=false)
reads a float stored into a child node
void write_color(const QString &node, const QColor &color)
void write_float(const QString &node, const float value)
write a float into a child node
XMLNode createNode(const QString &name)
create a new XMLNode that has to be appended into de XMLDoc
XMLNode()
basic constructor
void write_string(const QString &node, const QString &value)
write a string into a child node
void write_bool(const QString &node, const bool value)
write a boolean into a child node
QString read_text(bool empty_ok, bool bSilent=false)
reads the text (content) from the node
void write_int(const QString &node, const int value)
write an integer into a child node