• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KCal Library

KCal::Calendar

KCal::Calendar Class Reference

#include <calendar.h>

Inheritance diagram for KCal::Calendar:

Inheritance graph
[legend]

List of all members.


Detailed Description

Represents the main calendar class.

A calendar contains information like incidences (events, to-dos, journals), alarms, time zones, and other useful information.

This is an abstract base class defining the interface to a calendar. It is implemented by subclasses like CalendarLocal, which use different methods to store and access the data.

Ownership of Incidences:

Incidence ownership is handled by the following policy: as soon as an incidence (or any other subclass of IncidenceBase) is added to the Calendar by an add...() method it is owned by the Calendar object. The Calendar takes care of deleting the incidence using the delete...() methods. All Incidences returned by the query functions are returned as pointers so that changes to the returned Incidences are immediately visible in the Calendar. Do Not attempt to 'delete' any Incidence object you get from Calendar -- use the delete...() methods.

Definition at line 119 of file calendar.h.


Signals

void calendarChanged ()
void calendarSaved ()
void calendarLoaded ()

Public Member Functions

 Calendar (const KDateTime::Spec &timeSpec)
 Calendar (const QString &timeZoneId)
virtual ~Calendar ()
void setProductId (const QString &id)
QString productId () const
void setOwner (const Person &owner)
Person owner () const
void setTimeSpec (const KDateTime::Spec &timeSpec)
KDateTime::Spec timeSpec () const
void setTimeZoneId (const QString &timeZoneId)
QString timeZoneId () const
void setViewTimeSpec (const KDateTime::Spec &timeSpec) const
void setViewTimeZoneId (const QString &timeZoneId) const
KDateTime::Spec viewTimeSpec () const
QString viewTimeZoneId () const
void shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
ICalTimeZones * timeZones () const
void setTimeZones (const ICalTimeZones &zones)
void setModified (bool modified)
bool isModified () const
virtual void close ()=0
virtual bool save ()=0
virtual bool reload ()=0
virtual bool isSaving ()
QStringList categories ()
virtual bool addIncidence (Incidence *incidence)
virtual bool deleteIncidence (Incidence *incidence)
virtual Incidence::List incidences ()
virtual Incidence::List incidences (const QDate &date)
virtual Incidence::List rawIncidences ()
Incidence * incidence (const QString &uid)
Incidence * incidenceFromSchedulingID (const QString &sid)
Incidence::List incidencesFromSchedulingID (const QString &sid)
virtual bool beginChange (Incidence *incidence)
virtual bool endChange (Incidence *incidence)
Incidence * dissociateOccurrence (Incidence *incidence, const QDate &date, const KDateTime::Spec &spec, bool single=true)
virtual bool addEvent (Event *event)=0
virtual bool deleteEvent (Event *event)=0
virtual void deleteAllEvents ()=0
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)
virtual Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
virtual Event::List rawEventsForDate (const KDateTime &dt)=0
virtual Event::List rawEvents (const QDate &start, const QDate &end, const KDateTime::Spec &timespec=KDateTime::Spec(), bool inclusive=false)=0
virtual Event::List rawEventsForDate (const QDate &date, const KDateTime::Spec &timespec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
virtual Event * event (const QString &uid)=0
virtual bool addTodo (Todo *todo)=0
virtual bool deleteTodo (Todo *todo)=0
virtual void deleteAllTodos ()=0
virtual Todo::List todos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
virtual Todo::List todos (const QDate &date)
virtual Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
virtual Todo::List rawTodosForDate (const QDate &date)=0
virtual Todo * todo (const QString &uid)=0
virtual bool addJournal (Journal *journal)=0
virtual bool deleteJournal (Journal *journal)=0
virtual void deleteAllJournals ()=0
virtual Journal::List journals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
virtual Journal::List journals (const QDate &date)
virtual Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
virtual Journal::List rawJournalsForDate (const QDate &date)=0
virtual Journal * journal (const QString &uid)=0
virtual void setupRelations (Incidence *incidence)
virtual void removeRelations (Incidence *incidence)
void setFilter (CalFilter *filter)
CalFilter * filter ()
virtual Alarm::List alarms (const KDateTime &from, const KDateTime &to)=0
void registerObserver (CalendarObserver *observer)
void unregisterObserver (CalendarObserver *observer)

Static Public Member Functions

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 Todo::List sortTodos (Todo::List *todoList, TodoSortField sortField, SortDirection sortDirection)
static Journal::List sortJournals (Journal::List *journalList, JournalSortField sortField, SortDirection sortDirection)

Protected Member Functions

void incidenceUpdated (IncidenceBase *incidenceBase)
virtual void doSetTimeSpec (const KDateTime::Spec &timeSpec)
void notifyIncidenceAdded (Incidence *incidence)
void notifyIncidenceChanged (Incidence *incidence)
void notifyIncidenceDeleted (Incidence *incidence)
virtual void customPropertyUpdated ()
void setObserversEnabled (bool enabled)
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)

Classes

class  CalendarObserver
 The CalendarObserver class. More...

Constructor & Destructor Documentation

Calendar::Calendar ( const KDateTime::Spec &  timeSpec  )  [explicit]

Constructs a calendar with a specified time zone timeZoneid.

Private class that helps to provide binary compatibility between releases.

The time specification is used as the default for creating or modifying incidences in the Calendar. The time specification does not alter existing incidences.

The constructor also calls setViewTimeSpec(timeSpec).

Parameters:
timeSpec time specification

Definition at line 103 of file calendar.cpp.

Calendar::Calendar ( const QString &  timeZoneId  )  [explicit]

Construct Calendar object using a time zone ID.

The time zone ID is used as the default for creating or modifying incidences in the Calendar. The time zone does not alter existing incidences.

The constructor also calls setViewTimeZoneId(timeZoneId).

Parameters:
timeZoneId is a string containing a time zone ID, which is assumed to be valid. If no time zone is found, the viewing time specification is set to local clock time. Example: "Europe/Berlin"

Definition at line 110 of file calendar.cpp.

Calendar::~Calendar (  )  [virtual]

Destroys the calendar.

Definition at line 116 of file calendar.cpp.


Member Function Documentation

void Calendar::setProductId ( const QString &  id  ) 

Sets the calendar Product ID to id.

Parameters:
id is a string containing the Product ID.
See also:
productId() const

Definition at line 994 of file calendar.cpp.

QString Calendar::productId (  )  const

Returns the calendar's Product ID.

See also:
setProductId()

Definition at line 999 of file calendar.cpp.

void Calendar::setOwner ( const Person &  owner  ) 

Sets the owner of the calendar to owner.

Parameters:
owner is a Person object.
See also:
owner()

Definition at line 126 of file calendar.cpp.

Person Calendar::owner (  )  const

Returns the owner of the calendar.

Returns:
the owner Person object.
See also:
setOwner()

Definition at line 121 of file calendar.cpp.

void Calendar::setTimeSpec ( const KDateTime::Spec &  timeSpec  ) 

Sets the default time specification (time zone, etc.

) used for creating or modifying incidences in the Calendar.

The method also calls setViewTimeSpec(timeSpec).

Parameters:
timeSpec time specification

Definition at line 133 of file calendar.cpp.

KDateTime::Spec Calendar::timeSpec (  )  const

Get the time specification (time zone etc.

) used for creating or modifying incidences in the Calendar.

Returns:
time specification

Definition at line 142 of file calendar.cpp.

void Calendar::setTimeZoneId ( const QString &  timeZoneId  ) 

Sets the time zone ID used for creating or modifying incidences in the Calendar.

This method has no effect on existing incidences.

The method also calls setViewTimeZoneId(timeZoneId).

Parameters:
timeZoneId is 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 date/times. If no time zone is found, the viewing time specification is set to local clock time. Example: "Europe/Berlin"
See also:
setTimeSpec()

Definition at line 147 of file calendar.cpp.

QString Calendar::timeZoneId (  )  const

Returns the time zone ID used for creating or modifying incidences in the calendar.

Returns:
the string containing the time zone ID, or empty string if the creation/modification time specification is not a time zone.

Definition at line 186 of file calendar.cpp.

void Calendar::setViewTimeSpec ( const KDateTime::Spec &  timeSpec  )  const

Notes the time specification which the client application intends to use for viewing the incidences in this calendar.

This is simply a convenience method which makes a note of the new time zone so that it can be read back by viewTimeSpec(). The client application must convert date/time values to the desired time zone itself.

The time specification is not used in any way by the Calendar or its incidences; it is solely for use by the client application.

Parameters:
timeSpec time specification
See also:
viewTimeSpec()

Definition at line 192 of file calendar.cpp.

void Calendar::setViewTimeZoneId ( const QString &  timeZoneId  )  const

Notes the time zone Id which the client application intends to use for viewing the incidences in this calendar.

This is simply a convenience method which makes a note of the new time zone so that it can be read back by viewTimeId(). The client application must convert date/time values to the desired time zone itself.

The Id is not used in any way by the Calendar or its incidences. It is solely for use by the client application.

Parameters:
timeZoneId is 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 date/times. If no time zone is found, the viewing time specification is set to local clock time. Example: "Europe/Berlin"
See also:
viewTimeZoneId()

Definition at line 198 of file calendar.cpp.

KDateTime::Spec Calendar::viewTimeSpec (  )  const

Returns the time specification used for viewing the incidences in this calendar.

This simply returns the time specification last set by setViewTimeSpec().

See also:
setViewTimeSpec().

Definition at line 203 of file calendar.cpp.

QString Calendar::viewTimeZoneId (  )  const

Returns the time zone Id used for viewing the incidences in this calendar.

This simply returns the time specification last set by setViewTimeSpec().

See also:
setViewTimeZoneId().

Definition at line 208 of file calendar.cpp.

void Calendar::shiftTimes ( const KDateTime::Spec &  oldSpec,
const KDateTime::Spec &  newSpec 
)

Shifts the times of all incidences so that they appear at the same clock time as before but in a new time zone.

The shift is done from a viewing time zone rather than from the actual incidence time zone.

For example, shifting an incidence whose start time is 09:00 America/New York, using an old viewing time zone (oldSpec) of Europe/London, to a new time zone (newSpec) of Europe/Paris, will result in the time being shifted from 14:00 (which is the London time of the incidence start) to 14:00 Paris time.

Parameters:
oldSpec the time specification which provides the clock times
newSpec the new time specification
See also:
isLocalTime()

Definition at line 219 of file calendar.cpp.

ICalTimeZones * Calendar::timeZones (  )  const

Returns the time zone collection used by the calendar.

Returns:
the time zones collection.
See also:
setLocalTime()

Definition at line 214 of file calendar.cpp.

void KCal::Calendar::setTimeZones ( const ICalTimeZones &  zones  ) 

Set the time zone collection used by the calendar.

Parameters:
zones time zones collection. Important: all time zones references in the calendar must be included in the collection.

void Calendar::setModified ( bool  modified  ) 

Sets if the calendar has been modified.

Parameters:
modified is true if the calendar has been modified since open or last save.
See also:
isModified()

Definition at line 922 of file calendar.cpp.

bool Calendar::isModified (  )  const

Determine the calendar's modification status.

Returns:
true if the calendar has been modified since open or last save.
See also:
setModified()

Definition at line 933 of file calendar.cpp.

virtual void KCal::Calendar::close (  )  [pure virtual]

Clears out the current calendar, freeing all used memory etc.

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual bool KCal::Calendar::save (  )  [pure virtual]

Syncs changes in memory to persistent storage.

Returns:
true if the save was successful; false otherwise.

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual bool KCal::Calendar::reload (  )  [pure virtual]

Loads the calendar contents from storage.

This requires that the calendar has been previously loaded (initialized).

Returns:
true if the reload was successful; otherwise false.

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

bool Calendar::isSaving (  )  [virtual]

Determine if the calendar is currently being saved.

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

Reimplemented in KCal::CalendarResources.

Definition at line 917 of file calendar.cpp.

QStringList Calendar::categories (  ) 

Returns a list of all categories used by Incidences in this Calendar.

Returns:
a QStringList containing all the categories.

Definition at line 255 of file calendar.cpp.

bool Calendar::addIncidence ( Incidence *  incidence  )  [virtual]

Inserts an Incidence into the calendar.

Parameters:
incidence is a pointer to the Incidence to insert.
Returns:
true if the Incidence was successfully inserted; false otherwise.
See also:
deleteIncidence()

Reimplemented in KCal::CalendarResources.

Definition at line 415 of file calendar.cpp.

bool Calendar::deleteIncidence ( Incidence *  incidence  )  [virtual]

Removes an Incidence from the calendar.

Parameters:
incidence is a pointer to the Incidence to remove.
Returns:
true if the Incidence was successfully removed; false otherwise.
See also:
addIncidence()

Definition at line 422 of file calendar.cpp.

Incidence::List Calendar::incidences (  )  [virtual]

Returns a filtered list of all Incidences for this Calendar.

Returns:
the list of all filtered Incidences.

Definition at line 279 of file calendar.cpp.

Incidence::List Calendar::incidences ( const QDate &  date  )  [virtual]

Returns a filtered list of all Incidences which occur on the given date.

Parameters:
date request filtered Incidence list for this QDate only.
Returns:
the list of filtered Incidences occurring on the specified date.

Definition at line 274 of file calendar.cpp.

Incidence::List Calendar::rawIncidences (  )  [virtual]

Returns an unfiltered list of all Incidences for this Calendar.

Returns:
the list of all unfiltered Incidences.

Definition at line 284 of file calendar.cpp.

Incidence * Calendar::incidence ( const QString &  uid  ) 

Returns the Incidence associated with the given unique identifier.

Parameters:
uid is a unique identifier string.
Returns:
a pointer to the Incidence. A null pointer is returned if no such Incidence exists.

Definition at line 507 of file calendar.cpp.

Incidence * Calendar::incidenceFromSchedulingID ( const QString &  sid  ) 

Returns the Incidence associated with the given scheduling identifier.

Parameters:
sid is a unique scheduling identifier string.
Returns:
a pointer to the Incidence. A null pointer is returned if no such Incidence exists.

Definition at line 536 of file calendar.cpp.

Incidence::List Calendar::incidencesFromSchedulingID ( const QString &  sid  ) 

Searches all events and todos for an incidence with this scheduling identifiere.

Returns a list of matching results.

Parameters:
sid is a unique scheduling identifier string.

Definition at line 523 of file calendar.cpp.

Incidence::List Calendar::mergeIncidenceList ( const Event::List &  events,
const Todo::List &  todos,
const Journal::List &  journals 
) [static]

Create a merged list of Events, Todos, and Journals.

Parameters:
events is an Event list to merge.
todos is a Todo list to merge.
journals is a Journal list to merge.
Returns:
a list of merged Incidences.

Definition at line 1004 of file calendar.cpp.

bool Calendar::beginChange ( Incidence *  incidence  )  [virtual]

Flag that a change to a Calendar Incidence is starting.

Parameters:
incidence is a pointer to the Incidence that will be changing.

Reimplemented in KCal::CalendarResources.

Definition at line 1026 of file calendar.cpp.

bool Calendar::endChange ( Incidence *  incidence  )  [virtual]

Flag that a change to a Calendar Incidence has completed.

Parameters:
incidence is a pointer to the Incidence that was changed.

Reimplemented in KCal::CalendarResources.

Definition at line 1032 of file calendar.cpp.

Incidence * Calendar::dissociateOccurrence ( Incidence *  incidence,
const QDate &  date,
const KDateTime::Spec &  spec,
bool  single = true 
)

Dissociate an Incidence from a recurring Incidence.

By default, only one single Incidence for the specified date will be dissociated and returned. If single is false, then the recurrence will be split at date, the old Incidence will have its recurrence ending at date and the new Incidence will have all recurrences past the date.

Parameters:
incidence is a pointer to a recurring Incidence.
date is the QDate within the recurring Incidence on which the dissociation will be performed.
spec is the spec in which the date is formulated.
single is a flag meaning that a new Incidence should be created from the recurring Incidences after date.
Returns:
a pointer to a new recurring Incidence if single is false.

Definition at line 437 of file calendar.cpp.

virtual bool KCal::Calendar::addEvent ( Event *  event  )  [pure virtual]

Inserts an Event into the calendar.

Parameters:
event is a pointer to the Event to insert.
Returns:
true if the Event was successfully inserted; false otherwise.
See also:
deleteEvent()

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual bool KCal::Calendar::deleteEvent ( Event *  event  )  [pure virtual]

Removes an Event from the calendar.

Parameters:
event is a pointer to the Event to remove.
Returns:
true if the Event was successfully remove; false otherwise.
See also:
addEvent(), deleteAllEvents()

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual void KCal::Calendar::deleteAllEvents (  )  [pure virtual]

Removes all Events from the calendar.

See also:
deleteEvent()

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

Event::List Calendar::sortEvents ( Event::List *  eventList,
EventSortField  sortField,
SortDirection  sortDirection 
) [static]

Sort a list of Events.

Parameters:
eventList is a pointer to a list of Events.
sortField specifies the EventSortField.
sortDirection specifies the SortDirection.
Returns:
a list of Events sorted as specified.

Definition at line 289 of file calendar.cpp.

Event::List Calendar::events ( EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) [virtual]

Returns a sorted, filtered list of all Events for this Calendar.

Parameters:
sortField specifies the EventSortField.
sortDirection specifies the SortDirection.
Returns:
the list of all filtered Events sorted as specified.

Definition at line 407 of file calendar.cpp.

Event::List Calendar::events ( const KDateTime &  dt  ) 

Returns a filtered list of all Events which occur on the given timestamp.

Parameters:
dt request filtered Event list for this KDateTime only.
Returns:
the list of filtered Events occurring on the specified timestamp.

Definition at line 391 of file calendar.cpp.

Event::List Calendar::events ( const QDate &  start,
const QDate &  end,
const KDateTime::Spec &  timespec = KDateTime::Spec(),
bool  inclusive = false 
)

Returns a filtered list of all Events occurring within a date range.

Parameters:
start is the starting date.
end is the ending date.
timespec time zone etc. to interpret start and end, or the calendar's default time spec if none is specified
inclusive if true only Events which are completely included within the date range are returned.
Returns:
the list of filtered Events occurring within the specified date range.

Definition at line 398 of file calendar.cpp.

Event::List Calendar::events ( const QDate &  date,
const KDateTime::Spec &  timespec = KDateTime::Spec(),
EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
)

Returns a sorted, filtered list of all Events which occur on the given date.

The Events are sorted according to sortField and sortDirection.

Parameters:
date request filtered Event list for this QDate only.
timespec time zone etc. to interpret start and end, or the calendar's default time spec if none is specified
sortField specifies the EventSortField.
sortDirection specifies the SortDirection.
Returns:
the list of sorted, filtered Events occurring on date.

Definition at line 381 of file calendar.cpp.

virtual Event::List KCal::Calendar::rawEvents ( EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) [pure virtual]

Returns a sorted, unfiltered list of all Events for this Calendar.

Parameters:
sortField specifies the EventSortField.
sortDirection specifies the SortDirection.
Returns:
the list of all unfiltered Events sorted as specified.

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual Event::List KCal::Calendar::rawEventsForDate ( const KDateTime &  dt  )  [pure virtual]

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

Parameters:
dt request unfiltered Event list for this KDateTime only.
Returns:
the list of unfiltered Events occurring on the specified timestamp.

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual Event::List KCal::Calendar::rawEvents ( const QDate &  start,
const QDate &  end,
const KDateTime::Spec &  timespec = KDateTime::Spec(),
bool  inclusive = false 
) [pure virtual]

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

Parameters:
start is the starting date
end is the ending date
timespec time zone etc. to interpret start and end, or the calendar's default time spec if none is specified
inclusive if 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.

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual Event::List KCal::Calendar::rawEventsForDate ( const QDate &  date,
const KDateTime::Spec &  timespec = KDateTime::Spec(),
EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) [pure virtual]

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

The Events are sorted according to sortField and sortDirection.

Parameters:
date request unfiltered Event list for this QDate only
timespec time zone etc. to interpret date, or the calendar's default time spec if none is specified
sortField specifies the EventSortField
sortDirection specifies the SortDirection
Returns:
the list of sorted, unfiltered Events occurring on date

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual Event* KCal::Calendar::event ( const QString &  uid  )  [pure virtual]

Returns the Event associated with the given unique identifier.

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

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual bool KCal::Calendar::addTodo ( Todo *  todo  )  [pure virtual]

Inserts a Todo into the calendar.

Parameters:
todo is a pointer to the Todo to insert.
Returns:
true if the Todo was successfully inserted; false otherwise.
See also:
deleteTodo()

Implemented in KCal::CalendarLocal, KCal::CalendarNull, and KCal::CalendarResources.

virtual bool KCal::Calendar::deleteTodo ( Todo *  todo  )  [pure virtual]

Removes a Todo from the calendar.

Parameters:
todo is a pointer to the Todo to remove.
Returns:
true if the Todo was successfully removed; false otherwise.
See also:
addTodo(),