/usr/include/libkdeedu/keduvoctranslation.h is in libkdeedu-dev 4:15.12.3-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | /***************************************************************************
Vocabulary Expression Translation for KDE Edu
-----------------------------------------------------------------------
Copyright 2007-2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef KEDUVOCTRANSLATION_H
#define KEDUVOCTRANSLATION_H
#include "libkeduvocdocument_export.h"
#include "keduvocconjugation.h"
#include "keduvoctext.h"
#include <KDE/KUrl>
#include <QtCore/QString>
class KEduVocExpression;
class KEduVocString;
class KEduVocWordType;
class KEduVocLeitnerBox;
class KEduVocDeclension;
/**
@author Frederik Gladhorn <frederik.gladhorn@kdemail.net>
*/
class KEDUVOCDOCUMENT_EXPORT KEduVocTranslation
:public KEduVocText
{
public:
enum Related {
Synonym,
Antonym,
FalseFriend
};
/**
* Default constructor for an empty translation.
*/
KEduVocTranslation(KEduVocExpression* entry);
/**
* Constructor
* @param translation is used as translation
*/
KEduVocTranslation(KEduVocExpression* entry, const QString &translation );
/** copy constructor for d-pointer safety */
KEduVocTranslation( const KEduVocTranslation &other );
/**
* Destructor
*/
~KEduVocTranslation();
KEduVocExpression* entry();
/** Sets the pronunciation of this expression
* @param expression pronunciation of this index
*/
void setPronunciation( const QString & expression );
/** Returns the pronunciation of this expression
* @return pronunciation or "" if none available
*/
QString pronunciation() const;
/** Returns comments of this expression
* @return comment or "" if no comment available
*/
QString comment() const;
/** Sets comment of this expression
* @param expr comment of this index
*/
void setComment( const QString& expr );
/** Sets example this expression
* @param expression example of this index
*/
void setExample( const QString & expression );
/** Returns example of this expression
* @return example or "" if no string available
*/
QString example() const;
/** Sets paraphrase of this expression
* @param expression paraphrase of this index
*/
void setParaphrase( const QString & expression );
/** Returns paraphrase of this expression
* @return paraphrase or "" if no string available
*/
QString paraphrase() const;
/** Sets antonym this expression
* @param expression antonym of this index
*/
void setAntonym( const QString & expression );
/** Returns antonym of this expression
* @return antonym or "" if no string available
*/
QString antonym() const;
/**
* Sets an irregular plural form.
* @param plural plural of the word
*/
void setIrregularPlural( const QString& plural );
/**
* Gets an irregular plural form.
* @return plural of the word
*/
QString irregularPlural() const;
/** Returns the word type of this expression, you will get a 0 pointer
* if wordtype is not set for the translation
*
* @return type or "" if no type available
*/
KEduVocWordType* wordType() const;
/** Sets the word type of this expression
* @param type type of this expression ("" = none)
*/
void setWordType( KEduVocWordType* wordType );
/** Returns the leitner box of this translation
* @return the box
*/
KEduVocLeitnerBox* leitnerBox() const;
/** Sets the leitner box of this translation
* @param leitnerBox the box
*/
void setLeitnerBox( KEduVocLeitnerBox* leitnerBox );
/**
* Returns a conjugation if available
* @param tense tense of the requested conjugation
* @return the conjugation
*/
KEduVocConjugation& conjugation( const QString& tense );
/** adds conjugations or replaces them, if they exist.
* @param conjugation conjugation
*/
void setConjugation( const QString& tense, const KEduVocConjugation & conjugation );
/**
* Returns a pointer to the declension object of this translation.
* Returns 0 if no declension object exists!
* @return the declension
*/
KEduVocDeclension* declension();
/**
* Set a new declension for a translation
* @param declension
*/
void setDeclension(KEduVocDeclension* declension);
/**
* Bad, only used for tense entry page, will be deleted later. Deprecated.
* @param conjugation
*/
void setConjugations( const QMap<QString, KEduVocConjugation>& conjugations );
QStringList conjugationTenses() const;
/**
* Bad, only compatibility. Deprecated.
* @return
*/
KDE_DEPRECATED QMap <QString, KEduVocConjugation> conjugations() const;
/**
* Comparison forms of adjectives/adverbs.
*/
KDE_DEPRECATED QString comparative() const;
KDE_DEPRECATED void setComparative(const QString& comparative);
// TODO rename to comparative and remove the deprecated function
KEduVocText comparativeForm() const;
void setComparativeForm(const KEduVocText& comparative);
KDE_DEPRECATED QString superlative() const;
KDE_DEPRECATED void setSuperlative(const QString& superlative);
KEduVocText superlativeForm() const;
void setSuperlativeForm(const KEduVocText& superlative);
KEduVocText article() const;
void setArticle(const KEduVocText& article);
/** Returns multiple choice if available
*/
QStringList & multipleChoice();
/** Sets multiple choice
* @param mc multiple choice block
*/
// void setMultipleChoice( const QStringList &mc );
/** Get the sound url for this translation if it exists */
KUrl soundUrl();
/** Set the sound url for this translation
* @param url url of the sound file */
void setSoundUrl(const KUrl &url);
/** Get the image url for this translation if it exists */
KUrl imageUrl();
/** Set the image url for this translation
* @param url url of the image
*/
void setImageUrl(const KUrl &url);
/**
* Add a false friend
* @param falseFriend false friend of this index
*/
void addFalseFriend( KEduVocTranslation* falseFriend );
/**
* Remove a false friend
* @param falseFriend false friend of this index
*/
void removeFalseFriend( KEduVocTranslation* falseFriend );
/**
* Returns false friends of this expression
* @return list of false friends
*/
QList<KEduVocTranslation*> falseFriends() const;
/**
* Add a synonym
* @param synonym
*/
void addSynonym( KEduVocTranslation* synonym );
/**
* Remove a synonym
* @param synonym
*/
void removeSynonym( KEduVocTranslation* synonym );
/**
* Returns synonyms of this expression
* @return synonyms
*/
QList<KEduVocTranslation*> synonyms() const;
/**
* Add a antonym
* @param antonym
*/
void addAntonym( KEduVocTranslation* antonym );
/**
* Remove a antonym
* @param antonym
*/
void removeAntonym( KEduVocTranslation* antonym );
/**
* Returns antonyms of this expression
* @return antonyms
*/
QList<KEduVocTranslation*> antonyms() const;
/**
* Equal operator to assing a translation to another one.
* @param translation translation to be copied
* @return reference to the new translation
*/
KEduVocTranslation& operator= ( const KEduVocTranslation &translation );
/**
* Compare two translations, including word type etc.
* @param translation
* @return true if equal
*/
bool operator== ( const KEduVocTranslation &translation ) const;
void fromKVTML2(QDomElement& parent);
void toKVTML2(QDomElement& parent);
private:
class KEduVocTranslationPrivate;
KEduVocTranslationPrivate* const d;
// for the copy constructor
void setEntry(KEduVocExpression* entry);
friend class KEduVocExpression;
};
#endif
|