Code_TYMPAN  4.4.0
Industrial site acoustic simulation
OLocalizator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14  */
15 
16 /*
17  *
18  *
19  *
20  *
21  */
22 
23 #ifndef __O_LOCALIZATOR__
24 #define __O_LOCALIZATOR__
25 
26 #include <QtXml/qdom.h>
27 #include <qmap.h>
28 #include <qstring.h>
29 
30 #include "OXMLTreeManager.h"
31 
39 {
40 public:
45  static bool setRessourceFile(const QString& filename);
50  static void setRessourcePath(const QString& path)
51  {
52  _ressourcePath = path;
53  }
57  static bool isRessourceFile()
58  {
59  return _isRessourceFile;
60  }
66  static QString getString(const QString& classname, const QString& stringId); // translate a string
72  static QString getPicture(const QString& classname, const QString& pictureId); // transtate a picture
73 
74 private:
75  static bool selectClassDirectory(const QString& classname);
76  static bool findIdAndSetValue(const QString& directory, const QString& stringId, QString& returnString);
77 
78 private:
79  static bool _isRessourceFile;
80 
81  typedef QMap<QString, QString> OptimMap;
83  static QString _ressourcePath;
85 };
86 
87 #endif // __O_LOCALIZATOR__
static OptimMap _stringMap
Definition: OLocalizator.h:82
static void setRessourcePath(const QString &path)
Definition: OLocalizator.h:50
QMap< QString, QString > OptimMap
Definition: OLocalizator.h:81
static bool isRessourceFile()
Definition: OLocalizator.h:57
static bool _isRessourceFile
Definition: OLocalizator.h:79
static bool setRessourceFile(const QString &filename)
static bool findIdAndSetValue(const QString &directory, const QString &stringId, QString &returnString)
static bool selectClassDirectory(const QString &classname)
static QString _ressourcePath
Definition: OLocalizator.h:83
static QString getPicture(const QString &classname, const QString &pictureId)
static QString getString(const QString &classname, const QString &stringId)
static OXMLTreeManager _treeManager
Definition: OLocalizator.h:84