#include <xml_parameter_writer.h>
The XMLParameterWriter class provides an interface to write parameters stored in a QTreeWidget to a file in XML format. This class makes extensive use of the QXmlStreamWriter class, which implements the basic functionalities for writing XML files.
- Note
- This class is used in the graphical user interface for the ParameterHandler class. It is not compiled into the deal.II libraries and can not be used by applications using deal.II.
- Author
- Martin Steigemann, Wolfgang Bangerth, 2010
Definition at line 44 of file xml_parameter_writer.h.
dealii::ParameterGui::XMLParameterWriter::XMLParameterWriter |
( |
QTreeWidget * |
tree_widget | ) |
|
Constructor. Parameter values from tree_widget
will be written.
bool dealii::ParameterGui::XMLParameterWriter::write_xml_file |
( |
QIODevice * |
device | ) |
|
This function writes the parameter values stored in tree_widget
to device
in XML format. We use the QXmlStreaWriter class for this. The root element is <ParameterHandler>
void dealii::ParameterGui::XMLParameterWriter::write_item |
( |
QTreeWidgetItem * |
item | ) |
|
|
private |
This function writes a given item
of tree_widget
to a file in XML format. For this the QXmlStreamWriter class is used. If the item
is a parameter, the elements that describes this parameter are written:
<value>value</value>
<default_value>default_value</default_value>
<documentation>documentation</documentation>
<pattern>pattern</pattern>
<pattern_description>[pattern_description]</pattern_description>
If the item
is a subsection, a start element this_subsection
is written and write_item
is called recursively to write the next item
.
QString dealii::ParameterGui::XMLParameterWriter::mangle |
( |
const QString & |
s | ) |
|
|
private |
Reimplemented from the ParameterHandler class. Mangle a string s
so that it doesn't contain any special characters or spaces.
QXmlStreamWriter dealii::ParameterGui::XMLParameterWriter::xml |
|
private |
An QXmlStreamWriter object which implements the functionalities we need for writing parameters to XML files.
Definition at line 89 of file xml_parameter_writer.h.
QTreeWidget* dealii::ParameterGui::XMLParameterWriter::tree_widget |
|
private |
A pointer to the QTreeWidget structure which stores the parameters.
Definition at line 94 of file xml_parameter_writer.h.
The documentation for this class was generated from the following file: