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

libkdeedu/keduvocdocument

keduvoccontainer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002 
00003     Copyright 2007 Jeremy Whiting <jeremywhiting@scitools.com>
00004     Copyright 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
00005 
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef KEDUVOCCONTAINER_H
00018 #define KEDUVOCCONTAINER_H
00019 
00020 #include "libkeduvocdocument_export.h"
00021 
00022 #include "keduvoctext.h"
00023 
00024 #include <KDE/KUrl>
00025 #include <QtCore/QList>
00026 
00027 class KEduVocExpression;
00028 
00030 class KEDUVOCDOCUMENT_EXPORT KEduVocContainer
00031 {
00032     // make this a template?
00033 
00034 public:
00035     enum EnumContainerType{
00036         Container,
00037         Lesson,
00038         WordType,
00039         Leitner
00040     };
00041 
00042     enum EnumEntriesRecursive{
00043         NotRecursive = 0,
00044         Recursive = 1
00045     };
00046 
00048     explicit KEduVocContainer(const QString& name, EnumContainerType type, KEduVocContainer *parent = 0);
00049 
00050     void appendChildContainer(KEduVocContainer *child);
00051     void insertChildContainer(int row, KEduVocContainer *child);
00052     void deleteChildContainer(int row);
00053     void removeChildContainer(int row);
00054     KEduVocContainer *childContainer(int row);
00055 
00062     KEduVocContainer *childContainer(const QString& name);
00063 
00064     QList<KEduVocContainer *> childContainers();
00065 
00071 //     KEduVocContainer *childContainer(const QString& name);
00072 
00073     int childContainerCount() const;
00074 
00075     int row() const;
00076     virtual KEduVocContainer *parent();
00077 
00079     KEduVocContainer( const KEduVocContainer &other );
00080 
00082     virtual ~KEduVocContainer();
00083 
00085     KEduVocContainer& operator= ( const KEduVocContainer& );
00086 
00090     void setName( const QString &name );
00091 
00093     QString name();
00094 
00096     virtual QList < KEduVocExpression* > entries(EnumEntriesRecursive recursive = NotRecursive) =0;
00097     virtual int entryCount(EnumEntriesRecursive recursive = NotRecursive) =0;
00098     virtual KEduVocExpression* entry(int row, EnumEntriesRecursive recursive = NotRecursive) =0;
00099 
00104     void removeTranslation(int translation);
00105 
00106     bool inPractice();
00107     void setInPractice( bool inPractice );
00108 
00110     bool operator==(const KEduVocContainer &other);
00111 
00116     KEduVocContainer::EnumContainerType containerType();
00117 
00123     void setContainerType(KEduVocContainer::EnumContainerType type);
00124 
00125 
00127     KUrl imageUrl();
00128 
00132     void setImageUrl(const KUrl &url);
00133 
00134     double averageGrade(int translation);
00135 
00136     int expressionsOfGrade(int translation, grade_t grade);
00137 
00143     void resetGrades(int translation, EnumEntriesRecursive recursive);
00144 
00145 protected:
00146     QList< KEduVocExpression * > entriesRecursive();
00147 
00151     void invalidateChildLessonEntries();
00152 
00156     void updateChildLessonEntries();
00157 
00158 private:
00159     class Private;
00160     Private * const d;
00161 };
00162 
00163 #endif

libkdeedu/keduvocdocument

Skip menu "libkdeedu/keduvocdocument"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal