parley
#include <lessonmodel.h>

Public Types | |
enum | SplitLessonOrder { Sorted, Random } |
Public Member Functions | |
LessonModel (QObject *parent=0) | |
virtual QVariant | data (const QModelIndex &index, int role) const |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
void | splitLesson (const QModelIndex &containerIndex, int entriesPerLesson, SplitLessonOrder order) |
![]() | |
ContainerModel (KEduVocContainer::EnumContainerType type, QObject *parent=0) | |
QModelIndex | appendContainer (const QModelIndex &parent, const QString &containerName=QString()) |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
void | deleteContainer (const QModelIndex &containerIndex) |
virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
virtual QStringList | mimeTypes () const |
virtual Qt::DropActions | supportedDropActions () const |
![]() | |
BasicContainerModel (KEduVocContainer::EnumContainerType type, QObject *parent=0) | |
KEduVocContainer::EnumContainerType | containerType () |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
QModelIndex | index (KEduVocContainer *container) const |
virtual QModelIndex | parent (const QModelIndex &index) const |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Protected Member Functions | |
KEduVocContainer * | rootContainer () const |
Additional Inherited Members | |
![]() | |
void | setDocument (KEduVocDocument *doc) |
![]() | |
void | documentModified () |
![]() | |
KEduVocDocument * | m_doc |
KEduVocContainer::EnumContainerType | m_type |
Detailed Description
Model for the tree of lessons.
Definition at line 25 of file lessonmodel.h.
Member Enumeration Documentation
When splitting a lesson into smaller ones - how to sort the entries into lessons.
Enumerator | |
---|---|
Sorted |
The order of the entries in the document. |
Random |
Randomized. |
Definition at line 31 of file lessonmodel.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 30 of file lessonmodel.cpp.
Member Function Documentation
|
virtual |
Reimplemented from Editor::ContainerModel.
Definition at line 55 of file lessonmodel.cpp.
|
virtual |
Reimplemented from Editor::ContainerModel.
Definition at line 43 of file lessonmodel.cpp.
|
protectedvirtual |
Implements Editor::BasicContainerModel.
Definition at line 35 of file lessonmodel.cpp.
|
virtual |
Change the name or checkbox of a lesson.
- Parameters
-
index which lesson value new name role
- Returns
- bool
true
it worked
Reimplemented from Editor::ContainerModel.
Definition at line 73 of file lessonmodel.cpp.
void LessonModel::splitLesson | ( | const QModelIndex & | containerIndex, |
int | entriesPerLesson, | ||
SplitLessonOrder | order | ||
) |
Divide a lesson into smaller ones.
Tip: If you create a lesson that is >= the original one and use random order, you get your lesson reshuffled. Maybe that is sometimes useful. For now the lessons are appended at the end.
- Parameters
-
lessonIndex lesson to split entriesPerLesson number of entries in each new lesson order one of SplitLessonOrder
Definition at line 83 of file lessonmodel.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.