akonadi
#include <incidencemimetypevisitor.h>
Inherits Visitor.
Public Member Functions | |
IncidenceMimeTypeVisitor () | |
virtual | ~IncidenceMimeTypeVisitor () |
QStringList | allMimeTypes () const |
QString | mimeType () const |
QString | mimeType (KCal::IncidenceBase *incidence) |
virtual bool | visit (KCal::Event *event) |
virtual bool | visit (KCal::Todo *todo) |
virtual bool | visit (KCal::Journal *journal) |
virtual bool | visit (KCal::FreeBusy *freebusy) |
Static Public Member Functions | |
static QString | eventMimeType () |
static QString | freeBusyMimeType () |
static QString | journalMimeType () |
static QString | todoMimeType () |
Detailed Description
Helper for getting the Akonadi specific sub MIME type of a KCal::IncidenceBase item, e.g.
getting "application/x-vnd.akonadi.calendar.event" for a KCal::Event.
Usage example: creating Akonadi items for a list of incidences
- Since
- 4.4
Definition at line 52 of file incidencemimetypevisitor.h.
Constructor & Destructor Documentation
IncidenceMimeTypeVisitor::IncidenceMimeTypeVisitor | ( | ) |
Creates a visitor instance.
Until its first visit mimeType() will return QString()
Definition at line 39 of file incidencemimetypevisitor.cpp.
|
virtual |
Destroys the instance.
Definition at line 43 of file incidencemimetypevisitor.cpp.
Member Function Documentation
QStringList IncidenceMimeTypeVisitor::allMimeTypes | ( | ) | const |
Returns a list of all calendar component sub MIME types.
Definition at line 81 of file incidencemimetypevisitor.cpp.
|
static |
Returns the sub MIME type for Events.
Definition at line 94 of file incidencemimetypevisitor.cpp.
|
static |
Returns the sub MIME type for FreeBusys.
Definition at line 109 of file incidencemimetypevisitor.cpp.
|
static |
Returns the sub MIME type for Journals.
Definition at line 104 of file incidencemimetypevisitor.cpp.
QString IncidenceMimeTypeVisitor::mimeType | ( | ) | const |
Returns the Akonadi specific text/calendar
sub MIME type of the last incidence visited by this instance.
- Returns
- One of the Akonadi sub MIME types for calendar components or
QString()
if no incidence visited yet
Definition at line 76 of file incidencemimetypevisitor.cpp.
QString IncidenceMimeTypeVisitor::mimeType | ( | KCal::IncidenceBase * | incidence | ) |
Returns the Akonadi specific text/calendar
sub MIME type of the given incidence
.
- Parameters
-
incidence the incidence to retrieve MIME type from This is a convenience method, equivalent to incidence->accept( visitor );return visitor.mimeType();
Definition at line 86 of file incidencemimetypevisitor.cpp.
|
static |
Returns the sub MIME type for Todos.
Definition at line 99 of file incidencemimetypevisitor.cpp.
|
virtual |
Sets the MIME type to "application/x-vnd.akonadi.calendar.event".
- Parameters
-
event The Event to visit. Not used since the MIME type does not depend on instance specific properties.
- Returns
- always returns
true
Definition at line 48 of file incidencemimetypevisitor.cpp.
|
virtual |
Sets the MIME type to "application/x-vnd.akonadi.calendar.todo".
- Parameters
-
todo The Todo to visit. Not used since the MIME type does not depend on instance specific properties.
- Returns
- always returns
true
Definition at line 55 of file incidencemimetypevisitor.cpp.
|
virtual |
Sets the MIME type to "application/x-vnd.akonadi.calendar.journal".
- Parameters
-
journal The Journal to visit. Not used since the MIME type does not depend on instance specific properties.
- Returns
- always returns
true
Definition at line 62 of file incidencemimetypevisitor.cpp.
|
virtual |
Sets the MIME type to "application/x-vnd.akonadi.calendar.freebusy".
- Parameters
-
freebusy The FreeBusy to visit. Not used since the MIME type does not depend on instance specific properties.
- Returns
- always returns
true
Definition at line 69 of file incidencemimetypevisitor.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.