parley
Translator Class Reference
Keeps the translated words. More...
#include <translator.h>
Public Member Functions | |
| Translator (QObject *parent) | |
| Translator () | |
| ~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:
KDE 4.4 API Reference