• 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
keduvocidentifier.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2007-2008 Frederik Gladhorn <gladhorn@kde.org>
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 #include "keduvocidentifier.h"
14 
15 class KEduVocIdentifier::Private
16 {
17 public:
19  QString m_name;
21  QString m_locale;
22 
27  QString m_comment;
28 
30  QString m_type;
31 
33  KEduVocPersonalPronoun m_personalPronouns;
34 
37  KEduVocArticle m_articles;
38 
40  QStringList m_tenses;
41 };
42 
43 KEduVocIdentifier::KEduVocIdentifier()
44 : d( new Private )
45 {
47  d->m_locale = "en";
48 }
49 
50 KEduVocIdentifier::~KEduVocIdentifier()
51 {
52  delete d;
53 }
54 
55 KEduVocIdentifier::KEduVocIdentifier( const KEduVocIdentifier &other )
56 : d( new Private( *other.d ) )
57 {
58 #if 0
59  d->m_locale = other.d->m_locale;
60  d->m_name = other.d->m_name;
61  d->m_articles = other.d->m_articles;
62  d->m_personalPronouns = other.d->m_personalPronouns;
63  d->m_comment = other.d->m_comment;
64  d->m_tenses = other.d->m_tenses;
65  d->m_type = other.d->m_type;
66 #endif
67 }
68 
69 KEduVocIdentifier& KEduVocIdentifier::operator= ( const KEduVocIdentifier &other )
70 {
71  d->m_locale = other.d->m_locale;
72  d->m_name = other.d->m_name;
73  d->m_articles = other.d->m_articles;
74  d->m_personalPronouns = other.d->m_personalPronouns;
75  d->m_comment = other.d->m_comment;
76  d->m_tenses = other.d->m_tenses;
77  d->m_type = other.d->m_type;
78  return *this;
79 }
80 
81 QString KEduVocIdentifier::name() const
82 {
83  return d->m_name;
84 }
85 
86 void KEduVocIdentifier::setName(const QString & name)
87 {
88  d->m_name = name;
89 }
90 
91 QString KEduVocIdentifier::locale() const
92 {
93  return d->m_locale;
94 }
95 
96 void KEduVocIdentifier::setLocale(const QString & locale)
97 {
98  d->m_locale = locale;
99 }
100 
101 void KEduVocIdentifier::setArticle( const KEduVocArticle& articles )
102 {
103  d->m_articles = articles;
104 }
105 
106 KEduVocArticle& KEduVocIdentifier::article() const
107 {
108  return d->m_articles;
109 }
110 
111 KEduVocPersonalPronoun& KEduVocIdentifier::personalPronouns() const
112 {
113  return d->m_personalPronouns;
114 }
115 
116 void KEduVocIdentifier::setPersonalPronouns( const KEduVocPersonalPronoun & pronouns )
117 {
118  d->m_personalPronouns = pronouns;
119 }
120 
121 QString KEduVocIdentifier::tense(int tenseIndex) const
122 {
123  Q_ASSERT(d->m_tenses.size() > tenseIndex);
124  return d->m_tenses.value(tenseIndex);
125 }
126 
127 void KEduVocIdentifier::setTense(int tenseIndex, const QString& tense)
128 {
129  Q_ASSERT(d->m_tenses.size() >= tenseIndex);
130  if (tenseIndex == d->m_tenses.size()) {
131  d->m_tenses.append(tense);
132  } else {
133  d->m_tenses[tenseIndex] = tense;
134  }
135 }
136 
137 QStringList KEduVocIdentifier::tenseList() const
138 {
139  return d->m_tenses;
140 }
141 
142 void KEduVocIdentifier::setTenseList(const QStringList& tenses)
143 {
144  d->m_tenses = tenses;
145 }
146 
keduvocidentifier.h
KEduVocIdentifier::name
QString name() const
Name of this identifier.
Definition: keduvocidentifier.cpp:81
KEduVocIdentifier
Class to store meta information about a language or any other category in the vocabulary.
Definition: keduvocidentifier.h:29
KEduVocIdentifier::tense
QString tense(int tenseIndex) const
Returns the name of tense number tenseIndex.
Definition: keduvocidentifier.cpp:121
KEduVocIdentifier::KEduVocIdentifier
KEduVocIdentifier()
Default ctor.
Definition: keduvocidentifier.cpp:43
KEduVocIdentifier::article
KEduVocArticle & article() const
Articles (a, the in English, el, la,...
Definition: keduvocidentifier.cpp:106
KEduVocIdentifier::setTenseList
void setTenseList(const QStringList &tenses)
Definition: keduvocidentifier.cpp:142
KEduVocPersonalPronoun
The conjugation of a verb.
Definition: keduvocpersonalpronoun.h:25
KEduVocArticle
Class representing the articles of a language.
Definition: keduvocarticle.h:33
KEduVocIdentifier::~KEduVocIdentifier
~KEduVocIdentifier()
dtor
Definition: keduvocidentifier.cpp:50
KEduVocIdentifier::setName
void setName(const QString &name)
Set the name.
Definition: keduvocidentifier.cpp:86
KEduVocIdentifier::setArticle
void setArticle(const KEduVocArticle &article)
Sets the articles for this identifier.
Definition: keduvocidentifier.cpp:101
KEduVocIdentifier::locale
QString locale() const
The locale of the contents: en, de, es, ...
Definition: keduvocidentifier.cpp:91
KEduVocIdentifier::setTense
void setTense(int tenseIndex, const QString &tense)
Sets the name of a tense for this language.
Definition: keduvocidentifier.cpp:127
KEduVocIdentifier::operator=
KEduVocIdentifier & operator=(const KEduVocIdentifier &other)
assignment operator
Definition: keduvocidentifier.cpp:69
KEduVocIdentifier::personalPronouns
KEduVocPersonalPronoun & personalPronouns() const
Get the personal pronouns for this identifier.
Definition: keduvocidentifier.cpp:111
KEduVocIdentifier::tenseList
QStringList tenseList() const
Definition: keduvocidentifier.cpp:137
KEduVocIdentifier::setPersonalPronouns
void setPersonalPronouns(const KEduVocPersonalPronoun &pronouns)
Sets personal pronouns.
Definition: keduvocidentifier.cpp:116
KEduVocIdentifier::setLocale
void setLocale(const QString &name)
Set the locale.
Definition: keduvocidentifier.cpp:96
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