CalendarEvent

Since: BlackBerry 10.0.0

#include <bb/pim/calendar/CalendarEvent>

To link against this class, add the following line to your .pro file: LIBS += -lbbpim

The CalendarEvent class represents an event or meeting in a user's calendar.

This class includes event-related information such as start and end time, location, recurrence, and attendees. You can call CalendarService::events() to retrieve the list of events, each of which is represented by a CalendarEvent object. The attributes of each CalendarEvent are populated according to the detail level that you provide in the EventSearchParameters argument:
  • Monthly level: accountId, allDay, busyStatus, endTime, folderId, id, parentId, and startTime

  • Weekly level: all the attributes in the monthly level plus birthday and subject

  • Full level: all the attributes in the weekly level plus attendees, bbmConference, body, guid, location, meetingSequence, meetingStatus, recurrence, reminder, sensitivity, timezone, and url

  • Agenda level: all the attributes in the weekly level plus bbmConference, guid, location, meetingSequence, meetingStatus, recurrence, reminder, sensitivity, timezone, and url

A CalendarEvent is not automatically updated when a synchronization service in the back-end changes the information in the calendar database. You should connect a QObject with the appropriate slots to the signals in CalendarService to be notified of an update and request a new copy of the event when needed.

When you change the attribute of a CalendarEvent, this change does not automatically modify the event in the calendar database. To update the database, you should call CalendarService::updateEvent() and pass the event as an argument.

See also:

CalendarService


Overview

Public Functions Index

CalendarEvent ()
CalendarEvent (const CalendarEvent &other)
~CalendarEvent ()
AccountIdaccountId () const
voidaddAttendee (const Attendee &attendee)
QList< Attendee >attendees () const
BbmConferencebbmConference () const
QStringbody () const
BusyStatus::TypebusyStatus () const
QList< QString >categories () const
QStringdelegator () const
QDateTimeendTime () const
FolderIdfolderId () const
QStringguid () const
ICalendarDataiCalendarData () const
EventIdid () const
BusyStatus::TypeintendedStatus () const
boolisAllDay () const
boolisBirthday () const
boolisMeetingRequest () const
boolisValid () const
EventLocationlocation () const
intmeetingStatus () const
OnlineConferenceDataonlineConferenceData () const
CalendarEvent &operator= (const CalendarEvent &other)
QDateTimeoriginalStartTime () const
AttendeeStatus::TypeownerStatus () const
EventIdparentId () const
Recurrencerecurrence () const
intreminder () const
voidresetAttendees ()
Sensitivity::Typesensitivity () const
intsequence () const
voidsetAccountId (AccountId accountId)
voidsetAllDay (bool allDay)
voidsetAttendees (const QList< Attendee > &attendees)
voidsetBbmConference (const BbmConference &bbmConference)
voidsetBirthday (bool birthday)
voidsetBody (const QString &body)
voidsetBusyStatus (BusyStatus::Type busyStatus)
voidsetDelegator (const QString &delegator)
voidsetEndTime (const QDateTime &endTime)
voidsetFolderId (FolderId folderId)
voidsetGuid (const QString &guid)
voidsetICalendarData (const ICalendarData &iCalendarData)
voidsetId (EventId id)
voidsetIntendedStatus (BusyStatus::Type busyStatus)
voidsetIsMeetingRequest (bool isMeetingRequest)
voidsetLocation (const EventLocation &location)
voidsetMeetingStatus (int meetingStatus)
voidsetOnlineConferenceData (const OnlineConferenceData &onlineConferenceData)
voidsetOriginalStartTime (const QDateTime &originalStartTime)
voidsetOwnerStatus (AttendeeStatus::Type ownerStatus)
voidsetParentId (EventId parentId)
voidsetRecurrence (const Recurrence &recurrence)
voidsetReminder (int reminder)
voidsetSensitivity (Sensitivity::Type sensitivity)
voidsetSequence (int sequence)
voidsetStartTime (const QDateTime &startTime)
voidsetSubject (const QString &subject)
voidsetTimezone (const QString &timezone)
voidsetUrl (const QString &url)
QDateTimestartTime () const
QStringsubject () const
QStringtimezone () const
QStringurl () const

Public Functions

CalendarEvent ()

Constructs a new CalendarEvent.

Since:

BlackBerry 10.0.0

CalendarEvent (

Copy constructor.

This function constructs a CalendarEvent containing exactly the same values as the provided CalendarEvent.

Parameters
other

The CalendarEvent to be copied.

Since:

BlackBerry 10.0.0

~CalendarEvent ()

Destructor.

Since:

BlackBerry 10.0.0

AccountId accountId ()

Retrieves the account ID of this CalendarEvent.

This function returns the identifier for the account that owns the event.

Return:

The account ID of this CalendarEvent.

Since:

BlackBerry 10.0.0

void addAttendee (

Adds an attendee to this CalendarEvent.

This function appends an Attendee object to the list of attendees for this event.

Parameters
attendee

The Attendee object to add.

Since:

BlackBerry 10.0.0

QList< Attendee > attendees ()

Retrieves the list of participants for this CalendarEvent.

This function returns a list of people who are attending the event. Each participant is represented by an Attendee object.

Return:

The list of participants for this CalendarEvent.

Since:

BlackBerry 10.0.0

BbmConference bbmConference ()

Retrieves the BBM conference data for this CalendarEvent.

This function returns the BBM conference data that's associated with this event. This data includes information such as available phone numbers, participant code, and so on.

Return:

The BBM conference data for this CalendarEvent.

Since:

BlackBerry 10.0.0

QString body ()

Retrieves the body of this CalendarEvent.

This function returns the contents of the text field that contains details for the event.

Return:

The body of this CalendarEvent.

Since:

BlackBerry 10.0.0

BusyStatus::Type busyStatus ()

Retrieves the busy status of this CalendarEvent.

This function indicates whether the event represents free time, tentative time (the user might be present or not), busy time, or time out of the office.

Return:

The busy status of this CalendarEvent.

Since:

BlackBerry 10.0.0

QList< QString > categories ()

Retrieves the categories of this CalendarEvent.

Return:

The list of categories that are associated to this CalendarEvent. There may be zero, one or more categories that can be associated to an event.

Since:

BlackBerry 10.3.0

QString delegator ()

Retrieves the delegator of this CalendarEvent.

Return:

The delegator of this CalendarEvent. It could be the delegator's email or a non-empty string.

Since:

BlackBerry 10.2.0

QDateTime endTime ()

Retrieves the end time of this CalendarEvent.

This function returns the date and time when the event ends, in the local time zone (the system's time zone). This value should be greater than (that is, occur after) the start time.

Return:

The end time of this CalendarEvent.

Since:

BlackBerry 10.0.0

FolderId folderId ()

Retrieves the folder of this CalendarEvent.

This function returns the identifier for the folder that contains the event. A folder represents a specific calendar on the device.

Return:

The folder of this CalendarEvent.

Since:

BlackBerry 10.0.0

QString guid ()

Retrieves the globally unique ID of this CalendarEvent.

This ID is used by remote servers to uniquely identify the event.

Return:

The globally unique ID of this CalendarEvent.

Since:

BlackBerry 10.0.0

ICalendarData iCalendarData ()

Retrieves the iCalendar data for this CalendarEvent.

This function returns additional data that's available in events that are created from iCalendar attachments.

Return:

The iCalendar data for this CalendarEvent.

Since:

BlackBerry 10.0.0

EventId id ()

Retrieves the ID of this CalendarEvent.

The ID uniquely identifies a CalendarEvent in the database.

Return:

The ID of this CalendarEvent.

Since:

BlackBerry 10.0.0

BusyStatus::Type intendedStatus ()

Retrieves the intended status of this CalendarEvent.

The intended status represents the creation busy status of the event.

Return:

The intended status of this CalendarEvent.

Since:

BlackBerry 10.1.0

bool isAllDay ()

Indicates whether this CalendarEvent is an all-day event.

Return:

True if this event is an all-day event, false otherwise.

Since:

BlackBerry 10.0.0

bool isBirthday ()

Indicates whether this CalendarEvent represents a birthday.

Return:

True if this event represents a birthday, false otherwise.

Since:

BlackBerry 10.0.0

bool isMeetingRequest ()

Retrieves whether this CalendarEvent is a valid meeting request or not.

This function returns whether this is a valid meeting request or not. This is supported in ActiveSync.

Return:

True if this is a valid meeting request, false otherwise.

Since:

BlackBerry 10.2.0

bool isValid ()

Indicates whether this CalendarEvent is valid.

This function determines whether the attributes of this CalendarEvent object have acceptable values.

Return:

True if this CalendarEvent is valid, false otherwise.

Since:

BlackBerry 10.0.0

EventLocation location ()

Retrieves the location of this CalendarEvent.

This function returns a string that indicates where the event happened or will happen.

Return:

The location of this CalendarEvent.

Since:

BlackBerry 10.0.0

int meetingStatus ()

Retrieves the meeting status of this CalendarEvent.

Possible return values for this function are:
  • 0: not a meeting

  • 1 and 9: is a meeting

  • 3 and 11: meeting received

  • 5 and 13: meeting is canceled

  • 7 and 15: meeting is canceled and received

Return:

The meeting status of this CalendarEvent.

Since:

BlackBerry 10.0.0

OnlineConferenceData onlineConferenceData ()

Retrieves the online conference data for this CalendarEvent.

This function returns the online conference data that's associated with this event.

Return:

The online conference data for this CalendarEvent.

Since:

BlackBerry 10.3.0

CalendarEvent & operator= (

Assignment operator.

This operator copies all values from the provided CalendarEvent into this CalendarEvent.

Parameters
other

The CalendarEvent from which to copy all values.

Return:

A reference to this CalendarEvent.

Since:

BlackBerry 10.0.0

QDateTime originalStartTime ()

Retrieves the original start time of this CalendarEvent.

This function returns the original start time from the CalendarEvent file.

Return:

The original start time of this CalendarEvent.

Since:

BlackBerry 10.2.0

AttendeeStatus::Type ownerStatus ()

Retrieves the owner status of this CalendarEvent.

The owner status represents owner's response to the meeting.

Return:

The owner status of this CalendarEvent.

Since:

BlackBerry 10.2.0

EventId parentId ()

Retrieves the parent ID of this CalendarEvent.

This attribute is only meaningful in events that are recurrence exceptions.

A recurrence exception is a differing instance of a recurring event. For example, a daily meeting at 2:00 PM is rescheduled to 3:00 PM on a given day. This rescheduled occurrence is represented as an exception. It is stored in the database as a separate event and it references the original recurring event by using the parent ID.

Return:

The parent ID of this CalendarEvent.

Since:

BlackBerry 10.0.0

Recurrence recurrence ()

Retrieves the recurrence rule for this CalendarEvent.

The recurrence rule defines how an event repeats. The information about the recurrence of an event, such as start and end time, frequency, days of the week, and so on, are included in the Recurrence class.

By default, an event is not recurrent (that is, event.recurrence().isValid() == false). The event becomes a recurring event when a call is made to the setRecurrence() function with a valid Recurrence object.

Return:

The recurrence rule for this CalendarEvent.

Since:

BlackBerry 10.0.0

int reminder ()

Retrieves the reminder time of this CalendarEvent.

A reminder is an alert shown by the system's notification manager before the event starts. This attribute determines the number of minutes between the alert and the start time of the event.

Return:

The reminder time of this CalendarEvent.

Since:

BlackBerry 10.0.0

void resetAttendees ()

Removes all attendees from this CalendarEvent.

Since:

BlackBerry 10.0.0

Sensitivity::Type sensitivity ()

Retrieves the sensitivity of this CalendarEvent.

This function indicates the degree of confidentiality for the event normal, personal, private, or confidential.

Return:

The sensitivity of this CalendarEvent.

Since:

BlackBerry 10.0.0

int sequence ()

Retrieves the sequence number of this CalendarEvent.

Return:

The sequence number of this CalendarEvent.

Since:

BlackBerry 10.0.0

void setAccountId (
  • AccountIdaccountId)

Sets the account ID for this CalendarEvent.

Parameters
accountId

The new account ID.

Since:

BlackBerry 10.0.0

void setAllDay (
  • boolallDay)

Sets whether this CalendarEvent is an all-day event.

Parameters
allDay

If true this event is an all-day event, if false this event is not an all-day event.

Since:

BlackBerry 10.0.0

void setAttendees (

Sets the list of attendees for this CalendarEvent.

This function clears the list of attendees for this CalendarEvent object and then populates it with attendees from the provided list.

Parameters
attendees

The list of attendees to set.

Since:

BlackBerry 10.0.0

void setBbmConference (

Sets the BBM conference that's associated with this CalendarEvent.

Parameters
bbmConference

The new BBM conference.

Since:

BlackBerry 10.0.0

void setBirthday (
  • boolbirthday)

Sets whether this CalendarEvent represents a birthday.

Parameters
birthday

If true this event represents a birthday, if false this event does not represent a birthday.

Since:

BlackBerry 10.0.0

void setBody (

Sets the body of this CalendarEvent.

Parameters
body

The new body.

Since:

BlackBerry 10.0.0

void setBusyStatus (

Sets the busy status for this CalendarEvent.

Parameters
busyStatus

The new busy status.

Since:

BlackBerry 10.0.0

void setDelegator (

Sets the delegator for this CalendarEvent.

Parameters
delegator

The delegator for this CalendarEvent.

Since:

BlackBerry 10.2.0

void setEndTime (

Sets the end time of this CalendarEvent.

The new end time should be greater than (that is, later than) the current start time.

Parameters
endTime

The new end time.

Since:

BlackBerry 10.0.0

void setFolderId (
  • FolderIdfolderId)

Sets the folder ID for this CalendarEvent.

Parameters
folderId

The new folder ID.

Since:

BlackBerry 10.0.0

void setGuid (

Sets the globally unique identifier of this CalendarEvent.

Parameters
guid

The new globally unique identifier.

Since:

BlackBerry 10.0.0

void setICalendarData (

Sets the iCalendar data that's associated with this CalendarEvent.

Parameters
iCalendarData

The new iCalendar data.

Since:

BlackBerry 10.0.0

void setId (
  • EventIdid)

Sets the event ID for this CalendarEvent.

Parameters
id

The new event ID.

Since:

BlackBerry 10.0.0

void setIntendedStatus (

Sets the intended status for this CalendarEvent.

Parameters
busyStatus

The new intended busy status.

Since:

BlackBerry 10.1.0

void setIsMeetingRequest (
  • boolisMeetingRequest)

Sets whether this CalendarEvent is a valid meeting request or not.

Parameters
isMeetingRequest

True if this is a valid meeting request, false otherwise.

Since:

BlackBerry 10.2.0

void setLocation (

Sets the location of this CalendarEvent.

Parameters
location

The new location.

Since:

BlackBerry 10.0.0

void setMeetingStatus (
  • intmeetingStatus)

Sets the meeting status of this CalendarEvent.

Parameters
meetingStatus

The new meeting status.

Since:

BlackBerry 10.0.0

void setOnlineConferenceData (

Sets the online conference data that's associated with this CalendarEvent.

Parameters
OnlineConference

The new online conference.

Since:

BlackBerry 10.3.0

void setOriginalStartTime (

Sets the original start time of this CalendarEvent.

Parameters
originalStartTime

The new original start time.

Since:

BlackBerry 10.2.0

void setOwnerStatus (

Sets the owner status for this CalendarEvent.

Parameters
ownerStatus

The new owner status.

Since:

BlackBerry 10.2.0

void setParentId (
  • EventIdparentId)

Sets the parent ID for this CalendarEvent.

Parameters
parentId

The new parent ID.

Since:

BlackBerry 10.0.0

void setRecurrence (

Sets the recurrence rule for this CalendarEvent.

Parameters
recurrence

The new recurrence rule.

Since:

BlackBerry 10.0.0

void setReminder (
  • intreminder)

Sets the reminder value of this CalendarEvent.

Parameters
reminder

The new reminder value.

Since:

BlackBerry 10.0.0

void setSensitivity (

Sets the sensitivity of this CalendarEvent.

Parameters
sensitivity

The new sensitivity.

Since:

BlackBerry 10.0.0

void setSequence (
  • intsequence)

Sets the sequence number of this CalendarEvent.

Parameters
sequence

The new sequence number.

Since:

BlackBerry 10.0.0

void setStartTime (

Sets the start time of this CalendarEvent.

Parameters
startTime

The new start time.

Since:

BlackBerry 10.0.0

void setSubject (

Sets the subject of this CalendarEvent.

Parameters
subject

The new subject.

Since:

BlackBerry 10.0.0

void setTimezone (

Sets the time zone of this CalendarEvent.

Parameters
timezone

The new time zone.

Since:

BlackBerry 10.0.0

void setUrl (

Sets the URL that's associated with this CalendarEvent.

Parameters
url

The new URL.

Since:

BlackBerry 10.0.0

QDateTime startTime ()

Retrieves the start time of this CalendarEvent.

This function returns the date and time when the event starts, in the local time zone (the system's time zone).

Return:

The start time of this CalendarEvent.

Since:

BlackBerry 10.0.0

QString subject ()

Retrieves the subject of this CalendarEvent.

This function returns the subject, or title, of the event.

Return:

The subject of this CalendarEvent.

Since:

BlackBerry 10.0.0

QString timezone ()

Retrieves the time zone of this CalendarEvent.

This function returns the name of the time zone where the event was created.

Return:

The time zone of this CalendarEvent.

Since:

BlackBerry 10.0.0

QString url ()

Retrieves the URL that's associated with this CalendarEvent.

Return:

The URL that's associated with this CalendarEvent.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus