KDECore
KUserGroup Class Reference
Represents a group on your system. More...
#include <kuser.h>
| Public Member Functions | |
| long | gid () const | 
| bool | isValid () const | 
| KUserGroup (const KUserGroup &group) | |
| KUserGroup (struct group *g) | |
| KUserGroup (const char *name) | |
| KUserGroup (const QString &name) | |
| KUserGroup (long gid) | |
| KUserGroup (KUser::UIDMode mode=KUser::UseEffectiveUID) | |
| QString | name () const | 
| bool | operator!= (const KUserGroup &group) const | 
| KUserGroup & | operator= (const KUserGroup &group) | 
| bool | operator== (const KUserGroup &group) const | 
| QStringList | userNames () const | 
| const QValueList< KUser > & | users () const | 
| ~KUserGroup () | |
| Static Public Member Functions | |
| static QStringList | allGroupNames () | 
| static QValueList< KUserGroup > | allGroups () | 
Detailed Description
Represents a group on your system.This class represents a group on your system. You can either get information about the group of the current user, of fetch information about a group on the system. Instances of this class will be explicitly shared, so copying objects is very cheap and you can safely pass objects by value.
- Since:
- 3.3
Definition at line 256 of file kuser.h.
Constructor & Destructor Documentation
| KUserGroup::KUserGroup | ( | KUser::UIDMode | mode = KUser::UseEffectiveUID | ) |  [explicit] | 
Create an object from the group of the current user.
- Parameters:
- 
  mode if KUser::UseEffectiveUID is passed the effective user will be used. If KUser::UseRealUserID is passed the real user will be used. The real UID will be different than the effective UID in setuid programs; in such a case use the effective UID for checking permissions, and the real UID for displaying information about the group associated with the user. 
| KUserGroup::KUserGroup | ( | long | gid | ) |  [explicit] | 
| KUserGroup::KUserGroup | ( | const QString & | name | ) |  [explicit] | 
| KUserGroup::KUserGroup | ( | const char * | name | ) |  [explicit] | 
| KUserGroup::KUserGroup | ( | struct group * | g | ) |  [explicit] | 
| KUserGroup::KUserGroup | ( | const KUserGroup & | group | ) | 
Creates a new KUserGroup instance from another KUserGroup object.
- Parameters:
- 
  group the KUserGroup to copy 
Member Function Documentation
| QStringList KUserGroup::allGroupNames | ( | ) |  [static] | 
| QValueList< KUserGroup > KUserGroup::allGroups | ( | ) |  [static] | 
| long KUserGroup::gid | ( | ) | const | 
| bool KUserGroup::isValid | ( | ) | const | 
Returns wether the group is valid.
A KUserGroup object can be invalid if it is created with a non-existing gid or name.
- Returns:
- true if the group is valid
| QString KUserGroup::name | ( | ) | const | 
| bool KUserGroup::operator!= | ( | const KUserGroup & | group | ) | const | 
Two KUserGroup objects are not equal if either isValid() is not true or gid() are not identical.
- Returns:
- true if the groups are not identical
| KUserGroup & KUserGroup::operator= | ( | const KUserGroup & | group | ) | 
| bool KUserGroup::operator== | ( | const KUserGroup & | group | ) | const | 
Two KUserGroup objects are equal if isValid() is true and gid() are identical.
- Returns:
- true if the groups are identical
| QStringList KUserGroup::userNames | ( | ) | const | 
| const QValueList< KUser > & KUserGroup::users | ( | ) | const | 
The documentation for this class was generated from the following files:
 KDE 3.5 API Reference
    KDE 3.5 API Reference