• Skip to content
  • Skip to link menu
KDE 4.4 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.

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 setWordType (KEduVocWordType *wordTypeContainer)
void showContainer (KEduVocContainer *container)
void showEntriesOfSubcontainers (bool show)

Signals

void documentChanged (KEduVocDocument *doc)

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

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

Definition at line 29 of file vocabularymodel.h.


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 42 of file vocabularymodel.cpp.


Member Function Documentation

QModelIndex VocabularyModel::appendEntry ( KEduVocExpression *  expression = 0  ) 

Definition at line 320 of file vocabularymodel.cpp.

void VocabularyModel::automaticTranslation ( bool  enabled  )  [slot]

Set automatic translation to enabled/disabled.

Parameters:
enabled 

Definition at line 403 of file vocabularymodel.cpp.

int VocabularyModel::columnCount ( const QModelIndex &   )  const

Definition at line 114 of file vocabularymodel.cpp.

QString VocabularyModel::columnTitle ( KEduVocDocument *  document,
int  translation,
int  column 
) [static]

Returns the name of the entryColumns column.

Definition at line 283 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 315 of file vocabularymodel.cpp.

QVariant VocabularyModel::data ( const QModelIndex &  index,
int  role 
) const

Todo:
more tooltips?

Definition at line 122 of file vocabularymodel.cpp.

void VocabularyModel::documentChanged ( KEduVocDocument *  doc  )  [signal]
Qt::ItemFlags VocabularyModel::flags ( const QModelIndex &  index  )  const

Definition at line 245 of file vocabularymodel.cpp.

QVariant VocabularyModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

Definition at line 264 of file vocabularymodel.cpp.

KEduVocLesson * VocabularyModel::lesson (  )  [slot]

Definition at line 91 of file vocabularymodel.cpp.

QMimeData * VocabularyModel::mimeData ( const QModelIndexList &  indexes  )  const

Definition at line 366 of file vocabularymodel.cpp.

QStringList VocabularyModel::mimeTypes (  )  const

Definition at line 361 of file vocabularymodel.cpp.

bool VocabularyModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)

Definition at line 343 of file vocabularymodel.cpp.

void VocabularyModel::resetLanguages (  ) 

Definition at line 397 of file vocabularymodel.cpp.

int VocabularyModel::rowCount ( const QModelIndex &  index  )  const

Definition at line 101 of file vocabularymodel.cpp.

bool VocabularyModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)

Definition at line 209 of file vocabularymodel.cpp.

void VocabularyModel::setDocument ( KEduVocDocument *  doc  )  [slot]

Definition at line 46 of file vocabularymodel.cpp.

void VocabularyModel::setLesson ( KEduVocLesson *  lessonContainer  )  [slot]
Parameters:
lessonContainer 

Definition at line 86 of file vocabularymodel.cpp.

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

Definition at line 96 of file vocabularymodel.cpp.

void VocabularyModel::showContainer ( KEduVocContainer *  container  )  [slot]

Whatever the contents, the model will now display it.

Parameters:
container 

Definition at line 67 of file vocabularymodel.cpp.

void VocabularyModel::showEntriesOfSubcontainers ( bool  show  )  [slot]

Show the entries of child lessons in selected lessons.

Parameters:
show 

Definition at line 386 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 310 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"
  •     lib
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.9-20090814
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