Wespo  2.2
An unofficial tool to create a .po file for your wesnoth add-on
 All Classes Functions Variables
wespo.h
1 /*
2  * wesPO - Unofficial wesnoth tool to create a basic .po for your own addon
3  *
4  * Made by Nobun
5  * www.mugenation.com
6  *
7  * Written with: Gcc-c++ (g++) / QT4
8  *
9  *------
10  *
11  * Copyright (C) 2009 Nobun
12  *
13  * This program is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation, either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program (GPL.txt). If not, see <http://www.gnu.org/licenses/>.
25  *
26  ******************************************************/
27 
28 #ifndef WESPO_H
29 #define WESPO_H
30 
31 #include <QString>
32 #include <QStringList>
33 #include <QList>
34 // #include "wespoDatabase.h"
35 #include "wespoEntry.h"
36 
38 
46 class WesPo {
47  public:
49 
53  WesPo(bool fuzzyflag);
55  const QString mainDir();
57  const bool translate();
59 
65  void setCurrentDomain(QString &src);
67 
71  bool track_textdomain();
73 
78  void setDestFolder(QString & src);
80 
85  void setCfgFiles(QStringList &src);
87 
92  void setLuaFiles(QStringList &src);
93  public:
95  bool doWork();
97 
102  void collectEntries(QList <WespoEntry> &wpdata);
103 
104  private:
105  QStringList cfgfiles;
106  QStringList luafiles;
107  QString maindir;
108  QString textdomain;
109  //WespoDatabase data;
110  QList <WespoEntry> data1;
111  bool translate_ ;
112  bool isfuzzy;
113  QString destfile;
114 };
115 
116 #endif
117 
const bool translate()
returs true if we are in the right textdomain
Definition: wespo.cpp:61
bool doWork()
Make skele.po: the "main" function (invoked by frmMain)
Definition: wespo.cpp:187
WesPo class does the real work. It is where skele.po is created.
Definition: wespo.h:46
const QString mainDir()
return the complete path of the wesnoth add-on
Definition: wespo.cpp:67
void setCfgFiles(QStringList &src)
(WesPo init): register WML file list
Definition: wespo.cpp:83
WesPo(bool fuzzyflag)
Constructor.
Definition: wespo.cpp:46
void setDestFolder(QString &src)
(WesPo init): register add-on directory (dest directory for skele.po)
Definition: wespo.cpp:73
void setCurrentDomain(QString &src)
set a new textdomain scope when parsing a WML file
Definition: wespo.cpp:53
void collectEntries(QList< WespoEntry > &wpdata)
WesPo updates internal WespoEntry list with list obtained from WmlReader or LuaReader.
Definition: wespo.cpp:156
bool track_textdomain()
(WesPo init): scan _main.cfg and save add-on textdomain name
Definition: wespo.cpp:97
void setLuaFiles(QStringList &src)
(WesPo init): register Lua file list
Definition: wespo.cpp:90