#include <calendarresources.h>

Inheritance diagram for KCal::CalendarResources:
KCal::Calendar KCal::CustomProperties

Signals

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

Public Member Functions

 CalendarResources (const TQString &timeZoneId, const TQString &family=TQString::fromLatin1("calendar"))
 
 ~CalendarResources ()
 
void load ()
 
bool reload (const TQString &tz)
 
void close ()
 
void closeEvents ()
 
void closeTodos ()
 
void closeJournals ()
 
virtual bool save (Ticket *ticket, Incidence *incidence=0)
 
void save ()
 
bool isSaving ()
 
CalendarResourceManager * resourceManager () const
 
ResourceCalendarresource (Incidence *incidence)
 
void readConfig (TDEConfig *config=0)
 
void setStandardDestinationPolicy ()
 
void setAskDestinationPolicy ()
 
TQWidget * dialogParentWidget ()
 
void setDialogParentWidget (TQWidget *parent)
 
Ticket * requestSaveTicket (ResourceCalendar *resource)
 
virtual void releaseSaveTicket (Ticket *ticket)
 
void resourceAdded (ResourceCalendar *resource)
 
bool addIncidence (Incidence *incidence)
 
TDE_DEPRECATED bool addIncidence (Incidence *incidence, ResourceCalendar *resource)
 
bool addIncidence (Incidence *incidence, ResourceCalendar *resource, const TQString &subresource)
 
TDE_DEPRECATED bool beginChange (Incidence *incidence)
 
bool beginChange (Incidence *incidence, ResourceCalendar *resource, const TQString &subresource)
 
TDE_DEPRECATED bool endChange (Incidence *incidence)
 
bool endChange (Incidence *incidence, ResourceCalendar *resource, const TQString &subresource)
 
bool addEvent (Event *event)
 
TDE_DEPRECATED bool addEvent (Event *event, ResourceCalendar *resource)
 
bool addEvent (Event *event, ResourceCalendar *resource, const TQString &subresource)
 
bool deleteEvent (Event *event)
 
Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Event::List rawEventsForDate (const TQDateTime &qdt)
 
Event::List rawEvents (const TQDate &start, const TQDate &end, bool inclusive=false)
 
Event::List rawEventsForDate (const TQDate &date, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Eventevent (const TQString &uid)
 
bool addTodo (Todo *todo)
 
TDE_DEPRECATED bool addTodo (Todo *todo, ResourceCalendar *resource)
 
bool addTodo (Todo *todo, ResourceCalendar *resource, const TQString &subresource)
 
bool deleteTodo (Todo *todo)
 
Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Todo::List rawTodosForDate (const TQDate &date)
 
Todotodo (const TQString &uid)
 
bool addJournal (Journal *journal)
 
TDE_DEPRECATED bool addJournal (Journal *journal, ResourceCalendar *resource)
 
bool addJournal (Journal *journal, ResourceCalendar *resource, const TQString &subresource)
 
bool deleteJournal (Journal *journal)
 
Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Journal::List rawJournalsForDate (const TQDate &date)
 
Journaljournal (const TQString &uid)
 
Alarm::List alarms (const TQDateTime &from, const TQDateTime &to)
 
Alarm::List alarmsTo (const TQDateTime &to)
 
void setTimeZoneIdViewOnly (const TQString &tz)
 
bool hasCalendarResources ()
 
- Public Member Functions inherited from KCal::Calendar
 Calendar (const TQString &timeZoneId)
 
virtual ~Calendar ()
 
void setProductId (const TQString &productId)
 
TQString productId ()
 
void clearException ()
 
ErrorFormatexception () const
 
void setOwner (const Person &owner)
 
const PersongetOwner () const
 
void setTimeZoneId (const TQString &timeZoneId)
 
TQString timeZoneId () const
 
void setLocalTime ()
 
bool isLocalTime () const
 
void setModified (bool modified)
 
bool isModified () const
 
TQStringList categories ()
 
virtual bool deleteIncidence (Incidence *incidence)
 
virtual Incidence::List incidences ()
 
virtual Incidence::List incidences (const TQDate &date)
 
virtual Incidence::List rawIncidences ()
 
Incidenceincidence (const TQString &uid)
 
IncidenceincidenceFromSchedulingID (const TQString &sid)
 
Incidence::List incidencesFromSchedulingID (const TQString &UID)
 
IncidencedissociateOccurrence (Incidence *incidence, TQDate date, bool single=true)
 
virtual Event::List events (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Event::List events (const TQDateTime &qdt)
 
Event::List events (const TQDate &start, const TQDate &end, bool inclusive=false)
 
Event::List events (const TQDate &date, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
virtual Todo::List todos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
virtual Todo::List todos (const TQDate &date)
 
virtual Journal::List journals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
virtual Journal::List journals (const TQDate &date)
 
void beginBatchAdding ()
 
void endBatchAdding ()
 
virtual void setupRelations (Incidence *incidence)
 
virtual void removeRelations (Incidence *incidence)
 
void setFilter (CalFilter *filter)
 
CalFilterfilter ()
 
void registerObserver (Observer *observer)
 
void unregisterObserver (Observer *observer)
 
- Public Member Functions inherited from KCal::CustomProperties
 CustomProperties ()
 
 CustomProperties (const CustomProperties &)
 
bool operator== (const CustomProperties &) const
 
void setCustomProperty (const TQCString &app, const TQCString &key, const TQString &value)
 
void removeCustomProperty (const TQCString &app, const TQCString &key)
 
TQString customProperty (const TQCString &app, const TQCString &key) const
 
void setNonKDECustomProperty (const TQCString &name, const TQString &value)
 
void removeNonKDECustomProperty (const TQCString &name)
 
TQString nonKDECustomProperty (const TQCString &name) const
 
void setCustomProperties (const TQMap< TQCString, TQString > &properties)
 
TQMap< TQCString, TQString > customProperties () const
 

Protected Slots

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

Protected Member Functions

void connectResource (ResourceCalendar *resource)
 
void resourceModified (ResourceCalendar *resource)
 
void resourceDeleted (ResourceCalendar *resource)
 
virtual void doSetTimeZoneId (const TQString &timeZoneId)
 
int incrementChangeCount (ResourceCalendar *resource)
 
int decrementChangeCount (ResourceCalendar *resource)
 
- Protected Member Functions inherited from KCal::Calendar
void setException (ErrorFormat *e)
 
void incidenceUpdated (IncidenceBase *incidenceBase)
 
void notifyIncidenceAdded (Incidence *incidence)
 
void notifyIncidenceChanged (Incidence *incidence)
 
void notifyIncidenceDeleted (Incidence *incidence)
 
virtual void customPropertyUpdated ()
 
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 TQDate &date, EventSortField sortField, SortDirection sortDirection)
 
static Todo::List sortTodos (Todo::List *todoList, TodoSortField sortField, SortDirection sortDirection)
 
static Journal::List sortJournals (Journal::List *journalList, JournalSortField sortField, SortDirection sortDirection)
 

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 64 of file calendarresources.h.

Constructor & Destructor Documentation

◆ CalendarResources()

CalendarResources::CalendarResources ( const TQString &  timeZoneId,
const TQString &  family = TQString::fromLatin1( "calendar" ) 
)

Construct CalendarResource object using a Time Zone and a Family name.

Parameters
timeZoneIdis a string containing a Time Zone ID, which is assumed to be valid. The Time Zone Id is used to set the time zone for viewing Incidence dates.
On some systems, /usr/share/zoneinfo/zone.tab may be available for reference.
Example: "Europe/Berlin"
Warning
Do Not pass an empty timeZoneId string as this may cause unintended consequences when storing Incidences into the Calendar.
Parameters
familyis any TQString representing a unique name.

Definition at line 115 of file calendarresources.cpp.

◆ ~CalendarResources()

CalendarResources::~CalendarResources ( )

Destructor.

Definition at line 138 of file calendarresources.cpp.

Member Function Documentation

◆ addEvent() [1/3]

bool CalendarResources::addEvent ( Event event)
virtual

Insert an Event into the Calendar.

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

Implements KCal::Calendar.

Definition at line 411 of file calendarresources.cpp.

◆ addEvent() [2/3]

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

Insert 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.
Deprecated:
use addIncidence(Incidence *,ResourceCalendar *,const TQString&) instead.

Definition at line 417 of file calendarresources.cpp.

◆ addEvent() [3/3]

bool CalendarResources::addEvent ( Event event,
ResourceCalendar resource,
const TQString &  subresource 
)

Insert 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.
subresourceis the subresource name, which may not be used by some calendar resources.
Returns
true if the Event was successfully inserted; false otherwise.
Note
In most cases use addIncidence(Incidence *,ResourceCalendar *,const TQString &) instead.

Definition at line 422 of file calendarresources.cpp.

◆ addIncidence() [1/3]

bool CalendarResources::addIncidence ( Incidence incidence)
virtual

Insert an Incidence into the Calendar.

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

Reimplemented from KCal::Calendar.

Definition at line 356 of file calendarresources.cpp.

◆ addIncidence() [2/3]

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

Insert 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.
Deprecated:
use addIncidence(Incidence *,ResourceCalendar *,const TQString &) instead.

Definition at line 350 of file calendarresources.cpp.

◆ addIncidence() [3/3]

bool CalendarResources::addIncidence ( Incidence incidence,
ResourceCalendar resource,
const TQString &  subresource 
)

Insert 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.
subresourceis the subresource name, which may not be used by some calendar resources.
Returns
true if the Incidence was successfully inserted; false otherwise.

Definition at line 312 of file calendarresources.cpp.

◆ addJournal() [1/3]

bool CalendarResources::addJournal ( Journal journal)
virtual

Insert a Journal into the Calendar.

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

Implements KCal::Calendar.

Definition at line 665 of file calendarresources.cpp.

◆ addJournal() [2/3]

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

Insert 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.
Deprecated:
use addIncidence(Incidence *,ResourceCalendar *,const TQString &) instead.

Definition at line 671 of file calendarresources.cpp.

◆ addJournal() [3/3]

bool CalendarResources::addJournal ( Journal journal,
ResourceCalendar resource,
const TQString &  subresource 
)

Insert 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.
subresourceis the subresource name, which may not be used by some calendar resources.
Returns
true if the Journal was successfully inserted; false otherwise.
Note
In most cases use addIncidence(Incidence *,ResourceCalendar *,const TQString &) instead.

Definition at line 677 of file calendarresources.cpp.

◆ addTodo() [1/3]

bool CalendarResources::addTodo ( Todo todo)
virtual

Insert a Todo into a Calendar Resource.

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

Implements KCal::Calendar.

Definition at line 468 of file calendarresources.cpp.

◆ addTodo() [2/3]

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

Insert an 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.
Deprecated:
use addIncidence(Incidence *,ResourceCalendar *,const TQString &) instead.

Definition at line 474 of file calendarresources.cpp.

◆ addTodo() [3/3]

bool CalendarResources::addTodo ( Todo todo,
ResourceCalendar resource,
const TQString &  subresource 
)

Insert an Todo into a Calendar Resource.

Parameters
todois a pointer to the Todo to insert.
resourceis a pointer to the ResourceCalendar to be added to.
subresourceis the subresource name, which may not be used by some calendar resources.
Returns
true if the Todo was successfully inserted; false otherwise.
Note
In most cases use addIncidence(Incidence *, ResourceCalendar *,const TQString &) instead.

Definition at line 479 of file calendarresources.cpp.

◆ alarms()

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

Return a list of Alarms within a time range for this Calendar.

Parameters
fromis the starting timestamp.
tois the ending timestamp.
Returns
the list of Alarms for the for the specified time range.

Implements KCal::Calendar.

Definition at line 572 of file calendarresources.cpp.

◆ alarmsTo()

Alarm::List CalendarResources::alarmsTo ( const TQDateTime &  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 TQDateTime.

Definition at line 557 of file calendarresources.cpp.

◆ beginAddingIncidences

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 943 of file calendarresources.cpp.

◆ beginChange() [1/2]

bool CalendarResources::beginChange ( Incidence incidence)
virtual

Flag that a change to a Calendar Incidence is starting.

Parameters
incidenceis a pointer to the Incidence that will be changing.
Returns
false if the resource could not be computed or if a ticket request fails; true otherwise.

Reimplemented from KCal::Calendar.

Definition at line 863 of file calendarresources.cpp.

◆ beginChange() [2/2]

bool CalendarResources::beginChange ( Incidence incidence,
ResourceCalendar resource,
const TQString &  subresource 
)

Flag that a change to a Calendar Incidence is starting.

Parameters
incidenceis a pointer to the Incidence that will be changing.
resourceis a pointer to the ResourceCalendar that incidence belongs to; if this is 0 then the resource is queried via the DestinationPolicy.
subresourceis the Incidence subresource name, which may not be used by some calendar resources.
Returns
false if the resource could not be computed or if a ticket request fails; true otherwise.

Definition at line 868 of file calendarresources.cpp.

◆ close()

void CalendarResources::close ( )
virtual

Clear out the current Calendar, freeing all used memory etc.

Implements KCal::Calendar.

Definition at line 226 of file calendarresources.cpp.

◆ closeEvents()

void CalendarResources::closeEvents ( )
virtual

Clear out the current Calendar, freeing all used memory etc.

Implements KCal::Calendar.

Definition at line 241 of file calendarresources.cpp.

◆ closeJournals()

void CalendarResources::closeJournals ( )
virtual

Clear out the current Calendar, freeing all used memory etc.

Implements KCal::Calendar.

Definition at line 271 of file calendarresources.cpp.

◆ closeTodos()

void CalendarResources::closeTodos ( )
virtual

Clear out the current Calendar, freeing all used memory etc.

Implements KCal::Calendar.

Definition at line 256 of file calendarresources.cpp.

◆ decrementChangeCount()

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.

Definition at line 974 of file calendarresources.cpp.

◆ deleteEvent()

bool CalendarResources::deleteEvent ( Event event)
virtual

Remove an Event from the Calendar.

Parameters
eventis a pointer to the Event to remove.
Returns
true if the Event was successfully removed; false otherwise.
Note
In most cases use deleteIncidence( Incidence *incidence) instead.

Implements KCal::Calendar.

Definition at line 428 of file calendarresources.cpp.

◆ deleteJournal()

bool CalendarResources::deleteJournal ( Journal journal)
virtual

Remove a Journal from the Calendar.

Parameters
journalis a pointer to the Journal to remove.
Returns
true if the Journal was successfully removed; false otherwise.
Note
In most cases use deleteIncidence( Incidence *incidence ) instead.

Implements KCal::Calendar.

Definition at line 684 of file calendarresources.cpp.

◆ deleteTodo()

bool CalendarResources::deleteTodo ( Todo todo)
virtual

Remove an Todo from the Calendar.

Parameters
todois a pointer to the Todo to remove.
Returns
true if the Todo was successfully removed; false otherwise.
Note
In most cases use deleteIncidence( Incidence *incidence ) instead.

Implements KCal::Calendar.

Definition at line 485 of file calendarresources.cpp.

◆ dialogParentWidget()

TQWidget * 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

Definition at line 216 of file calendarresources.cpp.

◆ doSetTimeZoneId()

void CalendarResources::doSetTimeZoneId ( const TQString &  timeZoneId)
protectedvirtual

Let CalendarResource subclasses set the Time Zone ID.

First parameter is a string containing a Time Zone ID, which is assumed to be valid. On some systems, /usr/share/zoneinfo/zone.tab may be available for reference.
Example: "Europe/Berlin"

Warning
Do Not pass an empty timeZoneId string as this may cause unintended consequences when storing Incidences into the Calendar.

Reimplemented from KCal::Calendar.

Definition at line 810 of file calendarresources.cpp.

◆ endAddingIncidences

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

Definition at line 949 of file calendarresources.cpp.

◆ endChange() [1/2]

bool CalendarResources::endChange ( Incidence incidence)
virtual

Flag that a change to a Calendar Incidence has completed.

Parameters
incidenceis a pointer to the Incidence that was changed.
Returns
false if the resource could not be computed or if a ticket save fails; true otherwise.

Reimplemented from KCal::Calendar.

Definition at line 905 of file calendarresources.cpp.

◆ endChange() [2/2]

bool CalendarResources::endChange ( Incidence incidence,
ResourceCalendar resource,
const TQString &  subresource 
)

Flag that a change to a Calendar Incidence has completed.

Parameters
incidenceis a pointer to the Incidence that was changed.
resourceis a pointer to the ResourceCalendar that incidence belongs to; if this is 0 then the resource is queried via the DestinationPolicy.
subresourceis the Incidence subresource name, which may not be used by some calendar resources.
Returns
false if the resource could not be computed or if a ticket save fails; true otherwise.

Definition at line 910 of file calendarresources.cpp.

◆ event()

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

Returns the Event associated with the given unique identifier.

Parameters
uidis a unique identifier string.
Returns
a pointer to the Event. A null pointer is returned if no such Event exists.

Implements KCal::Calendar.

Definition at line 453 of file calendarresources.cpp.

◆ incrementChangeCount()

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.

Definition at line 961 of file calendarresources.cpp.

◆ isSaving()

bool CalendarResources::isSaving ( )
virtual

Determine if the Calendar is currently being saved.

Returns
true if the Calendar is currently being saved; false otherwise.

Reimplemented from KCal::Calendar.

Definition at line 300 of file calendarresources.cpp.

◆ journal()

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

Returns the Journal associated with the given unique identifier.

Parameters
uidis a unique identifier string.
Returns
a pointer to the Journal. A null pointer is returned if no such Journal exists.

Implements KCal::Calendar.

Definition at line 705 of file calendarresources.cpp.

◆ load()

void CalendarResources::load ( )

Loads all Incidences from the Resources.

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

Definition at line 156 of file calendarresources.cpp.

◆ rawEvents() [1/2]

Event::List CalendarResources::rawEvents ( const TQDate &  start,
const TQDate &  end,
bool  inclusive = false 
)
virtual

Return an unfiltered list of all Events occurring within a date range.

Parameters
startis the starting date.
endis the ending date.
inclusiveif true only Events which are completely included within the date range are returned.
Returns
the list of unfiltered Events occurring within the specified date range.

Implements KCal::Calendar.

Definition at line 610 of file calendarresources.cpp.

◆ rawEvents() [2/2]

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

Return a sorted, unfiltered list of all Events.

Parameters
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered Events sorted as specified.

Implements KCal::Calendar.

Definition at line 646 of file calendarresources.cpp.

◆ rawEventsForDate() [1/2]

Event::List CalendarResources::rawEventsForDate ( const TQDate &  date,
EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
)
virtual

Return a sorted, unfiltered list of all Events which occur on the given date.

The Events are sorted according to sortField and sortDirection.

Parameters
daterequest unfiltered Event list for this TQDate only.
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of sorted, unfiltered Events occurring on date.

Implements KCal::Calendar.

Definition at line 593 of file calendarresources.cpp.

◆ rawEventsForDate() [2/2]

Event::List CalendarResources::rawEventsForDate ( const TQDateTime &  qdt)
virtual

Return an unfiltered list of all Events which occur on the given timestamp.

Parameters
qdtrequest unfiltered Event list for this TQDateTime only.
Returns
the list of unfiltered Events occurring on the specified timestamp.

Implements KCal::Calendar.

Definition at line 628 of file calendarresources.cpp.

◆ rawJournals()

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

Return a sorted, unfiltered list of all Journals for this Calendar.

Parameters
sortFieldspecifies the JournalSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered Journals sorted as specified.

Implements KCal::Calendar.

Definition at line 722 of file calendarresources.cpp.

◆ rawJournalsForDate()

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

Return an unfiltered list of all Journals for on the specifed date.

Parameters
daterequest unfiltered Journals for this TQDate only.
Returns
the list of unfiltered Journals for the specified date.

Implements KCal::Calendar.

Definition at line 740 of file calendarresources.cpp.

◆ rawTodos()

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

Return a sorted, unfiltered list of all Todos for this Calendar.

Parameters
sortFieldspecifies the TodoSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered Todos sorted as specified.

Implements KCal::Calendar.

Definition at line 506 of file calendarresources.cpp.

◆ rawTodosForDate()

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

Return an unfiltered list of all Todos which are due on the specified date.

Parameters
daterequest unfiltered Todos due on this TQDate.
Returns
the list of unfiltered Todos due on the specified date.

Implements KCal::Calendar.

Definition at line 540 of file calendarresources.cpp.

◆ readConfig()

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

Read the Resources settings from a config file.

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

Definition at line 146 of file calendarresources.cpp.

◆ releaseSaveTicket()

void CalendarResources::releaseSaveTicket ( Ticket *  ticket)
virtual

Release the save Ticket.

The Calendar is unlocked without saving.

Parameters
ticketis a pointer to a Ticket object.

Definition at line 857 of file calendarresources.cpp.

◆ reload()

bool CalendarResources::reload ( const TQString &  tz)
virtual

Reloads all incidences from all resources.

Parameters
tzThe timezone to set.
Returns
success or failure

Implements KCal::Calendar.

Definition at line 197 of file calendarresources.cpp.

◆ requestSaveTicket()

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

Request 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.

Definition at line 826 of file calendarresources.cpp.

◆ resource()

ResourceCalendar * CalendarResources::resource ( Incidence incidence)

Get the Resource associated with a specified Incidence.

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

Definition at line 772 of file calendarresources.cpp.

◆ resourceAdded()

void CalendarResources::resourceAdded ( ResourceCalendar resource)

Add a Resource to the Calendar.

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.

Definition at line 780 of file calendarresources.cpp.

◆ resourceManager()

CalendarResourceManager* KCal::CalendarResources::resourceManager ( ) const
inline

Get the CalendarResourceManager used by this calendar.

Returns
a pointer to the CalendarResourceManage.

Definition at line 241 of file calendarresources.h.

◆ save() [1/2]

void CalendarResources::save ( )
virtual

Sync changes in memory to persistant storage.

Implements KCal::Calendar.

Definition at line 286 of file calendarresources.cpp.

◆ save() [2/2]

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

Save this Calendar.

If the save is successfull, 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 839 of file calendarresources.cpp.

◆ setAskDestinationPolicy()

void CalendarResources::setAskDestinationPolicy ( )

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

Definition at line 211 of file calendarresources.cpp.

◆ setDialogParentWidget()

void CalendarResources::setDialogParentWidget ( TQWidget *  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).

Definition at line 221 of file calendarresources.cpp.

◆ setStandardDestinationPolicy()

void CalendarResources::setStandardDestinationPolicy ( )

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

Definition at line 206 of file calendarresources.cpp.

◆ setTimeZoneIdViewOnly()

void CalendarResources::setTimeZoneIdViewOnly ( const TQString &  tz)
virtual

Set the viewing time zone, which requires that all resources are saved, and then reloaded such that the event times are re-interpreted in the new timezone.

Note that the absolute times of events do not change with this. If you want to change the times of the contents of the resources, use setTimeZoneId

Implements KCal::Calendar.

Definition at line 820 of file calendarresources.cpp.

◆ signalErrorMessage

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

Signal an error message.

◆ signalResourceAdded

void KCal::CalendarResources::signalResourceAdded ( ResourceCalendar resource)
signal

Signal that an Incidence has been inserted to the Resource.

◆ signalResourceDeleted

void KCal::CalendarResources::signalResourceDeleted ( ResourceCalendar resource)
signal

Signal that an Incidence has been removed from the Resource.

◆ signalResourceModified

void KCal::CalendarResources::signalResourceModified ( ResourceCalendar resource)
signal

Signal that the Resource has been modified.

◆ todo()

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

Returns the Todo associated with the given unique identifier.

Parameters
uidis a unique identifier string.
Returns
a pointer to the Todo. A null pointer is returned if no such Todo exists.

Implements KCal::Calendar.

Definition at line 523 of file calendarresources.cpp.


The documentation for this class was generated from the following files: