parley
vocabularydelegate.cpp
Go to the documentation of this file.
76 QWidget * VocabularyDelegate::createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const
121 //if there is only one word and that is the suggestion word (in translations) then don't create the combobox
122 if ( !translations.isEmpty() && ! ( translations.size() == 1 && ( *translations.begin() ) == index.model()->data ( index, Qt::DisplayRole ).toString() ) )
197 void VocabularyDelegate::setModelData ( QWidget * editor, QAbstractItemModel * model, const QModelIndex & index ) const
260 QPair< QString, QString > VocabularyDelegate::guessWordType(const QString & entry, int language) const
266 if ( article == ->identifier(language).articles().article(KEduVocWordFlag::Singular| KEduVocWordFlag::Definite| KEduVocWordFlag::Masculine) ) {
268 return qMakePair(m_doc->wordTypes().specialTypeNoun(), m_doc->wordTypes().specialTypeNounMale());
void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: vocabularydelegate.cpp:163
Definition: vocabularymodel.h:30
void setDocument(KEduVocDocument *doc)
Definition: vocabularydelegate.cpp:254
KEduVocContainer * rootContainer() const
Definition: vocabularydelegate.cpp:282
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Definition: vocabularydelegate.cpp:197
Definition: vocabularyfilter.h:27
static int translation(int column)
Returns which translation this column matches.
Definition: vocabularymodel.cpp:313
WordTypeBasicModel(QObject *parent=0)
Definition: vocabularydelegate.cpp:277
static int columnType(int column)
Returns the type of the column specified.
Definition: vocabularymodel.cpp:318
Definition: languagesettings.h:10
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: vocabularydelegate.cpp:76
static bool automaticTranslation()
Get Enable automatic translation of the lesson entries.
Definition: prefs.h:236
void setTranslator(Translator *translator)
Sets the member variable m_translator to a Translator object.
Definition: vocabularydelegate.cpp:294
VocabularyDelegate(QObject *parent=0)
Definition: vocabularydelegate.cpp:40
void setDocument(KEduVocDocument *doc)
Set the new source kvtml file.
Definition: basiccontainermodel.cpp:44
QSet< QString > * getTranslation(QString word, QString fromLanguage, QString toLanguage)
Returns a QStringList with all the translations of word from fromLanguage to toLanguage.
Definition: translator.cpp:45
QString keyboardLayout() const
Get Keyboard layout for this locale.
Definition: languagesettings.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.