File indexing completed on 2024-04-21 15:32:09
0001 /** =========================================================== 0002 * @file 0003 * 0004 * This file is a part of KDE project 0005 * <a href="https://commits.kde.org/libmediawiki">libmediawiki</a> 0006 * 0007 * @date 2011-03-22 0008 * @brief a MediaWiki C++ interface for KDE 0009 * 0010 * @author Copyright (C) 2011-2012 by Gilles Caulier 0011 * <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a> 0012 * @author Copyright (C) 2010 by Remi Benoit 0013 * <a href="mailto:r3m1 dot benoit at gmail dot com">r3m1 dot benoit at gmail dot com</a> 0014 * 0015 * This program is free software; you can redistribute it 0016 * and/or modify it under the terms of the GNU General 0017 * Public License as published by the Free Software Foundation; 0018 * either version 2, or (at your option) 0019 * any later version. 0020 * 0021 * This program is distributed in the hope that it will be useful, 0022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0024 * GNU General Public License for more details. 0025 * 0026 * ============================================================ */ 0027 0028 #ifndef USERGROUP_H 0029 #define USERGROUP_H 0030 0031 // Qt includes 0032 0033 #include <QString> 0034 #include <QList> 0035 0036 // Local includes 0037 0038 #include "mediawiki_export.h" 0039 0040 namespace mediawiki 0041 { 0042 0043 /** 0044 * @brief A user group. 0045 */ 0046 class MEDIAWIKI_EXPORT UserGroup 0047 { 0048 0049 public: 0050 0051 /** 0052 * Constructs a user group. 0053 */ 0054 UserGroup(); 0055 0056 /** 0057 * @brief Constructs a user group from an other user group. 0058 * @param other an other user group 0059 */ 0060 UserGroup(const UserGroup& other); 0061 0062 /** 0063 * @brief Destructs a user group. 0064 */ 0065 ~UserGroup(); 0066 0067 /** 0068 * @brief Assingning a user group from an other user group. 0069 * @param other an other user group 0070 */ 0071 UserGroup& operator=(UserGroup other); 0072 0073 /** 0074 * @brief Returns true if this instance and other are equal, else false. 0075 * @param other instance to compare 0076 * @return true if there are equal, else false 0077 */ 0078 bool operator==(const UserGroup& other) const; 0079 0080 /** 0081 * @brief Returns the name of the user group. 0082 * @return the name of the user group 0083 */ 0084 QString name() const; 0085 0086 /** 0087 * @brief Set the name of the user group. 0088 * @param name the name of the user group 0089 */ 0090 void setName(const QString& name); 0091 0092 /** 0093 * @brief Returns rights of the user group. 0094 * @return rights of the user group 0095 */ 0096 const QList<QString>& rights() const; 0097 0098 /** 0099 * @brief Returns rights of the user group. 0100 * @return rights of the user group 0101 */ 0102 QList<QString>& rights(); 0103 0104 /** 0105 * @brief Set rights of the user group. 0106 * @param rights rights of the user group 0107 */ 0108 void setRights(const QList<QString>& rights); 0109 0110 /** 0111 * @brief Returns the numbers of users in the user group. 0112 * @return the numbers of users in the user group 0113 */ 0114 qint64 number() const; 0115 0116 /** 0117 * @brief Set the number of users in the user group. 0118 * @param number the number of users in the user group 0119 */ 0120 void setNumber(qint64 number) ; 0121 0122 private: 0123 0124 class UserGroupPrivate; 0125 UserGroupPrivate* const d; 0126 }; 0127 0128 } // namespace mediawiki 0129 0130 #endif // USERGROUP_H