File indexing completed on 2024-04-28 07:54:21

0001 /***************************************************************************
0002                           nationality.cpp  -  description
0003                              -------------------
0004     begin                : sam ao 31 2002
0005     copyright            : (C) 2002 by Gael de Chalendar
0006     email                : Gael.de.Chalendar@free.fr
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *                                                                         *
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either either version 2
0014    of the License, or (at your option) any later version.of the License, or     *
0015  *   (at your option) any later version.                                   *
0016  *                                                                         *
0017  *   You should have received a copy of the GNU General Public License
0018  *   along with this program; if not, write to the Free Software
0019  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0020  *   02110-1301, USA
0021  ***************************************************************************/
0022 
0023 #include "nationality.h"
0024 
0025 namespace KsirkSkinEditor
0026 {
0027 
0028 Nationality::Nationality(const QString &myName, const QString &myFlag,
0029     const QString& leaderName) :
0030   m_name(myName), m_leaderName(leaderName), m_flagFileName(myFlag)
0031 {
0032 }
0033 
0034 void Nationality::saveXml(QTextStream& xmlStream)
0035 {
0036   QString name = m_name;
0037   name = name.replace(QLatin1String("&"),QLatin1String("&"));
0038   name = name.replace(QLatin1String("<"),QLatin1String("&lt;"));
0039   name = name.replace(QLatin1String(">"),QLatin1String("&gt;"));
0040   xmlStream << "<nationality name=\"" << name << "\" flag=\"" << m_flagFileName << "\" />";
0041 }
0042 
0043 }