KContacts::Secrecy Class

class KContacts::Secrecy

Describes the confidentiality of an addressee. More...

Header: #include <KContacts/Secrecy>
CMake: find_package(KF6 REQUIRED COMPONENTS Contacts)
target_link_libraries(mytarget PRIVATE KF6::Contacts)

Public Types

enum Type { Public, Private, Confidential, Invalid }
TypeList

Public Functions

Secrecy(KContacts::Secrecy::Type type = Invalid)
bool isValid() const
void setType(KContacts::Secrecy::Type type)
QString toString() const
KContacts::Secrecy::Type type() const
bool operator!=(const KContacts::Secrecy &other) const
bool operator==(const KContacts::Secrecy &other) const

Static Public Members

QString typeLabel(KContacts::Secrecy::Type type)
KContacts::Secrecy::TypeList typeList()
QDataStream &operator<<(QDataStream &stream, const KContacts::Secrecy &secrecy)
QDataStream &operator>>(QDataStream &stream, KContacts::Secrecy &secrecy)

Detailed Description

Member Type Documentation

enum Secrecy::Type

Secrecy types

ConstantValueDescription
KContacts::Secrecy::Public0for public access
KContacts::Secrecy::Private1only private access
KContacts::Secrecy::Confidential2access for confidential persons
KContacts::Secrecy::Invalid3 

Secrecy::TypeList

List of secrecy types.

Member Function Documentation

Secrecy::Secrecy(KContacts::Secrecy::Type type = Invalid)

Creates a new secrecy of the given type.

type The secrecy type

bool Secrecy::isValid() const

Returns if the Secrecy object has a valid value.

void Secrecy::setType(KContacts::Secrecy::Type type)

Sets the type.

type The Type of secrecy

See also type().

QString Secrecy::toString() const

Returns a string representation of the secrecy.

KContacts::Secrecy::Type Secrecy::type() const

Returns the type.

See also setType().

[static] QString Secrecy::typeLabel(KContacts::Secrecy::Type type)

Returns a translated label for a given secrecy type.

[static] KContacts::Secrecy::TypeList Secrecy::typeList()

Returns a list of all available secrecy types.

bool Secrecy::operator!=(const KContacts::Secrecy &other) const

bool Secrecy::operator==(const KContacts::Secrecy &other) const

Related Non-Members

QDataStream &operator<<(QDataStream &stream, const KContacts::Secrecy &secrecy)

Serializes the secrecy object into the stream.

QDataStream &operator>>(QDataStream &stream, KContacts::Secrecy &secrecy)

Initializes the secrecy object from the stream.