• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

parley

VocabularyModel Class Reference

#include <vocabularymodel.h>

Inheritance diagram for VocabularyModel:

Inheritance graph
[legend]

List of all members.


Detailed Description

Author:
Frederik Gladhorn <frederik.gladhorn@kdemail.net>

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

enum VocabularyModel::entryColumns

Enumerator:
Translation 
Pronunciation 
WordType 
Synonym 
Antonym 
Example 
Comment 
Paraphrase 
EntryColumnsMAX 

Definition at line 33 of file vocabularymodel.h.

enum VocabularyModel::roles

Enumerator:
TranslationRole 
EntryRole 
LocaleRole 

Definition at line 48 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]

Returns the name of the entryColumns column.

Definition at line 308 of file vocabularymodel.cpp.

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

Todo:
more tooltips?

Definition at line 125 of file vocabularymodel.cpp.

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]

Parameters:
lessonContainer 

Definition at line 88 of file vocabularymodel.cpp.

void VocabularyModel::setWordType ( KEduVocWordType *  wordTypeContainer  )  [slot]

Parameters:
wordTypeContainer 

Definition at line 98 of file vocabularymodel.cpp.

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:
  • vocabularymodel.h
  • vocabularymodel.cpp

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal