akonadi
#include <incidencemimetypevisitor.h>
Inherits KCal::IncidenceBase::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::FreeBusy *freebusy) |
virtual bool | visit (KCal::Journal *journal) |
virtual bool | visit (KCal::Todo *todo) |
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::IncidenceMimeTypeVisitor | ( | ) |
Creates a visitor instance.
Until its first visit mimeType() will return QString()
Definition at line 39 of file incidencemimetypevisitor.cpp.
◆ ~IncidenceMimeTypeVisitor()
|
virtual |
Destroys the instance.
Definition at line 44 of file incidencemimetypevisitor.cpp.
Member Function Documentation
◆ allMimeTypes()
QStringList IncidenceMimeTypeVisitor::allMimeTypes | ( | ) | const |
Returns a list of all calendar component sub MIME types.
Definition at line 82 of file incidencemimetypevisitor.cpp.
◆ eventMimeType()
|
static |
Returns the sub MIME type for Events.
Definition at line 95 of file incidencemimetypevisitor.cpp.
◆ freeBusyMimeType()
|
static |
Returns the sub MIME type for FreeBusys.
Definition at line 110 of file incidencemimetypevisitor.cpp.
◆ journalMimeType()
|
static |
Returns the sub MIME type for Journals.
Definition at line 105 of file incidencemimetypevisitor.cpp.
◆ mimeType() [1/2]
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 77 of file incidencemimetypevisitor.cpp.
◆ mimeType() [2/2]
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 87 of file incidencemimetypevisitor.cpp.
◆ todoMimeType()
|
static |
Returns the sub MIME type for Todos.
Definition at line 100 of file incidencemimetypevisitor.cpp.
◆ visit() [1/4]
|
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 49 of file incidencemimetypevisitor.cpp.
◆ visit() [2/4]
|
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 70 of file incidencemimetypevisitor.cpp.
◆ visit() [3/4]
|
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 63 of file incidencemimetypevisitor.cpp.
◆ visit() [4/4]
|
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 56 of file incidencemimetypevisitor.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.