CalendarEventPicker

Since: BlackBerry 10.0.0

#include <bb/cascades/pickers/CalendarEventPicker>

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

A picker for selecting a calendar event.

The CalendarEventPicker is a full-screen card that allows the user to select a calendar event.

When open() is called then one of the below scenarios will occur: canceled() signal will be emitted if the user has cancelled the selection error(bb::cascades::pickers::CalendarEventPickerError::Type error) signal will be emitted if an error occurs eventSelected(const QByteArray &vcsData) signal will be emitted if the user successfully selected an event.

Permissions that are required in the bar descriptor of the calling application:
Permissions:

access_pimdomain_calendars

The following example demonstrates how to create a CalendarEventPicker :
CalendarEventPicker *calendarEventPicker = new CalendarEventPicker();
QObject::connect(calendarEventPicker, SIGNAL(eventSelected(const QByteArray &)), this, SLOT(onEventSelected(const QByteArray &)));
QObject::connect(calendarEventPicker, SIGNAL(canceled()), this, SLOT(onCanceled()));
QObject::connect(calendarEventPicker, SIGNAL(error(bb::cascades::pickers::CalendarEventPickerError::Type)),
 this, SLOT(onError(bb::cascades::pickers::CalendarEventPickerError::Type)));
calendarEventPicker->open();


Overview

Public Functions Index

CalendarEventPicker (QObject *parent=0)
virtual ~CalendarEventPicker ()
Q_SLOT voidclose ()
Q_SLOT voidopen ()
Q_SLOT voidopen (bb::cascades::pickers::ICalendarConstants::Version iCalVersion)

Signals Index

voidcanceled ()
voiderror (bb::cascades::pickers::CalendarEventPickerError::Type error)
voideventSelected (const QByteArray &vcsData)

Public Functions

CalendarEventPicker (

Constructs a CalendarEventPicker.

Parameters
parent

The parent or 0. If not 0, the ownership of constructed CalendarEventPicker will be transferred to the parent.

Since:

BlackBerry 10.0.0

virtual~CalendarEventPicker ()

Destructor.

Since:

BlackBerry 10.0.0

Q_SLOT void close ()

Closes the picker.

Use this only when the user's input is no longer needed. Normally, the picker will close automatically as soon the user completes the selection.

Since:

BlackBerry 10.0.0

Q_SLOT void open ()

Opens the CalendarEventPicker.

This will display the CalendarEventPicker, allowing the user to perform the selection. Output is in iCal 1.0 format.

Since:

BlackBerry 10.0.0

Q_SLOT void open (

Opens the CalendarEventPicker.

This will display the CalendarEventPicker, allowing the user to perform the selection.

Parameters
iCalVersion

The version of the iCal file that the picker will output. Currently supports 1.0 (.vcs) and 2.0 (.ics)

Since:

BlackBerry 10.1.0

Signals

void canceled ()

Emitted when the cancel button is clicked in the CalendarEventPicker.

Since:

BlackBerry 10.0.0

void error (

Emitted when launching the picker fails.

Since:

BlackBerry 10.0.0

void eventSelected (

Emitted when an event is selected.

Parameters
vcsData

The QByteArray containing the vcs representation of the event.

Since:

BlackBerry 10.0.0

Last modified: 2013-12-21

comments powered by Disqus