parley
vocabularymodel.cpp
Go to the documentation of this file.
129 return QVariant(m_container->entry(index.row(), m_recursive)->translation(translationId)->text());
131 return QVariant(m_container->entry(index.row(), m_recursive)->translation(translationId)->pronunciation());
135 return QVariant(m_container->entry(index.row(), m_recursive)->translation(translationId)->wordType()->name());
140 foreach(KEduVocTranslation * synonym, m_container->entry(index.row(), m_recursive)->translation(translationId)->synonyms()) {
147 foreach(KEduVocTranslation * antonym, m_container->entry(index.row(), m_recursive)->translation(translationId)->antonyms()) {
153 QString example = m_container->entry(index.row(), m_recursive)->translation(translationId)->example();
154 /*QString word = m_container->entry(index.row(), m_recursive)->translation(translationId)->text();
166 return QVariant(m_container->entry(index.row(), m_recursive)->translation(translationId)->comment());
168 return QVariant(m_container->entry(index.row(), m_recursive)->translation(translationId)->paraphrase());
184 return QVariant(m_container->entry(index.row(), m_recursive)->translation(translationId)->soundUrl());
186 return QVariant(m_container->entry(index.row(), m_recursive)->translation(translationId)->imageUrl());
219 m_container->entry(index.row(), m_recursive)->translation(translationId)->setText(value.toString());
222 m_container->entry(index.row(), m_recursive)->translation(translationId)->setPronunciation(value.toString());
227 m_container->entry(index.row(), m_recursive)->translation(translationId)->setExample(value.toString());
230 m_container->entry(index.row(), m_recursive)->translation(translationId)->setComment(value.toString());
233 m_container->entry(index.row(), m_recursive)->translation(translationId)->setParaphrase(value.toString());
253 return QAbstractItemModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;
323 KMessageBox::information(0, i18n("Please use Edit -> Languages to set up your document."), i18n("No Languages Defined"));
328 KMessageBox::information(0, i18n("Select a unit before adding vocabulary."), i18n("No Unit Selected"));
378 translations.append(m_container->entry(index.row(), m_recursive)->translation(translation(index.column())));
void setLesson(KEduVocLesson *lessonContainer)
Definition: vocabularymodel.cpp:85
Definition: vocabularymodel.h:38
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: vocabularymodel.cpp:245
int columnCount(const QModelIndex &) const
Definition: vocabularymodel.cpp:108
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
Definition: vocabularymodel.h:36
Definition: vocabularymodel.h:34
static void setAutomaticTranslation(bool v)
Set Enable automatic translation of the unit entries.
Definition: prefs.h:231
QString join(const QString &separator) const
QMimeData * mimeData(const QModelIndexList &indexes) const
Definition: vocabularymodel.cpp:366
bool setData(const QModelIndex &index, const QVariant &value, int role)
Definition: vocabularymodel.cpp:208
void showEntriesOfSubcontainers(bool show)
Show the entries of child lessons in selected lessons.
Definition: vocabularymodel.cpp:386
VocabularyModel(QObject *parent=0)
Definition: vocabularymodel.cpp:34
void reset()
Definition: vocabularymodel.h:40
bool isValid() const
void append(const T &value)
QVariant data(const QModelIndex &, int) const
Definition: vocabularymodel.cpp:116
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
Definition: vocabularymodel.cpp:343
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
void endInsertRows()
static int columnType(int column)
Returns the type of the column specified.
Definition: vocabularymodel.cpp:315
void beginRemoveRows(const QModelIndex &parent, int first, int last)
int row() const
Definition: vocabularymodel.h:37
Definition: vocabularymodel.h:50
Definition: vocabularymodel.h:51
Definition: vocabularymodel.h:39
Definition: languagesettings.h:10
Definition: vocabularymodel.h:41
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: vocabularymodel.cpp:264
void setValue(const T &value)
void beginInsertRows(const QModelIndex &parent, int first, int last)
static bool showSublessonentries()
Get When enabled a unit also shows entries from its subunits.
Definition: prefs.h:849
void showContainer(KEduVocContainer *container)
Whatever the contents, the model will now display it.
Definition: vocabularymodel.cpp:66
void automaticTranslation(bool enabled)
Set automatic translation to enabled/disabled.
Definition: vocabularymodel.cpp:403
static int translation(int column)
Returns which translation this column matches.
Definition: vocabularymodel.cpp:310
static QString columnTitle(KEduVocDocument *document, int translation, int column)
Returns the name of the entryColumns column.
Definition: vocabularymodel.cpp:283
int column() const
Definition: vocabularymodel.h:53
Definition: vocabularymodel.h:52
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Definition: vocabularymimedata.h:26
QModelIndex appendEntry(KEduVocExpression *expression=0)
Definition: vocabularymodel.cpp:320
void endRemoveRows()
void setTranslations(QList< KEduVocTranslation * > translation)
Definition: vocabularymimedata.cpp:23
QString toString() const
void setDocument(KEduVocDocument *doc)
Definition: vocabularymodel.cpp:48
static void setShowSublessonentries(bool v)
Set When enabled a unit also shows entries from its subunits.
Definition: prefs.h:839
typedef ItemFlags
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.