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

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
  • collection
lessonmodel.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  Copyright 2008-2009 Frederik Gladhorn <gladhorn@kde.org>
4 
5  ***************************************************************************/
6 
7 /***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef LESSONMODEL_H
17 #define LESSONMODEL_H
18 
19 #include "containermodel.h"
20 
24 class LessonModel : public ContainerModel
25 {
26  Q_OBJECT
27 
28 public:
30  enum SplitLessonOrder {
31  Sorted,
32  Random
33  };
34 
35  explicit LessonModel(QObject *parent = 0);
36 
37  virtual Qt::ItemFlags flags(const QModelIndex &index) const;
38  virtual QVariant data(const QModelIndex &index, int role) const;
39  virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
40 
48  void splitLesson(const QModelIndex& containerIndex, int entriesPerLesson, SplitLessonOrder order);
49 
50 protected:
51  KEduVocContainer * rootContainer() const;
52 };
53 
54 
55 #endif
LessonModel::setData
virtual bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Change the name or checkbox of a lesson.
Definition: lessonmodel.cpp:72
QModelIndex
ReadonlyContainerModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: readonlycontainermodel.cpp:49
LessonModel::SplitLessonOrder
SplitLessonOrder
When splitting a lesson into smaller ones - how to sort the entries into lessons. ...
Definition: lessonmodel.h:30
LessonModel::rootContainer
KEduVocContainer * rootContainer() const
Definition: lessonmodel.cpp:34
LessonModel
Model for the tree of lessons.
Definition: lessonmodel.h:24
containermodel.h
ContainerModel
Model for the tree of containers (lessons, word types).
Definition: containermodel.h:33
QObject
LessonModel::flags
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Definition: lessonmodel.cpp:42
LessonModel::splitLesson
void splitLesson(const QModelIndex &containerIndex, int entriesPerLesson, SplitLessonOrder order)
Divide a lesson into smaller ones.
Definition: lessonmodel.cpp:83
LessonModel::Random
Randomized.
Definition: lessonmodel.h:32
LessonModel::Sorted
The order of the entries in the document.
Definition: lessonmodel.h:31
LessonModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: lessonmodel.cpp:54
QObject::parent
QObject * parent() const
LessonModel::LessonModel
LessonModel(QObject *parent=0)
Definition: lessonmodel.cpp:29
QVariant
Qt::ItemFlags
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 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
  • 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