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

libkdeedu/keduvocdocument

  • sources
  • kde-4.12
  • kdeedu
  • libkdeedu
  • keduvocdocument
keduvoctext.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2007-2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
3  ***************************************************************************/
4 
5 /***************************************************************************
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  ***************************************************************************/
13 
14 #ifndef KEDUVOCTEXT_H
15 #define KEDUVOCTEXT_H
16 
17 #include "libkeduvocdocument_export.h"
18 #include <QtCore/QDateTime>
19 
20 
21 #define KV_MAX_GRADE 7
22 #define KV_MIN_GRADE 0
23 
24 #define KV_NORM_GRADE 0 // not practiced yet
25 #define KV_NORM_TEXT I18N_NOOP("Not Practiced Yet")
26 
27 #define KV_LEV1_GRADE 1
28 #define KV_LEV1_TEXT I18N_NOOP("Level 1")
29 
30 #define KV_LEV2_GRADE 2
31 #define KV_LEV2_TEXT I18N_NOOP("Level 2")
32 
33 #define KV_LEV3_GRADE 3
34 #define KV_LEV3_TEXT I18N_NOOP("Level 3")
35 
36 #define KV_LEV4_GRADE 4
37 #define KV_LEV4_TEXT I18N_NOOP("Level 4")
38 
39 #define KV_LEV5_GRADE 5
40 #define KV_LEV5_TEXT I18N_NOOP("Level 5")
41 
42 #define KV_LEV6_GRADE 6
43 #define KV_LEV6_TEXT I18N_NOOP("Level 6")
44 
45 #define KV_LEV7_GRADE 7
46 #define KV_LEV7_TEXT I18N_NOOP("Level 7")
47 
48 
49 typedef unsigned short grade_t;
50 typedef unsigned short count_t;
51 
52 class QDomElement;
53 
59 class KEDUVOCDOCUMENT_EXPORT KEduVocText
60 {
61 public:
63  KEduVocText(const QString& text = QString());
64 
69  KEduVocText( const KEduVocText &other );
70 
72  ~KEduVocText();
73 
78  QString text() const;
79 
84  void setText( const QString & expr );
85 
91  KEduVocText& operator= ( const KEduVocText &other );
97  bool operator== ( const KEduVocText &other ) const;
98 
99 
103  count_t practiceCount() const;
104 
108  void setPracticeCount( count_t count );
109 
113  count_t badCount() const;
114 
118  void setBadCount( count_t count );
119 
121  void incBadCount();
122 
124  void incPracticeCount();
125 
129  void resetGrades();
130 
134  void setGrade( grade_t grade );
135 
139  grade_t grade() const;
140 
142  void incGrade();
143 
145  void decGrade();
146 
149  QDateTime practiceDate() const;
150 
154  void setPracticeDate( const QDateTime & date );
155 
160  bool isEmpty();
161 
162  void fromKVTML2(QDomElement& parent);
163  void toKVTML2(QDomElement& parent);
164 
165 private:
166  class KEduVocTextPrivate;
167  KEduVocTextPrivate * const d;
168 };
169 
170 #endif
libkeduvocdocument_export.h
KEDUVOCDOCUMENT_EXPORT
#define KEDUVOCDOCUMENT_EXPORT
Definition: libkeduvocdocument_export.h:32
count_t
unsigned short count_t
Definition: keduvoctext.h:50
KEduVocText
A text in vocabulary documents.
Definition: keduvoctext.h:59
grade_t
unsigned short grade_t
Definition: keduvoctext.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:37:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdeedu/keduvocdocument

Skip menu "libkdeedu/keduvocdocument"
  • 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