KAlarmCal::KACalendar Namespace Reference


typedef QFlags< CompatibilityCompat


enum  { CurrentFormat = 0, MixedFormat = -2, IncompatibleFormat = -1 }
enum  Compatibility {
  Unknown = 0, Current = 0x02, Converted = Current | 0x01, Convertible = 0x04,
  Incompatible = 0x08


QByteArray icalProductId ()
void setKAlarmVersion (const KCalendarCore::Calendar::Ptr &)
void setProductId (const QByteArray &progName, const QByteArray &progVersion)
int updateVersion (const KCalendarCore::FileStorage::Ptr &, QString &versionString)


const QByteArray APPNAME ("KALARM")

Detailed Description

Class representing attributes of a KAlarm calendar.

KACalendar provides methods to check and convert the KAlarm calendar format version, and to get and set the iCalendar product ID (which contains the identity of the application which wrote the calendar).

David Jarvie djarv[email protected][email protected][email protected]de.or[email protected]g

Enumeration Type Documentation

anonymous enum

Special calendar storage format version codes.

Positive version values are actual KAlarm format version numbers.


current KAlarm format


calendar may contain more than one version


not written by KAlarm, or a newer KAlarm version

Definition at line 64 of file kacalendar.h.

Compatibility of resource backend calendar format.


format not determined


in current KAlarm format


in current KAlarm format, but not yet saved


in an older KAlarm format


not written by KAlarm, or in a newer KAlarm version

Definition at line 52 of file kacalendar.h.

Function Documentation

KALARMCAL_EXPORT QByteArray KAlarmCal::KACalendar::icalProductId ( )

Return the product ID string for use in calendars.

setProductId() must have been called previously.

Definition at line 62 of file kacalendar.cpp.

KALARMCAL_EXPORT void KAlarmCal::KACalendar::setKAlarmVersion ( const KCalendarCore::Calendar::Ptr )

Set the KAlarm version custom property for a calendar.

Definition at line 70 of file kacalendar.cpp.

KALARMCAL_EXPORT void KAlarmCal::KACalendar::setProductId ( const QByteArray progName,
const QByteArray progVersion 

Set the program name and version for use in calendars.

Definition at line 57 of file kacalendar.cpp.

KALARMCAL_EXPORT int KAlarmCal::KACalendar::updateVersion ( const KCalendarCore::FileStorage::Ptr ,
QString versionString 

Check the version of KAlarm which wrote a calendar file, and convert it in memory to the current KAlarm format if possible.

The storage file is not updated. The compatibility of the calendar format is indicated by the return value.

fileStoragecalendar stored in local file
versionStringreceives calendar's KAlarm version as a string
CurrentFormat if the calendar is in the current KAlarm format; IncompatibleFormat calendar is not a KAlarm format or is an unknown KAlarm format; >0 the older KAlarm version which wrote the calendar

Definition at line 81 of file kacalendar.cpp.

Variable Documentation

const QByteArray KAlarmCal::KACalendar::APPNAME

The application name ("KALARM") used in calendar properties.

Definition at line 95 of file kacalendar.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jan 24 2022 23:02:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.