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

KCal Library

  • KCal
  • CalendarResources
Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KCal::CalendarResources Class Reference

#include <calendarresources.h>

Inheritance diagram for KCal::CalendarResources:
Inheritance graph
[legend]

Signals

void signalErrorMessage (const QString &err)
 
void signalResourceAdded (ResourceCalendar *resource)
 
void signalResourceDeleted (ResourceCalendar *resource)
 
void signalResourceModified (ResourceCalendar *resource)
 
- Signals inherited from KCal::Calendar
void batchAddingBegins ()
 
void batchAddingEnds ()
 
void calendarChanged ()
 
void calendarLoaded ()
 
void calendarSaved ()
 

Public Member Functions

 CalendarResources (const KDateTime::Spec &timeSpec, const QString &family=QLatin1String("calendar"))
 
 CalendarResources (const QString &timeZoneId, const QString &family=QLatin1String("calendar"))
 
 ~CalendarResources ()
 
bool addEvent (Event *event)
 
bool addEvent (Event *event, ResourceCalendar *resource)
 
bool addIncidence (Incidence *incidence)
 
bool addIncidence (Incidence *incidence, ResourceCalendar *resource)
 
bool addJournal (Journal *journal)
 
bool addJournal (Journal *journal, ResourceCalendar *resource)
 
bool addTodo (Todo *todo)
 
bool addTodo (Todo *todo, ResourceCalendar *resource)
 
Alarm::List alarms (const KDateTime &from, const KDateTime &to)
 
Alarm::List alarmsTo (const KDateTime &to)
 
bool beginChange (Incidence *incidence)
 
void clearException ()
 
void close ()
 
void deleteAllEvents ()
 
void deleteAllJournals ()
 
void deleteAllTodos ()
 
bool deleteEvent (Event *event)
 
bool deleteJournal (Journal *journal)
 
bool deleteTodo (Todo *todo)
 
QWidget * dialogParentWidget ()
 
bool endChange (Incidence *incidence)
 
Event * event (const QString &uid)
 
ErrorFormat * exception ()
 
bool hasCalendarResources ()
 
bool isSaving ()
 
Journal * journal (const QString &uid)
 
void load ()
 
Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Event::List rawEvents (const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false)
 
Event::List rawEventsForDate (const KDateTime &dt)
 
Event::List rawEventsForDate (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Journal::List rawJournalsForDate (const QDate &date)
 
Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Todo::List rawTodosForDate (const QDate &date)
 
void readConfig (KConfig *config=0)
 
virtual void releaseSaveTicket (Ticket *ticket)
 
bool reload ()
 
Ticket * requestSaveTicket (ResourceCalendar *resource)
 
ResourceCalendar * resource (Incidence *incidence)
 
void resourceAdded (ResourceCalendar *resource)
 
CalendarResourceManager * resourceManager () const
 
virtual bool save (Ticket *ticket, Incidence *incidence=0)
 
bool save ()
 
void setAskDestinationPolicy ()
 
void setDialogParentWidget (QWidget *parent)
 
void setStandardDestinationPolicy ()
 
Todo * todo (const QString &uid)
 
- Public Member Functions inherited from KCal::Calendar
 Calendar (const KDateTime::Spec &timeSpec)
 
 Calendar (const QString &timeZoneId)
 
virtual ~Calendar ()
 
void beginBatchAdding ()
 
QStringList categories ()
 
virtual bool deleteIncidence (Incidence *incidence)
 
Incidence * dissociateOccurrence (Incidence *incidence, const QDate &date, const KDateTime::Spec &spec, bool single=true)
 
void endBatchAdding ()
 
virtual Event::List events (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Event::List events (const KDateTime &dt)
 
Event::List events (const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false)
 
Event::List events (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
CalFilter * filter ()
 
Incidence * incidence (const QString &uid)
 
Incidence * incidenceFromSchedulingID (const QString &sid)
 
virtual Incidence::List incidences ()
 
virtual Incidence::List incidences (const QDate &date)
 
Incidence::List incidencesFromSchedulingID (const QString &sid)
 
bool isAncestorOf (Incidence *ancestor, Incidence *incidence)
 
bool isModified () const
 
virtual Journal::List journals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
virtual Journal::List journals (const QDate &date)
 
Person owner () const
 
QString productId () const
 
virtual Incidence::List rawIncidences ()
 
void registerObserver (CalendarObserver *observer)
 
virtual void removeRelations (Incidence *incidence)
 
void setFilter (CalFilter *filter)
 
void setModified (bool modified)
 
void setOwner (const Person &owner)
 
void setProductId (const QString &id)
 
void setTimeSpec (const KDateTime::Spec &timeSpec)
 
void setTimeZoneId (const QString &timeZoneId)
 
void setTimeZones (const ICalTimeZones &zones)
 
virtual void setupRelations (Incidence *incidence)
 
void setViewTimeSpec (const KDateTime::Spec &timeSpec) const
 
void setViewTimeZoneId (const QString &timeZoneId) const
 
void shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
 
KDateTime::Spec timeSpec () const
 
QString timeZoneId () const
 
ICalTimeZones * timeZones () const
 
virtual Todo::List todos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
virtual Todo::List todos (const QDate &date)
 
void unregisterObserver (CalendarObserver *observer)
 
KDateTime::Spec viewTimeSpec () const
 
QString viewTimeZoneId () const
 
- Public Member Functions inherited from KCal::CustomProperties
 CustomProperties ()
 
 CustomProperties (const CustomProperties &other)
 
virtual ~CustomProperties ()
 
QMap< QByteArray, QString > customProperties () const
 
QString customProperty (const QByteArray &app, const QByteArray &key) const
 
QString nonKDECustomProperty (const QByteArray &name) const
 
CustomProperties & operator= (const CustomProperties &other)
 
bool operator== (const CustomProperties &properties) const
 
void removeCustomProperty (const QByteArray &app, const QByteArray &key)
 
void removeNonKDECustomProperty (const QByteArray &name)
 
void setCustomProperties (const QMap< QByteArray, QString > &properties)
 
void setCustomProperty (const QByteArray &app, const QByteArray &key, const QString &value)
 
void setNonKDECustomProperty (const QByteArray &name, const QString &value)
 
- Public Member Functions inherited from KCal::IncidenceBase::IncidenceObserver
virtual ~IncidenceObserver ()
 

Protected Slots

void beginAddingIncidences ()
 
void endAddingIncidences ()
 
void slotLoadError (ResourceCalendar *resource, const QString &err)
 
void slotSaveError (ResourceCalendar *resource, const QString &err)
 

Protected Member Functions

void connectResource (ResourceCalendar *resource)
 
int decrementChangeCount (ResourceCalendar *resource)
 
virtual void doSetTimeSpec (const KDateTime::Spec &timeSpec)
 
int incrementChangeCount (ResourceCalendar *resource)
 
void resourceDeleted (ResourceCalendar *resource)
 
void resourceModified (ResourceCalendar *resource)
 
- Protected Member Functions inherited from KCal::Calendar
void appendAlarms (Alarm::List &alarms, Incidence *incidence, const KDateTime &from, const KDateTime &to)
 
void appendRecurringAlarms (Alarm::List &alarms, Incidence *incidence, const KDateTime &from, const KDateTime &to)
 
virtual void customPropertyUpdated ()
 
void incidenceUpdated (IncidenceBase *incidenceBase)
 
void notifyIncidenceAdded (Incidence *incidence)
 
void notifyIncidenceChanged (Incidence *incidence)
 
void notifyIncidenceDeleted (Incidence *incidence)
 
void setObserversEnabled (bool enabled)
 

Additional Inherited Members

- Static Public Member Functions inherited from KCal::Calendar
static Incidence::List mergeIncidenceList (const Event::List &events, const Todo::List &todos, const Journal::List &journals)
 
static Event::List sortEvents (Event::List *eventList, EventSortField sortField, SortDirection sortDirection)
 
static Event::List sortEventsForDate (Event::List *eventList, const QDate &date, const KDateTime::Spec &timeSpec, EventSortField sortField, SortDirection sortDirection)
 
static Journal::List sortJournals (Journal::List *journalList, JournalSortField sortField, SortDirection sortDirection)
 
static Todo::List sortTodos (Todo::List *todoList, TodoSortField sortField, SortDirection sortDirection)
 
- Static Public Member Functions inherited from KCal::CustomProperties
static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)
 

Detailed Description

This class provides a Calendar which is composed of other Calendars known as "Resources".

Examples of Calendar Resources are:

  • Calendars stored as local ICS formatted files
  • a set of incidences (one-per-file) within a local directory
  • birthdays and anniversaries contained in an addressbook

Definition at line 57 of file calendarresources.h.

Constructor & Destructor Documentation

CalendarResources::CalendarResources ( const KDateTime::Spec &  timeSpec,
const QString &  family = QLatin1String( "calendar" ) 
)

Construct CalendarResource object using a time specification (time zone, etc.) and a Family name.

Parameters
timeSpecis a time specification which is used for creating or modifying incidences in the Calendar. It is also used for viewing incidences (see setViewTimeSpec()).
familyis any QString representing a unique name.

Definition at line 234 of file calendarresources.cpp.

CalendarResources::CalendarResources ( const QString &  timeZoneId,
const QString &  family = QLatin1String( "calendar" ) 
)

Construct CalendarResource object using a time zone ID and a Family name.

Parameters
timeZoneIdis used for creating or modifying incidences in the Calendar. It is also used for viewing incidences. The time zone does not alter existing incidences.
familyis any QString representing a unique name.

Definition at line 246 of file calendarresources.cpp.

CalendarResources::~CalendarResources ( )

Destroys the Calendar Resources.

Definition at line 257 of file calendarresources.cpp.

Member Function Documentation

bool CalendarResources::addEvent ( Event *  event)
virtual

Calendar::addEvent()

Implements KCal::Calendar.

Definition at line 464 of file calendarresources.cpp.

bool CalendarResources::addEvent ( Event *  event,
ResourceCalendar *  resource 
)

Inserts an Event into a Calendar Resource.

Parameters
eventis a pointer to the Event to insert.
resourceis a pointer to the ResourceCalendar to be added to.
Returns
true if the Event was successfully inserted; false otherwise.
Note
In most cases use addIncidence( Incidence *incidence, ResourceCalendar *resource ) instead.

Definition at line 469 of file calendarresources.cpp.

bool CalendarResources::addIncidence ( Incidence *  incidence)
virtual

Inserts an Incidence into the calendar.

Parameters
incidenceis a pointer to the Incidence to insert.
Returns
true if the Incidence was successfully inserted; false otherwise.
Will also return false if there are multiple writable resources and the user declines to select one to those resources in which to save the Incidence.

Reimplemented from KCal::Calendar.

Definition at line 432 of file calendarresources.cpp.

bool CalendarResources::addIncidence ( Incidence *  incidence,
ResourceCalendar *  resource 
)

Inserts an Incidence into a Calendar Resource.

Parameters
incidenceis a pointer to the Incidence to insert.
resourceis a pointer to the ResourceCalendar to be added to.
Returns
true if the Incidence was successfully inserted; false otherwise.

Definition at line 396 of file calendarresources.cpp.

bool CalendarResources::addJournal ( Journal *  journal)
virtual

Calendar::addJournal()

Implements KCal::Calendar.

Definition at line 676 of file calendarresources.cpp.

bool CalendarResources::addJournal ( Journal *  journal,
ResourceCalendar *  resource 
)

Inserts a Journal into a Calendar Resource.

Parameters
journalis a pointer to the Journal to insert.
resourceis a pointer to the ResourceCalendar to be added to.
Returns
true if the Journal was successfully inserted; false otherwise.
Note
In most cases use addIncidence( Incidence *incidence, ResourceCalendar *resource ) instead.

Definition at line 681 of file calendarresources.cpp.

bool CalendarResources::addTodo ( Todo *  todo)
virtual

Calendar::addTodo()

Implements KCal::Calendar.

Definition at line 520 of file calendarresources.cpp.

bool CalendarResources::addTodo ( Todo *  todo,
ResourceCalendar *  resource 
)

Inserts a Todo into a Calendar Resource.

Parameters
todois a pointer to the Todo to insert.
resourceis a pointer to the ResourceCalendar to be added to.
Returns
true if the Todo was successfully inserted; false otherwise.
Note
In most cases use addIncidence( Incidence *incidence, ResourceCalendar *resource ) instead.

Definition at line 525 of file calendarresources.cpp.

Alarm::List CalendarResources::alarms ( const KDateTime &  from,
const KDateTime &  to 
)
virtual

Calendar::alarms()

Implements KCal::Calendar.

Definition at line 608 of file calendarresources.cpp.

Alarm::List CalendarResources::alarmsTo ( const KDateTime &  to)

Return a list of Alarms that occur before the specified timestamp.

Parameters
tois the ending timestamp.
Returns
the list of Alarms occurring before the specified KDateTime.

Definition at line 598 of file calendarresources.cpp.

void CalendarResources::beginAddingIncidences ( )
protectedslot

All addIncidence( Incidence * ), addTodo( Todo * ) addEvent( Event * ) and addJournal( Journal * ) calls made between beginAddingIncidences() and endAddingIncidences() will only ask the user to choose a resource once.

Since
4.4

Definition at line 928 of file calendarresources.cpp.

bool CalendarResources::beginChange ( Incidence *  incidence)
virtual

Calendar::beginChange()

Reimplemented from KCal::Calendar.

Definition at line 874 of file calendarresources.cpp.

void CalendarResources::clearException ( )

Clears the exception status.

Since
4.2

Definition at line 264 of file calendarresources.cpp.

void CalendarResources::close ( )
virtual

Calendar::close()

Implements KCal::Calendar.

Definition at line 357 of file calendarresources.cpp.

void CalendarResources::connectResource ( ResourceCalendar *  resource)
protected

Connects all necessary signals and slots to the resource.

Parameters
resourceis a pointer to a ResourceCalendar.

Definition at line 769 of file calendarresources.cpp.

int CalendarResources::decrementChangeCount ( ResourceCalendar *  resource)
protected

Decrement the number of times this Resource has been changed by 1.

Parameters
resourceis a pointer to the ResourceCalendar to be counted.
Returns
the new number of times this Resource has been changed.
See also
incrementChangeCount()

Definition at line 952 of file calendarresources.cpp.

void CalendarResources::deleteAllEvents ( )
virtual

Calendar::deleteAllEvents()

Implements KCal::Calendar.

Definition at line 497 of file calendarresources.cpp.

void CalendarResources::deleteAllJournals ( )
virtual

Calendar::deleteAllJournals()

Implements KCal::Calendar.

Definition at line 706 of file calendarresources.cpp.

void CalendarResources::deleteAllTodos ( )
virtual

Calendar::deleteAllTodos()

Implements KCal::Calendar.

Definition at line 550 of file calendarresources.cpp.

bool CalendarResources::deleteEvent ( Event *  event)
virtual

Calendar::deleteEvent()

Implements KCal::Calendar.

Definition at line 474 of file calendarresources.cpp.

bool CalendarResources::deleteJournal ( Journal *  journal)
virtual

Calendar::deleteJournal()

Implements KCal::Calendar.

Definition at line 686 of file calendarresources.cpp.

bool CalendarResources::deleteTodo ( Todo *  todo)
virtual

Calendar::deleteTodo()

Implements KCal::Calendar.

Definition at line 530 of file calendarresources.cpp.

QWidget * CalendarResources::dialogParentWidget ( )

Returns the current parent for new dialogs.

This is a bad hack, but we need to properly set the parent for the resource selection dialog. Otherwise the dialog will not be modal to the editor dialog in korganizer and the user can still work in the editor dialog (and thus crash korganizer). Afterwards we need to reset it (to avoid pointers to widgets that are already deleted) so we also need the accessor

Returns
a pointer to the parent QWidget.
See also
setDialogParentWidget()

Definition at line 347 of file calendarresources.cpp.

void CalendarResources::doSetTimeSpec ( const KDateTime::Spec &  timeSpec)
protectedvirtual

Calendar::doSetTimeSpec()

Reimplemented from KCal::Calendar.

Definition at line 815 of file calendarresources.cpp.

void CalendarResources::endAddingIncidences ( )
protectedslot
See also
beginAddingIncidences()
Since
4.4

Definition at line 933 of file calendarresources.cpp.

bool CalendarResources::endChange ( Incidence *  incidence)
virtual

Calendar::endChange()

Reimplemented from KCal::Calendar.

Definition at line 902 of file calendarresources.cpp.

Event * CalendarResources::event ( const QString &  uid)
virtual

Calendar::event()

Implements KCal::Calendar.

Definition at line 505 of file calendarresources.cpp.

ErrorFormat * CalendarResources::exception ( )

Returns an exception, if there is any, containing information about the last error that occurred.

Since
4.2

Definition at line 270 of file calendarresources.cpp.

bool CalendarResources::hasCalendarResources ( )

Return true if we have resources configure.

Otherwise returns false.

Since
4.3

Definition at line 619 of file calendarresources.cpp.

int CalendarResources::incrementChangeCount ( ResourceCalendar *  resource)
protected

Increment the number of times this Resource has been changed by 1.

Parameters
resourceis a pointer to the ResourceCalendar to be counted.
Returns
the new number of times this Resource has been changed.
See also
decrementChangeCount()

Definition at line 939 of file calendarresources.cpp.

bool CalendarResources::isSaving ( )
virtual

Calendar::isSaving()

Reimplemented from KCal::Calendar.

Definition at line 385 of file calendarresources.cpp.

Journal * CalendarResources::journal ( const QString &  uid)
virtual

Calendar::journal()

Implements KCal::Calendar.

Definition at line 714 of file calendarresources.cpp.

void CalendarResources::load ( )

Loads all Incidences from the Resources.

The Resources must be added first using either readConfig(KConfig *config), which adds the system Resources, or manually using resourceAdded(ResourceCalendar *resource).

Definition at line 285 of file calendarresources.cpp.

Event::List CalendarResources::rawEvents ( EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
)
virtual

Calendar::rawEvents(EventSortField, SortDirection)

Implements KCal::Calendar.

Definition at line 664 of file calendarresources.cpp.

Event::List CalendarResources::rawEvents ( const QDate &  start,
const QDate &  end,
const KDateTime::Spec &  timeSpec = KDateTime::Spec(),
bool  inclusive = false 
)
virtual

Calendar::rawEvents(const QDate &, const QDate &, const KDateTime::Spec &, bool)

Implements KCal::Calendar.

Definition at line 640 of file calendarresources.cpp.

Event::List CalendarResources::rawEventsForDate ( const KDateTime &  dt)
virtual

Calendar::rawEventsForDate( const KDateTime &)

Implements KCal::Calendar.

Definition at line 652 of file calendarresources.cpp.

Event::List CalendarResources::rawEventsForDate ( const QDate &  date,
const KDateTime::Spec &  timeSpec = KDateTime::Spec(),
EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
)
virtual

Returns an unfiltered list of all Events which occur on the given date.

Parameters
daterequest unfiltered Event list for this QDate only.
timeSpectime zone etc. to interpret date, or the calendar's default time spec if none is specified
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of unfiltered Events occurring on the specified QDate.

Implements KCal::Calendar.

Definition at line 626 of file calendarresources.cpp.

Journal::List CalendarResources::rawJournals ( JournalSortField  sortField = JournalSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
)
virtual

Calendar::rawJournals()

Implements KCal::Calendar.

Definition at line 729 of file calendarresources.cpp.

Journal::List CalendarResources::rawJournalsForDate ( const QDate &  date)
virtual

Calendar::rawJournalsForDate()

Implements KCal::Calendar.

Definition at line 741 of file calendarresources.cpp.

Todo::List CalendarResources::rawTodos ( TodoSortField  sortField = TodoSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
)
virtual

Calendar::rawTodos()

Implements KCal::Calendar.

Definition at line 558 of file calendarresources.cpp.

Todo::List CalendarResources::rawTodosForDate ( const QDate &  date)
virtual

Calendar::rawTodosForDate()

Implements KCal::Calendar.

Definition at line 586 of file calendarresources.cpp.

void CalendarResources::readConfig ( KConfig *  config = 0)

Reads the Resources settings from a config file.

Parameters
configThe KConfig object which points to the config file. If no object is given (config is 0) the standard config file is used.
Note
Call this method before load().

Definition at line 275 of file calendarresources.cpp.

void CalendarResources::releaseSaveTicket ( Ticket *  ticket)
virtual

Releases the save Ticket.

The Calendar is unlocked without saving.

Parameters
ticketis a pointer to a Ticket object.
See also
requestSaveTicket()

Definition at line 868 of file calendarresources.cpp.

bool CalendarResources::reload ( )
virtual

Reloads all Incidences from all Resources.

Returns
true if the reload was successful; otherwise failure.

Implements KCal::Calendar.

Definition at line 324 of file calendarresources.cpp.

CalendarResources::Ticket * CalendarResources::requestSaveTicket ( ResourceCalendar *  resource)

Requests a ticket for saving the Calendar.

If a ticket is returned the Calendar is locked for write access until save() or releaseSaveTicket() is called.

Parameters
resourceis a pointer to the ResourceCalendar object.
Returns
a pointer to a Ticket object indicating that the Calendar is locked for write access; otherwise a null pointer.
See also
releaseSaveTicket()

Definition at line 835 of file calendarresources.cpp.

ResourceCalendar * CalendarResources::resource ( Incidence *  incidence)

Returns the Resource associated with a specified Incidence.

Parameters
incidenceis a pointer to an Incidence whose Resource is to be located.

Definition at line 782 of file calendarresources.cpp.

void CalendarResources::resourceAdded ( ResourceCalendar *  resource)

Add an active Resource to the Calendar, and loads that resource if it is open.

Additionally, emits the signalResourceAdded signal.

Note
This method must be public, because in-process added Resources do not emit the corresponding signal, so this method has to be called manually!
Parameters
resourceis a pointer to the ResourceCalendar to add.
See also
signalResourceAdded()

Definition at line 790 of file calendarresources.cpp.

void CalendarResources::resourceDeleted ( ResourceCalendar *  resource)
protected

Emits the signalResourceDeleted signal for the specified resource.

Parameters
resourceis a pointer to a ResourceCalendar that was removed.
See also
signalResourceModified()

Definition at line 810 of file calendarresources.cpp.

CalendarResourceManager * CalendarResources::resourceManager ( ) const

Returns the CalendarResourceManager used by this calendar.

Definition at line 332 of file calendarresources.cpp.

void CalendarResources::resourceModified ( ResourceCalendar *  resource)
protected

Emits the signalResourceModified signal for the specified resource.

Parameters
resourceis a pointer to a ResourceCalendar that was changed.
See also
signalResourceDeleted()

Definition at line 805 of file calendarresources.cpp.

bool CalendarResources::save ( Ticket *  ticket,
Incidence *  incidence = 0 
)
virtual

Saves this Calendar.

If the save is successful the Ticket is deleted. Otherwise, the caller must release the Ticket with releaseSaveTicket() to abandon the save operation or call save() to try the save again.

Parameters
ticketis a pointer to the Ticket object.
incidenceis a pointer to the Incidence object. If incidence is null, save the entire Calendar (all Resources) else only the specified Incidence is saved.
Returns
true if the save was successful; false otherwise.

Definition at line 853 of file calendarresources.cpp.

bool CalendarResources::save ( )
virtual

Calendar::save()

Implements KCal::Calendar.

Definition at line 370 of file calendarresources.cpp.

void CalendarResources::setAskDestinationPolicy ( )

Set the destination policy such that Incidences are added to a Resource which is queried.

Definition at line 342 of file calendarresources.cpp.

void CalendarResources::setDialogParentWidget ( QWidget *  parent)

Set the widget parent for new dialogs.

This is a bad hack, but we need to properly set the parent for the resource selection dialog. Otherwise the dialog will not be modal to the editor dialog in korganizer and the user can still work in the editor dialog (and thus crash korganizer).

Parameters
parentis a pointer to the parent QWidget.
See also
dialogparentWidget()

Definition at line 352 of file calendarresources.cpp.

void CalendarResources::setStandardDestinationPolicy ( )

Set the destination policy such that Incidences are always added to the standard Resource.

Definition at line 337 of file calendarresources.cpp.

void KCal::CalendarResources::signalErrorMessage ( const QString &  err)
signal

Signals an error message.

Parameters
erris the error message.
void KCal::CalendarResources::signalResourceAdded ( ResourceCalendar *  resource)
signal

Signals that an Incidence has been inserted to the Resource.

Parameters
resourceis a pointer to a ResourceCalendar that was added.
See also
resourceAdded()
void KCal::CalendarResources::signalResourceDeleted ( ResourceCalendar *  resource)
signal

Signals that an Incidence has been removed from the Resource.

Parameters
resourceis a pointer to a ResourceCalendar that was removed.
See also
resourceDeleted()
void KCal::CalendarResources::signalResourceModified ( ResourceCalendar *  resource)
signal

Signals that the Resource has been modified.

Parameters
resourceis a pointer to a ResourceCalendar that was changed.
See also
resourceModified()
void CalendarResources::slotLoadError ( ResourceCalendar *  resource,
const QString &  err 
)
protectedslot

Emits the signalErrorMessage signal with an error message when an error occurs loading a ResourceCalendar.

Parameters
resourceis a pointer to the ResourceCalendar that failed to load.
erris the error message.
See also
slotSaveError()

Definition at line 970 of file calendarresources.cpp.

void CalendarResources::slotSaveError ( ResourceCalendar *  resource,
const QString &  err 
)
protectedslot

Emits the signalErrorMessage signal with an error message when an error occurs saving a ResourceCalendar.

Parameters
resourceis a pointer to the ResourceCalendar that failed to save.
erris the error message.
See also
slotLoadError()

Definition at line 976 of file calendarresources.cpp.

Todo * CalendarResources::todo ( const QString &  uid)
virtual

Calendar::todo()

Implements KCal::Calendar.

Definition at line 571 of file calendarresources.cpp.


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

KDE's Doxygen guidelines are available online.

KCal Library

Skip menu "KCal Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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