parley
VocabularyModel Class Reference
#include <vocabularymodel.h>

Detailed Description
Definition at line 29 of file vocabularymodel.h.
Public Types | |
| enum | entryColumns { Translation, 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 | setWordType (KEduVocWordType *wordTypeContainer) |
| void | showContainer (KEduVocContainer *container) |
| void | showEntriesOfSubcontainers (bool show) |
Signals | |
| void | documentChanged (KEduVocDocument *doc) |
Public Member Functions | |
| 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) |
| VocabularyModel (QObject *parent=0) | |
| ~VocabularyModel () | |
Static Public Member Functions | |
| static QString | columnTitle (KEduVocDocument *document, int translation, int column) |
| static int | columnType (int column) |
| static int | translation (int column) |
Member Enumeration Documentation
- Enumerator:
-
Translation Pronunciation WordType Synonym Antonym Example Comment Paraphrase EntryColumnsMAX
Definition at line 33 of file vocabularymodel.h.
Constructor & Destructor Documentation
| VocabularyModel::VocabularyModel | ( | QObject * | parent = 0 |
) |
Definition at line 32 of file vocabularymodel.cpp.
| VocabularyModel::~VocabularyModel | ( | ) |
Definition at line 43 of file vocabularymodel.cpp.
Member Function Documentation
| QModelIndex VocabularyModel::appendEntry | ( | KEduVocExpression * | expression = 0 |
) |
FIXME: not correct - the last row of the old lesson:
Definition at line 345 of file vocabularymodel.cpp.
| void VocabularyModel::automaticTranslation | ( | bool | enabled | ) | [slot] |
Set automatic translation to enabled/disabled.
- Parameters:
-
enabled
Definition at line 439 of file vocabularymodel.cpp.
| int VocabularyModel::columnCount | ( | const QModelIndex & | ) | const |
Definition at line 117 of file vocabularymodel.cpp.
| QString VocabularyModel::columnTitle | ( | KEduVocDocument * | document, | |
| int | translation, | |||
| int | column | |||
| ) | [static] |
| int VocabularyModel::columnType | ( | int | column | ) | [static] |
Returns the type of the column specified.
Translation types are multiples of EntryColumnsMAX
Definition at line 340 of file vocabularymodel.cpp.
| QVariant VocabularyModel::data | ( | const QModelIndex & | index, | |
| int | role | |||
| ) | const |
| void VocabularyModel::documentChanged | ( | KEduVocDocument * | doc | ) | [signal] |
| Qt::ItemFlags VocabularyModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 259 of file vocabularymodel.cpp.
| QVariant VocabularyModel::headerData | ( | int | section, | |
| Qt::Orientation | orientation, | |||
| int | role = Qt::DisplayRole | |||
| ) | const |
Definition at line 275 of file vocabularymodel.cpp.
| KEduVocLesson * VocabularyModel::lesson | ( | ) | [slot] |
Definition at line 93 of file vocabularymodel.cpp.
| QMimeData * VocabularyModel::mimeData | ( | const QModelIndexList & | indexes | ) | const |
Definition at line 401 of file vocabularymodel.cpp.
| QStringList VocabularyModel::mimeTypes | ( | ) | const |
Definition at line 396 of file vocabularymodel.cpp.
| bool VocabularyModel::removeRows | ( | int | row, | |
| int | count, | |||
| const QModelIndex & | parent = QModelIndex() | |||
| ) |
Definition at line 378 of file vocabularymodel.cpp.
| void VocabularyModel::resetLanguages | ( | ) |
Definition at line 433 of file vocabularymodel.cpp.
| int VocabularyModel::rowCount | ( | const QModelIndex & | index | ) | const |
Definition at line 104 of file vocabularymodel.cpp.
| bool VocabularyModel::setData | ( | const QModelIndex & | index, | |
| const QVariant & | value, | |||
| int | role | |||
| ) |
Definition at line 221 of file vocabularymodel.cpp.
| void VocabularyModel::setDocument | ( | KEduVocDocument * | doc | ) | [slot] |
Definition at line 48 of file vocabularymodel.cpp.
| void VocabularyModel::setLesson | ( | KEduVocLesson * | lessonContainer | ) | [slot] |
| void VocabularyModel::setWordType | ( | KEduVocWordType * | wordTypeContainer | ) | [slot] |
| void VocabularyModel::showContainer | ( | KEduVocContainer * | container | ) | [slot] |
Whatever the contents, the model will now display it.
- Parameters:
-
container
Definition at line 69 of file vocabularymodel.cpp.
| void VocabularyModel::showEntriesOfSubcontainers | ( | bool | show | ) | [slot] |
Show the entries of child lessons in selected lessons.
- Parameters:
-
show
Definition at line 422 of file vocabularymodel.cpp.
| int VocabularyModel::translation | ( | int | column | ) | [static] |
Returns which translation this column matches.
It starts from 0 and increases every EntryColumnMax columns
Definition at line 335 of file vocabularymodel.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference