KContacts::Key

Search for usage in LXR

#include <key.h>

Public Types

typedef QList< KeyList
 
enum  Type { X509 , PGP , Custom }
 
typedef QList< TypeTypeList
 

Public Member Functions

 Key (const Key &other)
 
 Key (const QString &text=QString(), Type type=PGP)
 
 ~Key ()
 
QByteArray binaryData () const
 
QString customTypeString () const
 
QString id () const
 
bool isBinary () const
 
bool operator!= (const Key &other) const
 
Keyoperator= (const Key &other)
 
bool operator== (const Key &other) const
 
void setBinaryData (const QByteArray &data)
 
void setCustomTypeString (const QString &type)
 
void setId (const QString &identifier)
 
void setTextData (const QString &data)
 
void setType (Type type)
 
QString textData () const
 
QString toString () const
 
Type type () const
 

Static Public Member Functions

static QString typeLabel (Type type)
 
static TypeList typeList ()
 

Detailed Description

A class to store an encryption key.

Definition at line 21 of file key.h.

Member Typedef Documentation

◆ List

List of keys.

Definition at line 30 of file key.h.

◆ TypeList

List of key types.

Definition at line 44 of file key.h.

Member Enumeration Documentation

◆ Type

Key types.

Enumerator
X509 

X509 key.

PGP 

Pretty Good Privacy key.

Custom 

Custom or IANA conform key.

Definition at line 35 of file key.h.

Constructor & Destructor Documentation

◆ Key() [1/2]

Key::Key ( const QString & text = QString(),
Type type = PGP )
explicit

Creates a new key.

Parameters
textThe text data.
typeThe key type, see Types.

Definition at line 45 of file key.cpp.

◆ Key() [2/2]

Key::Key ( const Key & other)

Copy constructor.

Definition at line 53 of file key.cpp.

◆ ~Key()

Key::~Key ( )

Destroys the key.

Definition at line 58 of file key.cpp.

Member Function Documentation

◆ binaryData()

QByteArray Key::binaryData ( ) const

Returns the binary data.

Definition at line 123 of file key.cpp.

◆ customTypeString()

QString Key::customTypeString ( ) const

Returns the custom type string.

Definition at line 159 of file key.cpp.

◆ id()

QString Key::id ( ) const

Returns the unique identifier.

Definition at line 112 of file key.cpp.

◆ isBinary()

bool Key::isBinary ( ) const

Returns whether the key contains binary or text data.

Definition at line 139 of file key.cpp.

◆ operator!=()

bool Key::operator!= ( const Key & other) const

Not-equal operator.

Definition at line 93 of file key.cpp.

◆ operator=()

Key & Key::operator= ( const Key & other)

Assignment operator.

Parameters
otherThe Key instance to assign to this

Definition at line 98 of file key.cpp.

◆ operator==()

bool Key::operator== ( const Key & other) const

Equality operator.

Definition at line 62 of file key.cpp.

◆ setBinaryData()

void Key::setBinaryData ( const QByteArray & data)

Sets binary data.

Definition at line 117 of file key.cpp.

◆ setCustomTypeString()

void Key::setCustomTypeString ( const QString & type)

Sets custom type string.

Definition at line 149 of file key.cpp.

◆ setId()

void Key::setId ( const QString & identifier)

Sets the unique identifier.

Definition at line 107 of file key.cpp.

◆ setTextData()

void Key::setTextData ( const QString & data)

Sets text data.

Definition at line 128 of file key.cpp.

◆ setType()

void Key::setType ( Type type)

Sets the type.

Parameters
typeThe type of the key
See also
Type

Definition at line 144 of file key.cpp.

◆ textData()

QString Key::textData ( ) const

Returns the text data.

Definition at line 134 of file key.cpp.

◆ toString()

QString Key::toString ( ) const

Returns a string representation of the key.

Definition at line 164 of file key.cpp.

◆ type()

Key::Type Key::type ( ) const

Returns the type, see Type.

Definition at line 154 of file key.cpp.

◆ typeLabel()

QString Key::typeLabel ( Type type)
static

Returns a translated label for a given key type.

Definition at line 194 of file key.cpp.

◆ typeList()

Key::TypeList Key::typeList ( )
static

Returns a list of all available key types.

Definition at line 183 of file key.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:08 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.