QtLingo 1
QtLingo is an Application to make Qt Computer Translations easier
MyTranlatorParser.h
Go to the documentation of this file.
1#ifndef MYTRANLATORPARSER_H
2#define MYTRANLATORPARSER_H
3
4#include <QObject>
5#include <QFile>
6#include <QFileInfo>
7
8#include <QtDebug>
9#include <QRegularExpression>
10#include <QTextStream>
11
12//model
14// Local
15#include "MyLanguageModel.h"
16
20class MyTranlatorParser : public QObject
21{
22 Q_OBJECT
23 public:
24 explicit MyTranlatorParser(MyLanguageModel *thisLanguageModel = nullptr, QObject *parent = nullptr);
25 //
26 base_node::base_node_ptr parse_ts_file(const QString &inputFile);
27 bool parse_txt_file(const QString &inputFile, visitors::map_QStringQString &strings);
28 void toTXT(const QString &inputFile, const QString &outputDir, bool with_unfinished, bool with_vanished, bool unfinished_only);
29 void toTS(const QString &inputDir, const QString &outputFile, const QString &langid);
30 // Is Debug Message
31 void setDebugMessage(bool thisState);
33 void setMessage(const QString &thisMessage);
34
35 private:
36 MyLanguageModel *myLanguageModel;
37 bool isDebugMessage = true;
38
39};
40#endif // MYTRANLATORPARSER_H
41
Abstact Model used for ComboBox. /class MyLanguageModel.
Tranlator Parser.
void toTS(const QString &inputDir, const QString &outputFile, const QString &langid)
toTS
void setDebugMessage(bool thisState)
set Debug Message
bool getDebugMessage()
get Debug Message
MyTranlatorParser(MyLanguageModel *thisLanguageModel=nullptr, QObject *parent=nullptr)
Translation Files Constructor. MyTranslationFiles.
bool parse_txt_file(const QString &inputFile, visitors::map_QStringQString &strings)
parse_txt_file
void setMessage(const QString &thisMessage)
set Message
base_node::base_node_ptr parse_ts_file(const QString &inputFile)
parse_ts_file
void toTXT(const QString &inputFile, const QString &outputDir, bool with_unfinished, bool with_vanished, bool unfinished_only)
toTXT
std::map< QString, QString > map_QStringQString
Definition: ts_model.h:54
std::shared_ptr< base_node > base_node_ptr
Definition: ts_model.h:116