KCalendarCore::Person
#include <person.h>
Public Types | |
typedef QList< Person > | List |
Properties | |
QString | |
QString | fullName |
bool | isEmpty |
QString | name |
Public Member Functions | |
Person () | |
Person (const Person &person) | |
Person (const QString &name, const QString &email) | |
virtual | ~Person () |
QString | email () const |
QString | fullName () const |
bool | isEmpty () const |
QString | name () const |
bool | operator!= (const Person &person) const |
Person & | operator= (const Person &person) |
bool | operator== (const Person &person) const |
void | setEmail (const QString &email) |
void | setName (const QString &name) |
Static Public Member Functions | |
static Person | fromFullName (const QString &fullName) |
static bool | isValidEmail (const QString &email) |
Detailed Description
Represents a person, by name and email address.
This class represents a person, with a name and an email address. It supports the "FirstName LastName\ <mail@domain\>" format.
Member Typedef Documentation
◆ List
Property Documentation
◆ fullName
◆ isEmpty
◆ name
Constructor & Destructor Documentation
◆ Person() [1/3]
Person::Person | ( | ) |
Constructs a blank person.
Private class that helps to provide binary compatibility between releases.
Definition at line 44 of file person.cpp.
◆ Person() [2/3]
Constructs a person with the name name
and email address email
.
- Parameters
-
name is the name of this person. email is the email address of this person.
Definition at line 49 of file person.cpp.
◆ Person() [3/3]
Person::Person | ( | const Person & | person | ) |
Constructs a person as a copy of another person object.
- Parameters
-
person is the person to copy.
Definition at line 56 of file person.cpp.
◆ ~Person()
|
virtualdefault |
Destroys a person.
Member Function Documentation
◆ email()
QString Person::email | ( | ) | const |
Returns the email address for this person.
- Returns
- A QString containing the person's email address.
- See also
- setEmail()
Definition at line 117 of file person.cpp.
◆ fromFullName()
Constructs a person with name and email address taken from fullName
.
- Parameters
-
fullName is the name and email of the person in the form "FirstName LastName \<mail@domain\>".
- Returns
- A Person object.
Definition at line 362 of file person.cpp.
◆ fullName()
QString Person::fullName | ( | ) | const |
Returns the full name of this person.
- Returns
- A QString containing the person's full name in the form "FirstName LastName \<mail@domain\>".
Definition at line 107 of file person.cpp.
◆ isEmpty()
bool Person::isEmpty | ( | ) | const |
Returns true if the person name and email address are empty.
Definition at line 122 of file person.cpp.
◆ isValidEmail()
|
static |
Returns true if person's email address is valid.
Simple email validity check, test that there: is at least one @ is at least one character in the local part is at least one dot in the domain part is at least four characters in the domain (assuming that no-one has an address at the tld, that the tld is at least 2 chars)
- Parameters
-
email is the email address to validate
Definition at line 141 of file person.cpp.
◆ name()
QString Person::name | ( | ) | const |
◆ operator!=()
bool KCalendarCore::Person::operator!= | ( | const Person & | person | ) | const |
Compares this with person
for non-equality.
- Parameters
-
person is the person to compare.
Definition at line 68 of file person.cpp.
◆ operator=()
Sets this person equal to person
.
- Parameters
-
person is the person to copy.
Definition at line 73 of file person.cpp.
◆ operator==()
bool KCalendarCore::Person::operator== | ( | const Person & | person | ) | const |
Compares this with person
for equality.
- Parameters
-
person is the person to compare.
Definition at line 63 of file person.cpp.
◆ setEmail()
void Person::setEmail | ( | const QString & | ) |
Sets the email address for this person to email
.
- Parameters
-
email is the email address for this person.
- See also
- email()
Definition at line 132 of file person.cpp.
◆ setName()
void Person::setName | ( | const QString & | name | ) |
Sets the name of the person to name
.
- Parameters
-
name is the name of this person.
- See also
- name()
Definition at line 127 of file person.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:15:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.