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

parley

  • Editor
  • LessonModel
Public Types | Public Member Functions | Protected Member Functions | List of all members
Editor::LessonModel Class Reference

#include <lessonmodel.h>

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

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)
 
- Public Member Functions inherited from Editor::ContainerModel
 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
 
- Public Member Functions inherited from Editor::BasicContainerModel
 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

- Public Slots inherited from Editor::BasicContainerModel
void setDocument (KEduVocDocument *doc)
 
- Signals inherited from Editor::ContainerModel
void documentModified ()
 
- Protected Attributes inherited from Editor::BasicContainerModel
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

enum Editor::LessonModel::SplitLessonOrder

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

LessonModel::LessonModel ( QObject *  parent = 0)
explicit

Definition at line 30 of file lessonmodel.cpp.

Member Function Documentation

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

Reimplemented from Editor::ContainerModel.

Definition at line 55 of file lessonmodel.cpp.

Qt::ItemFlags LessonModel::flags ( const QModelIndex &  index) const
virtual

Reimplemented from Editor::ContainerModel.

Definition at line 43 of file lessonmodel.cpp.

KEduVocContainer * LessonModel::rootContainer ( ) const
protectedvirtual

Implements Editor::BasicContainerModel.

Definition at line 35 of file lessonmodel.cpp.

bool LessonModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
virtual

Change the name or checkbox of a lesson.

Parameters
indexwhich lesson
valuenew 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
lessonIndexlesson to split
entriesPerLessonnumber of entries in each new lesson
orderone of SplitLessonOrder

Definition at line 83 of file lessonmodel.cpp.


The documentation for this class was generated from the following files:
  • lessonmodel.h
  • lessonmodel.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