KTnef::KTNEFPropertySet

Search for usage in LXR

KTnef::KTNEFPropertySet Class Reference

#include <ktnefpropertyset.h>

Inheritance diagram for KTnef::KTNEFPropertySet:

Public Member Functions

 KTNEFPropertySet ()
 
 ~KTNEFPropertySet ()
 
void addAttribute (int key, int type, const QVariant &value, bool overwrite=false)
 
void addProperty (int key, int type, const QVariant &value, const QVariant &name=QVariant(), bool overwrite=false)
 
QVariant attribute (int key) const
 
QMap< int, KTNEFProperty * > & attributes ()
 
const QMap< int, KTNEFProperty * > & attributes () const
 
void clear (bool deleteAll=false)
 
QString findNamedProp (const QString &name, const QString &fallback=QString(), bool convertToUpper=false) const
 
QString findProp (int key, const QString &fallback=QString(), bool convertToUpper=false) const
 
QMap< int, KTNEFProperty * > & properties ()
 
const QMap< int, KTNEFProperty * > & properties () const
 
QVariant property (int key) const
 

Detailed Description

Interface for setting MAPI properties and TNEF attributes.

Definition at line 36 of file ktnefpropertyset.h.

Constructor & Destructor Documentation

◆ KTNEFPropertySet()

KTNEFPropertySet::KTNEFPropertySet ( )

Constructor.

Definition at line 32 of file ktnefpropertyset.cpp.

◆ ~KTNEFPropertySet()

KTNEFPropertySet::~KTNEFPropertySet ( )

Destructor.

Definition at line 37 of file ktnefpropertyset.cpp.

Member Function Documentation

◆ addAttribute()

void KTNEFPropertySet::addAttribute ( int key,
int type,
const QVariant & value,
bool overwrite = false )

Adds a TNEF attribute.

Parameters
keyis the attribute key.
typeis the attribute type.
valueis the attribute value.
overwriteif true, then remove the attribute if it already exists.

Definition at line 132 of file ktnefpropertyset.cpp.

◆ addProperty()

void KTNEFPropertySet::addProperty ( int key,
int type,
const QVariant & value,
const QVariant & name = QVariant(),
bool overwrite = false )

Adds a MAPI property.

Parameters
keyis the property key.
typeis the property type.
valueis the property value.
nameis the property name.
overwriteif true, then remove the property if it already exists.

Definition at line 42 of file ktnefpropertyset.cpp.

◆ attribute()

QVariant KTNEFPropertySet::attribute ( int key) const
nodiscard

Returns the attribute associated with the specified key.

Parameters
keyis the TNEF key.
Returns
the attribute associated with the key.

Definition at line 156 of file ktnefpropertyset.cpp.

◆ attributes() [1/2]

QMap< int, KTNEFProperty * > & KTNEFPropertySet::attributes ( )
nodiscard

Returns a QMap of all (key,TNEF) attributes.

Definition at line 146 of file ktnefpropertyset.cpp.

◆ attributes() [2/2]

const QMap< int, KTNEFProperty * > & KTNEFPropertySet::attributes ( ) const

Returns a QMap of all (key,TNEF) attributes.

Definition at line 151 of file ktnefpropertyset.cpp.

◆ clear()

void KTNEFPropertySet::clear ( bool deleteAll = false)

Clears the MAPI and TNEF maps.

Parameters
deleteAllif true, delete the map memory as well.

Definition at line 118 of file ktnefpropertyset.cpp.

◆ findNamedProp()

QString KTNEFPropertySet::findNamedProp ( const QString & name,
const QString & fallback = QString(),
bool convertToUpper = false ) const
nodiscard

Finds a property by name, returning a formatted value.

Parameters
nameis the property name.
fallbackis the fallback formatted value to use if the name is not found.
convertToUpperif true, then return the formatted value in all upper case characters.
Returns
a formatted value string.

Definition at line 66 of file ktnefpropertyset.cpp.

◆ findProp()

QString KTNEFPropertySet::findProp ( int key,
const QString & fallback = QString(),
bool convertToUpper = false ) const
nodiscard

Finds a property by key, returning a formatted value.

Parameters
keyis the property key.
fallbackis the fallback formatted value to use if the key is not found.
convertToUpperif true, then return the formatted value in all upper case characters.
Returns
a formatted value string.

Definition at line 56 of file ktnefpropertyset.cpp.

◆ properties() [1/2]

QMap< int, KTNEFProperty * > & KTNEFPropertySet::properties ( )

Returns a QMap of all (key,MAPI) properties.

Definition at line 98 of file ktnefpropertyset.cpp.

◆ properties() [2/2]

const QMap< int, KTNEFProperty * > & KTNEFPropertySet::properties ( ) const

Returns a QMap of all (key,MAPI) properties.

Definition at line 103 of file ktnefpropertyset.cpp.

◆ property()

QVariant KTNEFPropertySet::property ( int key) const
nodiscard

Returns the property associated with the specified key.

Parameters
keyis the property key.
Returns
the property.q

Definition at line 108 of file ktnefpropertyset.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 Mon Nov 18 2024 12:13:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.