• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

calendarsupport

  • CalendarSupport
  • IncidenceSearchJob
Public Types | Public Member Functions | List of all members
CalendarSupport::IncidenceSearchJob Class Reference

#include <incidencesearchjob.h>

Inherits ItemSearchJob.

Public Types

enum  Criterion { IncidenceUid }
 
enum  Match { ExactMatch, StartsWithMatch, ContainsMatch }
 

Public Member Functions

 IncidenceSearchJob (QObject *parent=0)
 
 ~IncidenceSearchJob ()
 
KCalCore::Incidence::List incidences () const
 
void setLimit (int limit)
 
void setQuery (Criterion criterion, const QString &value, Match match)
 

Detailed Description

Job that searches for calendar incidences in the Akonadi storage.

This job searches for calendar incidences (events, to-dos and journals) that match given search criteria and return the list of incidences.

Examples:

// Search all incidences with uid 1234
CalendarSupport::IncidenceSearchJob *job = new CalendarSupport::IncidenceSearchJob();
job->setQuery( CalendarSupport::IncidenceSearchJob::IncidenceUid, "1234",
CalendarSupport::IncidenceSearchJob::ExactMatch );
connect( job, SIGNAL( result( KJob* ) ), this, SLOT( searchResult( KJob* ) ) );
...
MyClass::searchResult( KJob *job )
{
CalendarSupport::IncidenceSearchJob *searchJob =
qobject_cast<CalendarSupport::IncidenceSearchJob*>( job );
const KCalCore::Incidence::List incidences = searchJob->incidences();
// do something with the incidences
}
// Search for all existing incidences
CalendarSupport::IncidenceSearchJob *job = new CalendarSupport::IncidenceSearchJob();
connect( job, SIGNAL( result( KJob* ) ), this, SLOT( searchResult( KJob* ) ) );
...
MyClass::searchResult( KJob *job )
{
CalendarSupport::IncidenceSearchJob *searchJob =
qobject_cast<CalendarSupport::IncidenceSearchJob*>( job );
const KCalCore::Incidence::List incidences = searchJob->incidences();
// do something with the incidences
}
Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org
Sérgio Martins iamse.nosp@m.rgio.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Since
4.6

Definition at line 85 of file incidencesearchjob.h.

Member Enumeration Documentation

enum CalendarSupport::IncidenceSearchJob::Criterion

Describes the criteria that can be searched for.

Enumerator
IncidenceUid 

The global unique identifier of the incidence.

Since
4.6

Definition at line 105 of file incidencesearchjob.h.

enum CalendarSupport::IncidenceSearchJob::Match

Describes the type of pattern matching that shall be used.

Since
4.6
Enumerator
ExactMatch 

The result must match exactly the pattern (case sensitive).

StartsWithMatch 

The result must start with the pattern (case insensitive).

ContainsMatch 

The result must contain the pattern (case insensitive).

Definition at line 114 of file incidencesearchjob.h.

Constructor & Destructor Documentation

IncidenceSearchJob::IncidenceSearchJob ( QObject *  parent = 0)
explicit

Creates a new incidence search job.

Parameters
parentThe parent object.

Definition at line 36 of file incidencesearchjob.cpp.

IncidenceSearchJob::~IncidenceSearchJob ( )

Destroys the incidence search job.

Definition at line 67 of file incidencesearchjob.cpp.

Member Function Documentation

KCalCore::Incidence::List IncidenceSearchJob::incidences ( ) const

Returns the incidences that matched the search criteria.

Definition at line 190 of file incidencesearchjob.cpp.

void IncidenceSearchJob::setLimit ( int  limit)

Sets a limit on how many results will be returned by this search job.

This is useful in situation where for example only the first search result is needed anyway, setting a limit of 1 here will greatly reduce the resource usage of Nepomuk during the search.

This needs to be called before calling setQuery() to have an effect. By default, the number of results is unlimited.

Definition at line 185 of file incidencesearchjob.cpp.

void IncidenceSearchJob::setQuery ( Criterion  criterion,
const QString &  value,
Match  match 
)

Sets the criterion and value for the search with match.

Since
4.6

Definition at line 72 of file incidencesearchjob.cpp.


The documentation for this class was generated from the following files:
  • incidencesearchjob.h
  • incidencesearchjob.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:54:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

calendarsupport

Skip menu "calendarsupport"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal