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

parley

  • Editor
  • VocabularyModel
Public Types | Public Slots | Public Member Functions | Static Public Member Functions | List of all members
Editor::VocabularyModel Class Reference

#include <vocabularymodel.h>

Inheritance diagram for Editor::VocabularyModel:
Inheritance graph
[legend]

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

Author
Frederik Gladhorn frede.nosp@m.rik..nosp@m.gladh.nosp@m.orn@.nosp@m.kdema.nosp@m.il.n.nosp@m.et

Definition at line 30 of file vocabularymodel.h.

Member Enumeration Documentation

enum Editor::VocabularyModel::entryColumns
Enumerator
Translation 
Pronunciation 
WordType 
Synonym 
Antonym 
Example 
Comment 
Paraphrase 
EntryColumnsMAX 

Definition at line 34 of file vocabularymodel.h.

enum Editor::VocabularyModel::roles
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.

void VocabularyModel::automaticTranslation ( bool  enabled)
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.

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

Returns the name of the entryColumns column.

Definition at line 286 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 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.

KEduVocLesson * VocabularyModel::lesson ( )
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.

void VocabularyModel::setDocument ( KEduVocDocument *  doc)
slot

Definition at line 49 of file vocabularymodel.cpp.

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

Definition at line 86 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 389 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 313 of file vocabularymodel.cpp.


The documentation for this class was generated from the following files:
  • vocabularymodel.h
  • vocabularymodel.cpp
This file is part of the KDE documentation.
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.

parley

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal