EventSearchParameters

Since: BlackBerry 10.0.0

#include <bb/pim/calendar/EventSearchParameters>

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

The EventSearchParameters class includes parameters for calendar event searches.

This class packages parameters that you can use to search for specific calendar events. For example, an EventSearchParameters object could contain information such as start time, end time, or even specific events to search for.

To search for specific events, you can call CalendarService::events() and pass as a parameter an EventSearchParameters object that contains information about the events that you want to search for. When you search for events using EventSearchParameters, you should provide at least the detail level, start time, and end time that you want to search for.

See also:

CalendarService


Overview

Public Functions Index

EventSearchParameters ()
EventSearchParameters (const EventSearchParameters &other)
~EventSearchParameters ()
voidaddEvent (const EventKey &event)
voidaddFolder (const FolderKey &folder)
QStringattendeePrefix () const
DetailLevel::Typedetails () const
QDateTimeend () const
QList< EventKey >events () const
QList< FolderKey >folders () const
boolisExpand () const
boolisValid () const
boolisVisibleOnlyEnabled () const
intlimit () const
QStringlocationPrefix () const
EventSearchParameters &operator= (const EventSearchParameters &other)
QStringprefix () const
voidresetEvents ()
voidresetFolders ()
voidsetAttendeePrefix (const QString &attendeePrefix)
voidsetDetails (DetailLevel::Type details)
voidsetEnd (const QDateTime &end)
voidsetEvents (const QList< EventKey > &events)
voidsetExpand (bool expand)
voidsetFolders (const QList< FolderKey > &folders)
voidsetLimit (int limit)
voidsetLocationPrefix (const QString &locationPrefix)
voidsetPrefix (const QString &prefix)
voidsetSort (QList< QPair< SortField::Type, bool > > sort)
voidsetSort (QPair< SortField::Type, bool > sort)
voidsetStart (const QDateTime &start)
voidsetSubjectPrefix (const QString &subjectPrefix)
voidsetVisibleOnlyEnabled (bool visibleOnly)
QList< QPair< SortField::Type, bool > >sort () const
QDateTimestart () const
QStringsubjectPrefix () const

Public Functions

EventSearchParameters ()

Constructs a new EventSearchParameters.

Since:

BlackBerry 10.0.0

EventSearchParameters (

Copy constructor.

This function constructs an EventSearchParameters containing exactly the same values as the provided EventSearchParameters.

Parameters
other

The EventSearchParameters to be copied.

Since:

BlackBerry 10.0.0

~EventSearchParameters ()

Destructor.

Since:

BlackBerry 10.0.0

void addEvent (

Adds an event key to this EventSearchParameters.

This function appends a new event key to the existing list of event keys for this EventSearchParameters.

Parameters
event

The event key to add.

Since:

BlackBerry 10.0.0

void addFolder (

Adds a folder key to this EventSearchParameters.

This function appends a new folder key to the existing list of folder keys for this EventSearchParameters.

Parameters
folder

The folder key to add.

Since:

BlackBerry 10.0.0

QString attendeePrefix ()

Retrieves the attendee prefix search parameter of this EventSearchParameters.

This function returns the string that's used in the prefix search on attendees.

Return:

The attendee prefix search parameter of this EventSearchParameters.

Since:

BlackBerry 10.3.0

DetailLevel::Type details ()

Retrieves the detail level of this EventSearchParameters.

The detail level controls the set of attributes in events that are populated when a search is performed.

The following levels are available:
  • Monthly: Events have accountId, allDay, busyStatus, endTime, folderId, id, parentId, and startTime.

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

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

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

  • WeeklyStatus: Events have all the attributes in the weekly level plus the response status of the owner

  • AgendaStatus: Events have all the attributes in the agenda level plus the reponse status of the owner

Search requests with lower detail levels are faster.

Return:

The detail level of this EventSearchParameters.

Since:

BlackBerry 10.0.0

QDateTime end ()

Retrieves the end time of this EventSearchParameters.

This function returns the end of the query's time range. Any event that crosses the range should be returned. The end time is considered to be in the local time zone (the system's time zone).

Return:

The end time of this EventSearchParameters.

Since:

BlackBerry 10.0.0

QList< EventKey > events ()

Retrieves the list of event keys for this EventSearchParameters.

An event key contains the primary key for an event in the database. When the list is non-empty, the search is performed directly for the events that have the provided keys.

Return:

The list of event keys for this EventSearchParameters.

Since:

BlackBerry 10.0.0

QList< FolderKey > folders ()

Retrieves the list of folder keys for this EventSearchParameters.

A folder key contains the primary key for a calendar folder in the database. When the list is non-empty, the search returns only events that belong to the provided folders.

Return:

The list of folder keys for this EventSearchParameters.

Since:

BlackBerry 10.0.0

bool isExpand ()

Indicates whether recurring events are expanded in the search results.

If recurring events are expanded, all occurrences of all events (including each occurrence of a recurring event) in the specified time range are returned.

Return:

true if recurring events are expanded, false otherwise.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether this EventSearchParameters is valid.

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

Return:

true if this EventSearchParameters is valid, false otherwise.

Since:

BlackBerry 10.0.0

bool isVisibleOnlyEnabled ()

Indicates if the visibleOnly filter is active.

The visibleOnly flag determines if the event search is done only in visible calendars or not.

Return:

True, if search is done only for visible calendars, or false otherwise

Since:

BlackBerry 10.2.0

int limit ()

Retrieves the limit for the number of search results.

This function returns the maximum number of returned events.

Return:

The limit for the number of results.

Since:

BlackBerry 10.0.0

QString locationPrefix ()

Retrieves the location prefix search parameter of this EventSearchParameters.

This function returns the string that's used in the prefix search on locations.

Return:

The location prefix search parameter of this EventSearchParameters.

Since:

BlackBerry 10.3.0

EventSearchParameters & operator= (

Assignment operator.

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

Parameters
other

The EventSearchParameters from which to copy all values.

Return:

A reference to this EventSearchParameters.

Since:

BlackBerry 10.0.0

QString prefix ()

Retrieves the prefix search parameter of this EventSearchParameters.

This function returns the string that's used in the prefix search. By setting the prefix, you can instruct the search to return only events whose subject or location fields start with the specified string. The search will also return events whose participants have names or emails starting with the given string.

Return:

The prefix search parameter of this EventSearchParameters.

Since:

BlackBerry 10.0.0

void resetEvents ()

Removes all of the event keys from this EventSearchParameters.

Since:

BlackBerry 10.0.0

void resetFolders ()

Removes all of the folder keys from this EventSearchParameters.

Since:

BlackBerry 10.0.0

void setAttendeePrefix (

Sets the attendee prefix search parameter of this EventSearchParameters.

Parameters
prefix

The new attendee prefix search parameter.

Since:

BlackBerry 10.3.0

void setDetails (

Sets the detail level of this EventSearchParameters.

Parameters
details

The new detail level.

Since:

BlackBerry 10.0.0

void setEnd (

Sets the end time of this EventSearchParameters.

Parameters
end

The new end time.

Since:

BlackBerry 10.0.0

void setEvents (

Sets the list of event keys for this EventSearchParameters.

This function replaces the current list of event keys with the provided list.

Parameters
events

The new list of event keys.

Since:

BlackBerry 10.0.0

void setExpand (
  • boolexpand)

Sets whether recurring events are expanded in the search results.

If recurring events are expanded, all occurrences of all events (including each occurrence of a recurring event) in the specified time range are returned.

Parameters
expand

If true recurring events are expanded, if false recurring events are not expanded.

Since:

BlackBerry 10.0.0

void setFolders (

Sets the list of folder keys for this EventSearchParameters.

This function replaces the current list of folder keys with the provided list.

Parameters
folders

The new list of folder keys.

Since:

BlackBerry 10.0.0

void setLimit (
  • intlimit)

Sets the limit for the number of search results.

Parameters
limit

The new limit for the number of search results.

Since:

BlackBerry 10.0.0

void setLocationPrefix (

Sets the location prefix search parameter of this EventSearchParameters.

Parameters
prefix

The new location prefix search parameter.

Since:

BlackBerry 10.3.0

void setPrefix (

Sets the prefix search parameter of this EventSearchParameters.

Parameters
prefix

The new prefix search parameter.

Since:

BlackBerry 10.0.0

void setSort (

Sets the sort parameters for this EventSearchParameters.

This function replaces the current list of sort parameters with the provided list.

Parameters
sort

The new list of sort parameters.

Since:

BlackBerry 10.0.0

void setSort (

Sets the sort parameter for this EventSearchParameters.

This function replaces the current list of sort parameters with the provided parameter.

Parameters
sort

The new sort parameter.

Since:

BlackBerry 10.0.0

void setStart (

Sets the start time of this EventSearchParameters.

Parameters
start

The new start time.

Since:

BlackBerry 10.0.0

void setSubjectPrefix (

Sets the subject prefix search parameter of this EventSearchParameters.

Parameters
prefix

The new subject prefix search parameter.

Since:

BlackBerry 10.3.0

void setVisibleOnlyEnabled (
  • boolvisibleOnly)

Sets the visibleOnly parameter for this EventSearchParameters.

The visibleOnly parameters allow to search events only through visible calendars

Return:

The list of event keys for this EventSearchParameters.

Since:

BlackBerry 10.2.0

QList< QPair< SortField::Type, bool > > sort ()

Retrieves the sort parameters of this EventSearchParameters.

This function specifies the attributes by which the returned events will be sorted and whether they will be in ascending or descending order for each attribute.

Return:

The sort parameters of this EventSearchParameters.

Since:

BlackBerry 10.0.0

QDateTime start ()

Retrieves the start time of this EventSearchParameters.

This function returns the start of the query's time range. All events that enter the range should be returned. The start time is considered to be in the local time zone (the system's time zone).

Return:

The start time of this EventSearchParameters.

Since:

BlackBerry 10.0.0

QString subjectPrefix ()

Retrieves the subject prefix search parameter of this EventSearchParameters.

This function returns the string that's used in the prefix search on subjects.

Return:

The subject prefix search parameter of this EventSearchParameters.

Since:

BlackBerry 10.3.0

Last modified: 2014-09-30



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

comments powered by Disqus