parley
#include <translator.h>
Public Member Functions | |
| Translator () | |
| Translator (QObject *parent) | |
| ~Translator () | |
| void | addTranslation (QString word, QString fromLanguage, QString toLanguage, QString translation) |
| QSet< QString > * | getTranslation (QString word, QString fromLanguage, QString toLanguage) |
Detailed Description
Keeps the translated words.
Definition at line 74 of file translator.h.
Constructor & Destructor Documentation
| Translator::Translator | ( | ) |
Definition at line 20 of file translator.cpp.
| Translator::Translator | ( | QObject * | parent | ) |
Definition at line 24 of file translator.cpp.
| Translator::~Translator | ( | ) |
Definition at line 29 of file translator.cpp.
Member Function Documentation
| void Translator::addTranslation | ( | QString | word, |
| QString | fromLanguage, | ||
| QString | toLanguage, | ||
| QString | translation | ||
| ) |
Stores the translation of word from language fromLanguage, to language toLanguage.
- Parameters
-
word word that was translated fromLanguage language of wordtoLanguage language of translationtranslation translation of word
Definition at line 33 of file translator.cpp.
| QSet< QString > * Translator::getTranslation | ( | QString | word, |
| QString | fromLanguage, | ||
| QString | toLanguage | ||
| ) |
Returns a QStringList with all the translations of word from fromLanguage to toLanguage.
This function will call the translateWord function of the translation scripts if this word wasn't translated before.
- Parameters
-
word fromLanguage toLanguage
- Returns
- QStringList with the translations (or an empty QStringList if no translations found)
Definition at line 45 of file translator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference