File indexing completed on 2022-10-04 13:56:34

0001 /*
0002  * SPDX-FileCopyrightText: 2007-2008 Frederik Gladhorn <gladhorn@kde.org>
0003  * SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef KEDUVOCIDENTIFIER_H
0007 #define KEDUVOCIDENTIFIER_H
0008 
0009 #include "keduvocdocument_export.h"
0010 
0011 #include "keduvocpersonalpronoun.h"
0012 #include "keduvocarticle.h"
0013 
0014 #include <QList>
0015 #include <QString>
0016 #include <QSet>
0017 
0018 
0019 /**
0020 Class to store meta information about a language or any other category in the vocabulary.
0021 */
0022 class KEDUVOCDOCUMENT_EXPORT KEduVocIdentifier
0023 {
0024 public:
0025     /**
0026      * Default ctor.
0027      */
0028     explicit KEduVocIdentifier();
0029 
0030     /**
0031      * Copy ctor.
0032      * @param other
0033      */
0034     KEduVocIdentifier( const KEduVocIdentifier &other );
0035 
0036     /**
0037      * dtor
0038      */
0039     ~KEduVocIdentifier();
0040 
0041     /**
0042      * assignment operator
0043      * @param other
0044      * @return
0045      */
0046     KEduVocIdentifier& operator= ( const KEduVocIdentifier &other );
0047 public:
0048 
0049     /**
0050      * Name of this identifier. (English, Anatomy, Fruit salad...)
0051      * @return name
0052      */
0053     QString name() const;
0054     /**
0055      * Set the name
0056      * @param name
0057      */
0058     void setName( const QString& name );
0059 
0060     /**
0061      * The locale of the contents: en, de, es, ...
0062      * @return locale
0063      */
0064     QString locale() const;
0065     /**
0066      * Set the locale
0067      * @param name
0068      */
0069     void setLocale( const QString& name );
0070 
0071     /**
0072      * Articles (a, the in English, el, la,... in Spanish)
0073      * @returns articles
0074      */
0075     KEduVocArticle& article() const;
0076 
0077     /**
0078      * Sets the articles for this identifier
0079      * @param article              article block
0080      */
0081     void setArticle( const KEduVocArticle& article );
0082 
0083     /**
0084      * Get the personal pronouns for this identifier
0085      * @returns a KEduVocPersonalPronoun containing the personal pronouns
0086      */
0087     KEduVocPersonalPronoun& personalPronouns() const;
0088 
0089     /**
0090      * Sets personal pronouns
0091      * @param pronouns a KEduVocConjugation containing the personal pronouns
0092      */
0093     void setPersonalPronouns( const KEduVocPersonalPronoun &pronouns );
0094 
0095     /**
0096      * Returns the name of tense number @p tenseIndex
0097      * @param tenseIndex desired tense
0098      * @return name of the tense
0099      */
0100     QString tense(int tenseIndex) const;
0101 
0102     /**
0103      * Sets the name of a tense for this language
0104      * @param tenseIndex 
0105      * @param tense 
0106      */
0107     void setTense(int tenseIndex, const QString& tense);
0108 
0109     QStringList tenseList() const;
0110 
0111     void setTenseList(const QStringList& tenses);
0112 
0113 private:
0114     class Private;
0115     Private * const d;
0116 };
0117 
0118 #endif