KAlarmCal::KACalendar

KAlarmCal::KACalendar Namespace Reference

Typedefs

typedef QFlags< CompatibilityCompat
 

Enumerations

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

Functions

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

Variables

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).

Author
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.

Enumerator
CurrentFormat 

current KAlarm format

MixedFormat 

calendar may contain more than one version

IncompatibleFormat 

not written by KAlarm, or a newer KAlarm version

Definition at line 65 of file kacalendar.h.

Compatibility of resource backend calendar format.

Enumerator
Unknown 

format not determined

Current 

in current KAlarm format

Converted 

in current KAlarm format, but not yet saved

Convertible 

in an older KAlarm format

Incompatible 

not written by KAlarm, or in a newer KAlarm version

Definition at line 53 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.

Parameters
fileStoragecalendar stored in local file
versionStringreceives calendar's KAlarm version as a string
Returns
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 96 of file kacalendar.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:11:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.