KDECore
KUserGroup Class Reference
Represents a group on your system. More...
#include <KUserGroup>
Public Member Functions | |
bool | isValid () const |
KUserGroup (const KUserGroup &group) | |
KUserGroup (const char *name) | |
KUserGroup (const QString &name) | |
QString | name () const |
bool | operator!= (const KUserGroup &group) const |
KUserGroup & | operator= (const KUserGroup &group) |
bool | operator== (const KUserGroup &group) const |
QStringList | userNames () const |
QList< KUser > | users () const |
~KUserGroup () | |
Static Public Member Functions | |
static QStringList | allGroupNames () |
static QList< 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.
Definition at line 260 of file kuser.h.
Constructor & Destructor Documentation
KUserGroup::KUserGroup | ( | const QString & | name | ) | [explicit] |
Create an object from a group name.
If the group does not exist, isValid() will return false.
- Parameters:
-
name the name of the group
Definition at line 269 of file kuser_unix.cpp.
KUserGroup::KUserGroup | ( | const char * | name | ) | [explicit] |
Create an object from a group name.
If the group does not exist, isValid() will return false.
- Parameters:
-
name the name of the group
Definition at line 274 of file kuser_unix.cpp.
KUserGroup::KUserGroup | ( | const KUserGroup & | group | ) |
Creates a new KUserGroup instance from another KUserGroup object.
- Parameters:
-
group the KUserGroup to copy
Definition at line 284 of file kuser_unix.cpp.
KUserGroup::~KUserGroup | ( | ) |
Member Function Documentation
QStringList KUserGroup::allGroupNames | ( | ) | [static] |
QList< KUserGroup > KUserGroup::allGroups | ( | ) | [static] |
bool KUserGroup::isValid | ( | ) | const |
Returns whether 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
Definition at line 302 of file kuser_unix.cpp.
QString KUserGroup::name | ( | ) | const |
bool KUserGroup::operator!= | ( | const KUserGroup & | group | ) | const |
Two KUserGroup objects are not equal if their gid()s are not identical.
Invalid groups always compare unequal.
- Returns:
- true if the groups are not identical
Definition at line 298 of file kuser_unix.cpp.
KUserGroup & KUserGroup::operator= | ( | const KUserGroup & | group | ) |
Copies a group.
- Parameters:
-
group the group that should be copied
- Returns:
- this group
Definition at line 289 of file kuser_unix.cpp.
bool KUserGroup::operator== | ( | const KUserGroup & | group | ) | const |
Two KUserGroup objects are equal if their gid()s are identical.
Invalid groups never compare equal.
- Returns:
- true if the groups are identical
Definition at line 294 of file kuser_unix.cpp.
QStringList KUserGroup::userNames | ( | ) | const |
Returns a list of all user login names of the group.
- Returns:
- a list of all user login names of the group
Definition at line 318 of file kuser_unix.cpp.
Returns a list of all users of the group.
- Returns:
- a list of all users of the group
Definition at line 314 of file kuser_unix.cpp.
The documentation for this class was generated from the following files: