• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

Public Member Functions | Static Public Member Functions | List of all members
KUserGroup Class Reference

#include <KUserGroup>

Public Member Functions

 KUserGroup (const QString &name)
 
 KUserGroup (const char *name)
 
 KUserGroup (const KUserGroup &group)
 
 ~KUserGroup ()
 
bool isValid () const
 
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
 

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.

Author
Jan Schaefer j_sch.nosp@m.aef@.nosp@m.infor.nosp@m.mati.nosp@m.k.uni.nosp@m.-kl..nosp@m.de

Definition at line 262 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
namethe name of the group

Definition at line 271 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
namethe name of the group

Definition at line 276 of file kuser_unix.cpp.

KUserGroup::KUserGroup ( const KUserGroup &  group)

Creates a new KUserGroup instance from another KUserGroup object.

Parameters
groupthe KUserGroup to copy

Definition at line 286 of file kuser_unix.cpp.

KUserGroup::~KUserGroup ( )

Destructor.

Definition at line 355 of file kuser_unix.cpp.

Member Function Documentation

QStringList KUserGroup::allGroupNames ( )
static

Returns a list of all group names on this system.

Definition at line 342 of file kuser_unix.cpp.

QList< KUserGroup > KUserGroup::allGroups ( )
static

Returns a list of all groups on this system.

Definition at line 329 of file kuser_unix.cpp.

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 304 of file kuser_unix.cpp.

QString KUserGroup::name ( ) const

The name of the group.

Returns
the name of the group

Definition at line 312 of file kuser_unix.cpp.

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 300 of file kuser_unix.cpp.

KUserGroup & KUserGroup::operator= ( const KUserGroup &  group)

Copies a group.

Parameters
groupthe group that should be copied
Returns
this group

Definition at line 291 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 296 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 320 of file kuser_unix.cpp.

QList< KUser > KUserGroup::users ( ) const

Returns a list of all users of the group.

Returns
a list of all users of the group

Definition at line 316 of file kuser_unix.cpp.


The documentation for this class was generated from the following files:
  • kuser.h
  • kuser_unix.cpp
  • kuser_win.cpp
  • kuser_wince.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal