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

parley

  • sources
  • kde-4.12
  • kdeedu
  • parley
  • src
  • vocabulary
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 
21 namespace Editor {
25 class LessonModel : public ContainerModel
26 {
27  Q_OBJECT
28 
29 public:
31  enum SplitLessonOrder {
32  Sorted,
33  Random
34  };
35 
36  explicit LessonModel(QObject *parent = 0);
37 
38  virtual Qt::ItemFlags flags(const QModelIndex &index) const;
39  virtual QVariant data(const QModelIndex &index, int role) const;
40  virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
41 
49  void splitLesson(const QModelIndex& containerIndex, int entriesPerLesson, SplitLessonOrder order);
50 
51 protected:
52  KEduVocContainer * rootContainer() const;
53 };
54 }
55 
56 #endif
QObject
Editor::LessonModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: lessonmodel.cpp:55
Editor::BasicContainerModel::parent
virtual QModelIndex parent(const QModelIndex &index) const
Definition: basiccontainermodel.cpp:93
containermodel.h
Editor::LessonModel::rootContainer
KEduVocContainer * rootContainer() const
Definition: lessonmodel.cpp:35
Editor::ContainerModel
Model for the tree of containers (lessons, word types).
Definition: containermodel.h:33
Editor::LessonModel::flags
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Definition: lessonmodel.cpp:43
Editor::LessonModel::SplitLessonOrder
SplitLessonOrder
When splitting a lesson into smaller ones - how to sort the entries into lessons. ...
Definition: lessonmodel.h:31
Editor::LessonModel::splitLesson
void splitLesson(const QModelIndex &containerIndex, int entriesPerLesson, SplitLessonOrder order)
Divide a lesson into smaller ones.
Definition: lessonmodel.cpp:83
Editor::LessonModel::Random
Randomized.
Definition: lessonmodel.h:33
Editor::BasicContainerModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: basiccontainermodel.cpp:55
Editor::LessonModel::LessonModel
LessonModel(QObject *parent=0)
Definition: lessonmodel.cpp:30
Editor::LessonModel::Sorted
The order of the entries in the document.
Definition: lessonmodel.h:32
Editor::LessonModel
Model for the tree of lessons.
Definition: lessonmodel.h:25
Editor::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:73
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