Public Member Functions | Private Member Functions | Private Attributes

dealii::ParameterGui::XMLParameterWriter Class Reference

List of all members.

Public Member Functions

 XMLParameterWriter (QTreeWidget *tree_widget)
bool write_xml_file (QIODevice *device)

Private Member Functions

void write_item (QTreeWidgetItem *item)
QString mangle (const QString &s)

Private Attributes

QXmlStreamWriter xml
QTreeWidget * tree_widget

Detailed Description

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 38 of file xml_parameter_writer.h.


Constructor & Destructor Documentation

dealii::ParameterGui::XMLParameterWriter::XMLParameterWriter ( QTreeWidget *  tree_widget)

Constructor. Parameter values from tree_widget will be written.


Member Function Documentation

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.


Member Data Documentation

An QXmlStreamWriter object which implements the functionalities we need for writing parameters to XML files.

Definition at line 83 of file xml_parameter_writer.h.

A pointer to the QTreeWidget structure which stores the parameters.

Definition at line 88 of file xml_parameter_writer.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Mon May 21 2012 12:06:34 by doxygen 1.7.3