File indexing completed on 2024-04-21 03:48:19

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      * The constructor without arguments
0027      */
0028     explicit KEduVocArticle();
0029 
0030     /** copy constructor for d-pointer safety
0031      * @param other article object to copy
0032      */
0033     KEduVocArticle(const KEduVocArticle &other);
0034 
0035     /**
0036      * DEPRECATED The constructor with arguments, assumes singular!
0037      * @param fem_def reference to a QString with the definite female article
0038      * @param fem_indef reference to a QString with the indefinite female article
0039      * @param mal_def reference to a QString with the definite male article
0040      * @param mal_indef reference to a QString with the indefinite male article
0041      * @param nat_def reference to a QString with the definite neutral article
0042      * @param nat_indef reference to a QString with the indefinite neutral article
0043      */
0044     KEDUVOCDOCUMENT_DEPRECATED KEduVocArticle(const QString &fem_def,
0045                                               const QString &fem_indef,
0046                                               const QString &mal_def,
0047                                               const QString &mal_indef,
0048                                               const QString &nat_def,
0049                                               const QString &nat_indef);
0050 
0051     /**
0052      * default destructor, deletes the d pointer
0053      */
0054     ~KEduVocArticle();
0055 
0056     /**
0057      * assignment operator for d-pointer copying
0058      */
0059     KEduVocArticle &operator=(const KEduVocArticle &other);
0060 
0061     QString article(KEduVocWordFlags);
0062 
0063     void setArticle(const QString &article, KEduVocWordFlags);
0064 
0065     bool isArticle(const QString &article) const;
0066 
0067     bool isEmpty();
0068 
0069 private:
0070     class Private;
0071     Private *const d;
0072 };
0073 
0074 #endif