• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KCalCore Library

  • KCalCore
  • CustomProperties
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
KCalCore::CustomProperties Class Reference

#include <customproperties.h>

Inheritance diagram for KCalCore::CustomProperties:
KCalCore::Alarm KCalCore::Calendar KCalCore::IncidenceBase KCalCore::MemoryCalendar KCalCore::FreeBusy KCalCore::Incidence KCalCore::Event KCalCore::Journal KCalCore::Todo

List of all members.

Public Member Functions

 CustomProperties ()
 CustomProperties (const CustomProperties &other)
virtual ~CustomProperties ()
QMap< QByteArray, QString > customProperties () const
QString customProperty (const QByteArray &app, const QByteArray &key) const
QString nonKDECustomProperty (const QByteArray &name) const
QString nonKDECustomPropertyParameters (const QByteArray &name) const
CustomProperties & operator= (const CustomProperties &other)
bool operator== (const CustomProperties &properties) const
void removeCustomProperty (const QByteArray &app, const QByteArray &key)
void removeNonKDECustomProperty (const QByteArray &name)
void setCustomProperties (const QMap< QByteArray, QString > &properties)
void setCustomProperty (const QByteArray &app, const QByteArray &key, const QString &value)
void setNonKDECustomProperty (const QByteArray &name, const QString &value, const QString &parameters=QString())

Static Public Member Functions

static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)

Protected Member Functions

virtual void customPropertyUpdate ()
virtual void customPropertyUpdated ()
virtual void virtual_hook (int id, void *data)

Friends

KCALCORE_EXPORT QDataStream & operator<< (QDataStream &s, const KCalCore::CustomProperties &properties)
KCALCORE_EXPORT QDataStream & operator>> (QDataStream &s, KCalCore::CustomProperties &properties)

Detailed Description

A class to manage custom calendar properties.

This class represents custom calendar properties. It is used as a base class for classes which represent calendar components. A custom property name written by the kcalcore library has the form X-KDE-APP-KEY where APP represents the application name, and KEY distinguishes individual properties for the application. In keeping with RFC2445, property names must be composed only of the characters A-Z, a-z, 0-9 and '-'.

Definition at line 51 of file customproperties.h.


Constructor & Destructor Documentation

CustomProperties::CustomProperties ( )

Constructs an empty custom properties instance.

Definition at line 74 of file customproperties.cpp.

CustomProperties::CustomProperties ( const CustomProperties &  other)

Copy constructor.

Parameters:
otheris the one to copy.

Definition at line 79 of file customproperties.cpp.

CustomProperties::~CustomProperties ( )
virtual

Destructor.

Definition at line 95 of file customproperties.cpp.


Member Function Documentation

QMap< QByteArray, QString > CustomProperties::customProperties ( ) const

Returns all custom calendar property key/value pairs.

See also:
setCustomProperties().

Definition at line 189 of file customproperties.cpp.

QString CustomProperties::customProperty ( const QByteArray &  app,
const QByteArray &  key 
) const

Return the value of a custom calendar property.

Parameters:
appApplication name as it appears in the custom property name.
keyProperty identifier specific to the application.
Returns:
Property value, or QString() if (and only if) the property does not exist.

Definition at line 125 of file customproperties.cpp.

QByteArray CustomProperties::customPropertyName ( const QByteArray &  app,
const QByteArray &  key 
)
static

Validate and return the full name of a custom calendar property.

Parameters:
appApplication name as it appears in the custom property name.
keyProperty identifier specific to the application.
Returns:
Full property name, or empty string if it would contain invalid characters

Definition at line 130 of file customproperties.cpp.

void CustomProperties::customPropertyUpdate ( )
protectedvirtual

Called before a custom property will be changed.

The default implementation does nothing: override in derived classes to perform change processing.

Reimplemented in KCalCore::IncidenceBase.

Definition at line 194 of file customproperties.cpp.

void CustomProperties::customPropertyUpdated ( )
protectedvirtual

Called when a custom property has been changed.

The default implementation does nothing: override in derived classes to perform change processing.

Reimplemented in KCalCore::Calendar, KCalCore::IncidenceBase, and KCalCore::Alarm.

Definition at line 198 of file customproperties.cpp.

QString CustomProperties::nonKDECustomProperty ( const QByteArray &  name) const

Return the value of a non-KDE or non-standard custom calendar property.

Parameters:
nameFull property name
Returns:
Property value, or QString() if (and only if) the property does not exist.

Definition at line 160 of file customproperties.cpp.

QString CustomProperties::nonKDECustomPropertyParameters ( const QByteArray &  name) const

Return the parameters of a non-KDE or non-standard custom calendar property.

Parameters:
nameFull property name
Returns:
The parameters for the given property. Empty string is returned if none are set.

Definition at line 165 of file customproperties.cpp.

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

Assignment operator.

Warning:
The assignment is not polymorphic.
Parameters:
otheris the CustomProperty to assign.

Definition at line 84 of file customproperties.cpp.

bool CustomProperties::operator== ( const CustomProperties &  properties) const

Compare this with properties for equality.

Parameters:
propertiesis the one to compare.
Warning:
The comparison is not polymorphic.

Definition at line 100 of file customproperties.cpp.

void CustomProperties::removeCustomProperty ( const QByteArray &  app,
const QByteArray &  key 
)

Delete a custom calendar property.

Parameters:
appApplication name as it appears in the custom property name.
keyProperty identifier specific to the application.
See also:
setCustomProperty().

Definition at line 120 of file customproperties.cpp.

void CustomProperties::removeNonKDECustomProperty ( const QByteArray &  name)

Delete a non-KDE or non-standard custom calendar property.

Parameters:
nameFull property name
See also:
setNonKDECustomProperty().

Definition at line 150 of file customproperties.cpp.

void CustomProperties::setCustomProperties ( const QMap< QByteArray, QString > &  properties)

Initialise the alarm's custom calendar properties to the specified key/value pairs.

Parameters:
propertiesis a QMap of property key/value pairs.
See also:
customProperties().

Definition at line 170 of file customproperties.cpp.

void CustomProperties::setCustomProperty ( const QByteArray &  app,
const QByteArray &  key,
const QString &  value 
)

Create or modify a custom calendar property.

Parameters:
appApplication name as it appears in the custom property name.
keyProperty identifier specific to the application.
valueThe property's value. A call with a value of QString() will be ignored.
See also:
removeCustomProperty().

Definition at line 105 of file customproperties.cpp.

void CustomProperties::setNonKDECustomProperty ( const QByteArray &  name,
const QString &  value,
const QString &  parameters = QString() 
)

Create or modify a non-KDE or non-standard custom calendar property.

Parameters:
nameFull property name
valueThe property's value. A call with a value of QString() will be ignored.
parametersThe formatted list of parameters for the property. They should be formatted as RFC specifies, that is, KEY=VALUE;KEY2=VALUE2. We're mostly concerned about passing them through as-is albeit they can be of course parsed if need be.
See also:
removeNonKDECustomProperty().

Definition at line 139 of file customproperties.cpp.

void CustomProperties::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Parameters:
idis any integer unique to this class which we will use to identify the method to be called.
datais a pointer to some glob of data, typically a struct.

Reimplemented in KCalCore::Calendar, KCalCore::IncidenceBase, KCalCore::Alarm, KCalCore::MemoryCalendar, KCalCore::Todo, KCalCore::FreeBusy, KCalCore::Event, and KCalCore::Journal.

Definition at line 202 of file customproperties.cpp.


Friends And Related Function Documentation

KCALCORE_EXPORT QDataStream& operator<< ( QDataStream &  s,
const KCalCore::CustomProperties &  properties 
)
friend

Serializes the properties object into the stream.

KCALCORE_EXPORT QDataStream& operator>> ( QDataStream &  s,
KCalCore::CustomProperties &  properties 
)
friend

Initializes the properties object from the stream.


The documentation for this class was generated from the following files:
  • customproperties.h
  • customproperties.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 19:19:48 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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