File indexing completed on 2025-01-05 03:53:37

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2011-03-22
0007  * Description : a Iface C++ interface
0008  *
0009  * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2011      by Remi Benoit <r3m1 dot benoit at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_MEDIAWIKI_USERGROUP_H
0017 #define DIGIKAM_MEDIAWIKI_USERGROUP_H
0018 
0019 // Qt includes
0020 
0021 #include <QString>
0022 #include <QList>
0023 
0024 namespace MediaWiki
0025 {
0026 
0027 /**
0028  * @brief A user group.
0029  */
0030 class UserGroup
0031 {
0032 
0033 public:
0034 
0035     /**
0036      * Constructs a user group.
0037      */
0038     UserGroup();
0039 
0040     /**
0041      * @brief Constructs a user group from an other user group.
0042      * @param other an other user group
0043      */
0044     UserGroup(const UserGroup& other);
0045 
0046     /**
0047      * @brief Destructs a user group.
0048      */
0049     ~UserGroup();
0050 
0051     /**
0052      * @brief Assigning a user group from an other user group.
0053      * @param other an other user group
0054      */
0055     UserGroup& operator=(const UserGroup& other);
0056 
0057     /**
0058      * @brief Returns true if this instance and other are equal, else false.
0059      * @param other instance to compare
0060      * @return true if there are equal, else false
0061      */
0062     bool operator==(const UserGroup& other) const;
0063 
0064     /**
0065      * @brief Returns the name of the user group.
0066      * @return the name of the user group
0067      */
0068     QString name()                          const;
0069 
0070     /**
0071      * @brief Set the name of the user group.
0072      * @param name the name of the user group
0073      */
0074     void setName(const QString& name);
0075 
0076     /**
0077      * @brief Returns rights of the user group.
0078      * @return rights of the user group
0079      */
0080     const QList<QString>& rights()          const;
0081 
0082     /**
0083      * @brief Returns rights of the user group.
0084      * @return rights of the user group
0085      */
0086     QList<QString>& rights();
0087 
0088     /**
0089      * @brief Set rights of the user group.
0090      * @param rights the rights of the user group
0091      */
0092      void setRights(const QList<QString>& rights);
0093 
0094     /**
0095      * @brief Returns the numbers of users in the user group.
0096      * @return the numbers of users in the user group
0097      */
0098     qint64 number()                         const;
0099 
0100     /**
0101      * @brief Set the number of users in the user group.
0102      * @param number the number of users in the user group
0103      */
0104     void setNumber(qint64 number);
0105 
0106 private:
0107 
0108     class Private;
0109     Private* const d;
0110 };
0111 
0112 } // namespace MediaWiki
0113 
0114 #endif // DIGIKAM_MEDIAWIKI_USERGROUP_H