libkdeedu/keduvocdocument
keduvocidentifier.cpp
Go to the documentation of this file.00001 /*************************************************************************** 00002 00003 C++ Implementation: keduvocidentifier 00004 00005 ----------------------------------------------------------------------- 00006 00007 begin : Mi Aug 29 2007 00008 00009 copyright : (C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net> 00010 00011 ----------------------------------------------------------------------- 00012 00013 ***************************************************************************/ 00014 00015 /*************************************************************************** 00016 * * 00017 * This program is free software; you can redistribute it and/or modify * 00018 * it under the terms of the GNU General Public License as published by * 00019 * the Free Software Foundation; either version 2 of the License, or * 00020 * (at your option) any later version. * 00021 * * 00022 ***************************************************************************/ 00023 #include "keduvocidentifier.h" 00024 00025 #include <KLocalizedString> 00026 00027 class KEduVocIdentifier::Private 00028 { 00029 public: 00031 QString m_name; 00033 QString m_locale; 00034 00039 QString m_comment; 00040 00042 QString m_type; 00043 00045 KEduVocPersonalPronoun m_personalPronouns; 00046 00049 KEduVocArticle m_articles; 00050 00052 QSet < QString > m_tenses; 00053 00055 int m_sizeHint; 00056 }; 00057 00058 00059 KEduVocIdentifier::KEduVocIdentifier() 00060 : d( new Private ) 00061 { 00063 d->m_locale = "en"; 00064 } 00065 00066 00067 KEduVocIdentifier::~KEduVocIdentifier() 00068 { 00069 delete d; 00070 } 00071 00072 00073 KEduVocIdentifier::KEduVocIdentifier( const KEduVocIdentifier &other ) 00074 : d( new Private ) 00075 { 00076 d->m_locale = other.d->m_locale; 00077 d->m_name = other.d->m_name; 00078 d->m_articles = other.d->m_articles; 00079 d->m_personalPronouns = other.d->m_personalPronouns; 00080 d->m_comment = other.d->m_comment; 00081 d->m_sizeHint = other.d->m_sizeHint; 00082 d->m_tenses = other.d->m_tenses; 00083 d->m_type = other.d->m_type; 00084 } 00085 00086 00087 KEduVocIdentifier& KEduVocIdentifier::operator= ( const KEduVocIdentifier &other ) 00088 { 00089 d->m_locale = other.d->m_locale; 00090 d->m_name = other.d->m_name; 00091 d->m_articles = other.d->m_articles; 00092 d->m_personalPronouns = other.d->m_personalPronouns; 00093 return *this; 00094 } 00095 00096 00097 QString KEduVocIdentifier::name() const 00098 { 00099 return d->m_name; 00100 } 00101 00102 void KEduVocIdentifier::setName(const QString & name) 00103 { 00104 d->m_name = name; 00105 } 00106 00107 QString KEduVocIdentifier::locale() const 00108 { 00109 return d->m_locale; 00110 } 00111 00112 void KEduVocIdentifier::setLocale(const QString & locale) 00113 { 00114 d->m_locale = locale; 00115 } 00116 00117 00118 void KEduVocIdentifier::setArticle( const KEduVocArticle& articles ) 00119 { 00120 d->m_articles = articles; 00121 } 00122 00123 KEduVocArticle KEduVocIdentifier::article() const 00124 { 00125 return d->m_articles; 00126 } 00127 00128 KEduVocPersonalPronoun KEduVocIdentifier::personalPronouns() const 00129 { 00130 return d->m_personalPronouns; 00131 } 00132 00133 void KEduVocIdentifier::setPersonalPronouns( const KEduVocPersonalPronoun & pronouns ) 00134 { 00135 d->m_personalPronouns = pronouns; 00136 }
KDE 4.0 API Reference