parley
lessonmodel.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 00003 Copyright 2008-2009 Frederik Gladhorn <gladhorn@kde.org> 00004 00005 ***************************************************************************/ 00006 00007 /*************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 00016 #ifndef LESSONMODEL_H 00017 #define LESSONMODEL_H 00018 00019 #include "containermodel.h" 00020 00021 00025 class LessonModel : public ContainerModel 00026 { 00027 Q_OBJECT 00028 00029 public: 00031 enum SplitLessonOrder { 00032 Sorted, 00033 Random 00034 }; 00035 00036 00037 explicit LessonModel(QObject *parent = 0); 00038 00039 virtual Qt::ItemFlags flags(const QModelIndex &index) const; 00040 virtual QVariant data(const QModelIndex &index, int role) const; 00041 virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); 00042 00050 void splitLesson(const QModelIndex& containerIndex, int entriesPerLesson, SplitLessonOrder order); 00051 00052 protected: 00053 KEduVocContainer * rootContainer() const; 00054 }; 00055 00056 00057 #endif
KDE 4.5 API Reference