OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
xml_parameter_writer.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 // $Id: xml_parameter_writer.h 2226 2014-04-04 21:21:00Z secanell $
3 //
4 // Copyright (C) 2010 - 2013 by Martin Steigemann and Wolfgang Bangerth
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 
18 #ifndef XMLPARAMETERWRITER_H
19 #define XMLPARAMETERWRITER_H
20 
21 #include <QXmlStreamWriter>
22 #include <QTreeWidget>
23 #include <QTreeWidgetItem>
24 
25 
26 namespace dealii
27 {
31  namespace ParameterGui
32  {
45  {
46  public:
51  XMLParameterWriter (QTreeWidget *tree_widget);
58  bool write_xml_file (QIODevice *device);
59 
60  private:
76  void write_item (QTreeWidgetItem *item);
83  QString mangle (const QString &s);
89  QXmlStreamWriter xml;
94  QTreeWidget * tree_widget;
95  };
96  }
98 }
99 
100 
101 #endif
void write_item(QTreeWidgetItem *item)
This function writes a given item of tree_widget to a file in XML format.
XMLParameterWriter(QTreeWidget *tree_widget)
Constructor.
QXmlStreamWriter xml
An QXmlStreamWriter object which implements the functionalities we need for writing parameters to XML...
Definition: xml_parameter_writer.h:89
The XMLParameterWriter class provides an interface to write parameters stored in a QTreeWidget to a f...
Definition: xml_parameter_writer.h:44
QString mangle(const QString &s)
Reimplemented from the ParameterHandler class.
bool write_xml_file(QIODevice *device)
This function writes the parameter values stored in tree_widget to device in XML format.
QTreeWidget * tree_widget
A pointer to the QTreeWidget structure which stores the parameters.
Definition: xml_parameter_writer.h:94