parley
#include <vocabularymodel.h>
Public Types | |
enum | entryColumns { Translation = 0, Pronunciation, WordType, Synonym, Antonym, Example, Comment, Paraphrase, EntryColumnsMAX } |
enum | roles { TranslationRole = Qt::UserRole, EntryRole, LocaleRole } |
Public Slots | |
void | automaticTranslation (bool enabled) |
KEduVocLesson * | lesson () |
void | setDocument (KEduVocDocument *doc) |
void | setLesson (KEduVocLesson *lessonContainer) |
void | showContainer (KEduVocContainer *container) |
void | showEntriesOfSubcontainers (bool show) |
Public Member Functions | |
VocabularyModel (QObject *parent=0) | |
~VocabularyModel () | |
QModelIndex | appendEntry (KEduVocExpression *expression=0) |
int | columnCount (const QModelIndex &) const |
QVariant | data (const QModelIndex &, int) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
QMimeData * | mimeData (const QModelIndexList &indexes) const |
QStringList | mimeTypes () const |
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
void | resetLanguages () |
int | rowCount (const QModelIndex &) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role) |
Static Public Member Functions | |
static QString | columnTitle (KEduVocDocument *document, int translation, int column) |
static int | columnType (int column) |
static int | translation (int column) |
Detailed Description
Definition at line 30 of file vocabularymodel.h.
Member Enumeration Documentation
Enumerator | |
---|---|
Translation | |
Pronunciation | |
WordType | |
Synonym | |
Antonym | |
Example | |
Comment | |
Paraphrase | |
EntryColumnsMAX |
Definition at line 34 of file vocabularymodel.h.
Enumerator | |
---|---|
TranslationRole | |
EntryRole | |
LocaleRole |
Definition at line 49 of file vocabularymodel.h.
Constructor & Destructor Documentation
VocabularyModel::VocabularyModel | ( | QObject * | parent = 0 | ) |
Definition at line 35 of file vocabularymodel.cpp.
VocabularyModel::~VocabularyModel | ( | ) |
Definition at line 45 of file vocabularymodel.cpp.
Member Function Documentation
QModelIndex VocabularyModel::appendEntry | ( | KEduVocExpression * | expression = 0 | ) |
Definition at line 323 of file vocabularymodel.cpp.
|
slot |
Set automatic translation to enabled/disabled.
- Parameters
-
enabled
Definition at line 406 of file vocabularymodel.cpp.
int VocabularyModel::columnCount | ( | const QModelIndex & | ) | const |
Definition at line 109 of file vocabularymodel.cpp.
|
static |
Returns the name of the entryColumns column.
Definition at line 286 of file vocabularymodel.cpp.
|
static |
Returns the type of the column specified.
Translation types are multiples of EntryColumnsMAX
Definition at line 318 of file vocabularymodel.cpp.
QVariant VocabularyModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
- Todo:
- more tooltips?
Definition at line 117 of file vocabularymodel.cpp.
Qt::ItemFlags VocabularyModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 248 of file vocabularymodel.cpp.
QVariant VocabularyModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role = Qt::DisplayRole |
||
) | const |
Definition at line 267 of file vocabularymodel.cpp.
|
slot |
Definition at line 91 of file vocabularymodel.cpp.
QMimeData * VocabularyModel::mimeData | ( | const QModelIndexList & | indexes | ) | const |
Definition at line 369 of file vocabularymodel.cpp.
QStringList VocabularyModel::mimeTypes | ( | ) | const |
Definition at line 364 of file vocabularymodel.cpp.
bool VocabularyModel::removeRows | ( | int | row, |
int | count, | ||
const QModelIndex & | parent = QModelIndex() |
||
) |
Definition at line 346 of file vocabularymodel.cpp.
void VocabularyModel::resetLanguages | ( | ) |
Definition at line 400 of file vocabularymodel.cpp.
int VocabularyModel::rowCount | ( | const QModelIndex & | index | ) | const |
Definition at line 96 of file vocabularymodel.cpp.
bool VocabularyModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role | ||
) |
Definition at line 212 of file vocabularymodel.cpp.
|
slot |
Definition at line 49 of file vocabularymodel.cpp.
|
slot |
- Parameters
-
lessonContainer
Definition at line 86 of file vocabularymodel.cpp.
|
slot |
Whatever the contents, the model will now display it.
- Parameters
-
container
Definition at line 67 of file vocabularymodel.cpp.
|
slot |
Show the entries of child lessons in selected lessons.
- Parameters
-
show
Definition at line 389 of file vocabularymodel.cpp.
|
static |
Returns which translation this column matches.
It starts from 0 and increases every EntryColumnMax columns
Definition at line 313 of file vocabularymodel.cpp.
The documentation for this class was generated from the following files:
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.