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

0001 /*
0002  * SPDX-FileCopyrightText: 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
0003  * SPDX-FileCopyrightText: 2005, 2007 Peter Hedlund <peter.hedlund@kdemail.net>
0004  * SPDX-FileCopyrightText: 2007-2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>                                                                    *
0005  * SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef KEDUVOCARTICLE_H
0009 #define KEDUVOCARTICLE_H
0010 
0011 #include "keduvocdocument_export.h"
0012 
0013 #include <QStringList>
0014 
0015 #include "keduvocwordflags.h"
0016 
0017 /**
0018  * Class representing the articles of a language
0019  *
0020  * It contains all available articles of the language as QString
0021  */
0022 class KEDUVOCDOCUMENT_EXPORT KEduVocArticle
0023 {
0024 public:
0025 
0026 
0027 
0028     /**
0029      * The constructor without arguments
0030      */
0031     explicit KEduVocArticle();
0032 
0033     /** copy constructor for d-pointer safety
0034      * @param other article object to copy
0035      */
0036     KEduVocArticle( const KEduVocArticle &other );
0037 
0038     /**
0039      * DEPRECATED The constructor with arguments, assumes singular!
0040      * @param fem_def reference to a QString with the definite female article
0041      * @param fem_indef reference to a QString with the indefinite female article
0042      * @param mal_def reference to a QString with the definite male article
0043      * @param mal_indef reference to a QString with the indefinite male article
0044      * @param nat_def reference to a QString with the definite neutral article
0045      * @param nat_indef reference to a QString with the indefinite neutral article
0046      */
0047     KEDUVOCDOCUMENT_DEPRECATED KEduVocArticle( const QString &fem_def, const QString &fem_indef, const QString &mal_def, const QString &mal_indef, const QString &nat_def, const QString &nat_indef );
0048 
0049     /**
0050      * default destructor, deletes the d pointer
0051      */
0052     ~KEduVocArticle();
0053 
0054     /**
0055      * assignment operator for d-pointer copying
0056      */
0057     KEduVocArticle &operator= ( const KEduVocArticle& other );
0058 
0059     QString article(KEduVocWordFlags );
0060 
0061     void setArticle(const QString& article, KEduVocWordFlags );
0062 
0063     bool isArticle(const QString& article) const;
0064 
0065     bool isEmpty();
0066 
0067 private:
0068     class Private;
0069     Private * const d;
0070 };
0071 
0072 
0073 #endif