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

libkdeedu/keduvocdocument

keduvoctext.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     Copyright 2007-2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
00003  ***************************************************************************/
00004 
00005 /***************************************************************************
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #ifndef KEDUVOCTEXT_H
00015 #define KEDUVOCTEXT_H
00016 
00017 #include "libkeduvocdocument_export.h"
00018 #include <QtCore/QDateTime>
00019 
00020 
00021 #define KV_MAX_GRADE       7
00022 #define KV_MIN_GRADE       0
00023 
00024 #define KV_NORM_GRADE      0       // not practiced yet
00025 #define KV_NORM_TEXT       I18N_NOOP("Not Practiced Yet")
00026 
00027 #define KV_LEV1_GRADE      1
00028 #define KV_LEV1_TEXT       I18N_NOOP("Level 1")
00029 
00030 #define KV_LEV2_GRADE      2
00031 #define KV_LEV2_TEXT       I18N_NOOP("Level 2")
00032 
00033 #define KV_LEV3_GRADE      3
00034 #define KV_LEV3_TEXT       I18N_NOOP("Level 3")
00035 
00036 #define KV_LEV4_GRADE      4
00037 #define KV_LEV4_TEXT       I18N_NOOP("Level 4")
00038 
00039 #define KV_LEV5_GRADE      5
00040 #define KV_LEV5_TEXT       I18N_NOOP("Level 5")
00041 
00042 #define KV_LEV6_GRADE      6
00043 #define KV_LEV6_TEXT       I18N_NOOP("Level 6")
00044 
00045 #define KV_LEV7_GRADE      7
00046 #define KV_LEV7_TEXT       I18N_NOOP("Level 7")
00047 
00048 
00049 typedef unsigned short grade_t;
00050 typedef unsigned short count_t;
00051 
00052 class QDomElement;
00053 
00059 class KEDUVOCDOCUMENT_EXPORT KEduVocText
00060 {
00061 public:
00063     KEduVocText(const QString& text = QString());
00064 
00069     KEduVocText( const KEduVocText &other );
00070 
00072     ~KEduVocText();
00073 
00078     QString text() const;
00079 
00084     void setText( const QString & expr );
00085 
00091     KEduVocText& operator= ( const KEduVocText &other );
00097     bool operator== ( const KEduVocText &other ) const;
00098 
00099 
00103     count_t practiceCount() const;
00104 
00108     void setPracticeCount( count_t count );
00109 
00113     count_t badCount() const;
00114 
00118     void setBadCount( count_t count );
00119 
00121     void incBadCount();
00122 
00124     void incPracticeCount();
00125 
00129     void resetGrades();
00130 
00134     void setGrade( grade_t grade );
00135 
00139     grade_t grade() const;
00140 
00142     void incGrade();
00143 
00145     void decGrade();
00146 
00149     QDateTime practiceDate() const;
00150 
00154     void setPracticeDate( const QDateTime & date );
00155 
00160     bool isEmpty();
00161 
00162     void fromKVTML2(QDomElement& parent);
00163     void toKVTML2(QDomElement& parent);
00164 
00165 private:
00166     class KEduVocTextPrivate;
00167     KEduVocTextPrivate * const d;
00168 };
00169 
00170 #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