parley
parley.cpp
Go to the documentation of this file.
44 m_translator = new Translator(this); //parameter has to be <this> cause it's used by Translator to access callTranslateWord
54 void Parley::callTranslateWord(const QString & word, const QString& fromLanguage, const QString& toLanguage)
61 void Parley::addTranslation(QString word, QString fromLanguage, QString toLanguage, QString translation)
101 KEduVocExpression * expr = qvariant_cast<KEduVocExpression*> (index.data(VocabularyModel::EntryRole));
128 KEduVocExpression * expr = qvariant_cast<KEduVocExpression*> (index.data(VocabularyModel::EntryRole));
QObject * newAction(const QString &name, const QString &text=QString())
Creates and adds to the Scripts menu a new KAction (see KAction documentation)
Definition: parley.cpp:145
void addTranslation(QString word, QString fromLanguage, QString toLanguage, QString translation)
Adds the found translation of the word from language fromLanguage to language toLanguage to Parley tr...
Definition: parley.cpp:61
QVariantList selectedEntries()
Returns a list of Expression objects (the selected entries of the active lesson)
Definition: parley.cpp:90
QModelIndexList getSelectedIndexes() const
Definition: vocabularyview.cpp:446
void callTranslateWord(const QString &word, const QString &fromLanguage, const QString &toLanguage)
Definition: parley.cpp:54
Definition: vocabularymodel.h:34
void translationStarted(const QString &word, const QString &fromLanguage, const QString &toLanguage)
void translateWord(const QString &word, const QString &fromLanguage, const QString &toLanguage)
Slots (script functions) connected to this signal are called when a translation of word is requested...
KEduVocTranslation wrapper class for scripting with Kross.
Definition: translation.h:36
QString tr(const char *sourceText, const char *disambiguation, int n)
void addTranslation(QString word, QString fromLanguage, QString toLanguage, QString translation)
Stores the translation of word from language fromLanguage, to language toLanguage.
Definition: translator.cpp:33
static int columnType(int column)
Returns the type of the column specified.
Definition: vocabularymodel.cpp:315
Definition: vocabularymodel.h:50
QStringList locales()
Returns a list of all available locales (to be used by the scripts)
Definition: parley.cpp:67
QObject * activeLesson()
QVariantList selectedTranslations()
Returns a list of Translation objects (the selected translations of the active lesson) ...
Definition: parley.cpp:116
void translationFinished(const QString &word, const QString &fromLanguage, const QString &toLanguage)
QVariant data(int role) const
static int translation(int column)
Returns which translation this column matches.
Definition: vocabularymodel.cpp:310
Definition: editor.h:50
int column() const
QString localeName(QString locale)
Gives the language name of the given locale.
Definition: parley.cpp:73
bool open(const KUrl &)
Opens the given url, displays an error message and returns false on failure.
Definition: parleydocument.cpp:191
ParleyDocument * parleyDocument()
Return the ParleyDocument member object.
Definition: parleymainwindow.cpp:413
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.