libkcal Library API Documentation

KCal::Todo Class Reference

This class provides a Todo in the sense of RFC2445. More...

#include <todo.h>

Inheritance diagram for KCal::Todo:

Inheritance graph
[legend]
Collaboration diagram for KCal::Todo:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ListBase< TodoList

Public Member Functions

 Todo (const Todo &)
bool operator== (const Todo &) const
QCString type () const
Todoclone ()
void setDtDue (const QDateTime &dtDue, bool first=false)
QDateTime dtDue (bool first=false) const
QString dtDueTimeStr () const
QString dtDueDateStr (bool shortfmt=true) const
QString dtDueStr () const
bool hasDueDate () const
void setHasDueDate (bool hasDueDate)
bool hasStartDate () const
void setHasStartDate (bool hasStartDate)
QDateTime dtStart (bool first=false) const
void setDtStart (const QDateTime &dtStart)
QString dtStartTimeStr (bool first=false) const
QString dtStartDateStr (bool shortfmt=true, bool first=false) const
QString dtStartStr (bool first=false) const
bool isCompleted () const
void setCompleted (bool completed)
int percentComplete () const
void setPercentComplete (int)
QDateTime completed () const
QString completedStr () const
void setCompleted (const QDateTime &completed)
bool hasCompletedDate () const
void setDtRecurrence (const QDateTime &dt)
QDateTime dtRecurrence () const

Detailed Description

This class provides a Todo in the sense of RFC2445.

Definition at line 31 of file todo.h.


Member Function Documentation

Todo * Todo::clone  )  [virtual]
 

Returns an exact copy of this todo.

The returned object is owned by the caller.

Implements KCal::Incidence.

Definition at line 54 of file todo.cpp.

void Todo::setDtDue const QDateTime dtDue,
bool  first = false
 

Sets due date and time.

Parameters:
dtDue The due date/time.
first Set the date of the first occurence (if the todo is recurrent).

Definition at line 72 of file todo.cpp.

References KCal::Incidence::doesRecur(), KCal::Incidence::recurrence(), setDtStart(), and KCal::IncidenceBase::updated().

Referenced by KCal::Calendar::dissociateOccurrence(), KCal::DndFactory::pasteIncidence(), and KCal::VCalFormat::VTodoToEvent().

QDateTime Todo::dtDue bool  first = false  )  const
 

Returns due date and time.

Parameters:
first If true and the todo recurs, the due date of the first occurence will be returned.If false and recurrent, the date of the current occurence will be returned. If non-recurrent, the normal due date will be returned.

Definition at line 102 of file todo.cpp.

References KCal::Incidence::doesRecur().

Referenced by KCal::Calendar::dissociateOccurrence(), dtDueDateStr(), dtDueStr(), dtDueTimeStr(), dtStart(), KCal::VCalFormat::eventToVTodo(), KCal::DndFactory::pasteIncidence(), KCal::CalendarLocal::rawTodosForDate(), and KCal::Alarm::time().

QString Todo::dtDueTimeStr  )  const
 

Returns due time as string formatted according to the users locale settings.

Definition at line 110 of file todo.cpp.

References KCal::Incidence::doesRecur(), and dtDue().

QString Todo::dtDueDateStr bool  shortfmt = true  )  const
 

Returns due date as string formatted according to the users locale settings.

Parameters:
shortfmt If set to true, use short date format, if set to false use long format.

Definition at line 115 of file todo.cpp.

References KCal::Incidence::doesRecur(), and dtDue().

QString Todo::dtDueStr  )  const
 

Returns due date and time as string formatted according to the users locale settings.

Definition at line 120 of file todo.cpp.

References KCal::Incidence::doesRecur(), and dtDue().

bool Todo::hasDueDate  )  const
 

Returns true if the todo has a due date, otherwise return false.

Definition at line 125 of file todo.cpp.

Referenced by KCal::Calendar::dissociateOccurrence(), KCal::VCalFormat::eventToVTodo(), and KCal::CalendarLocal::rawTodosForDate().

void Todo::setHasDueDate bool  hasDueDate  ) 
 

Set if the todo has a due date.

Parameters:
hasDueDate true if todo has a due date, otherwise false

Definition at line 130 of file todo.cpp.

References KCal::IncidenceBase::updated().

Referenced by KCal::VCalFormat::VTodoToEvent().

bool Todo::hasStartDate  )  const
 

Returns true if the todo has a start date, otherwise return false.

Definition at line 138 of file todo.cpp.

Referenced by KCal::Calendar::dissociateOccurrence(), and KCal::VCalFormat::eventToVTodo().

void Todo::setHasStartDate bool  hasStartDate  ) 
 

Set if the todo has a start date.

Parameters:
hasDueDate true if todo has a start date, otherwise false

Definition at line 143 of file todo.cpp.

References KCal::IncidenceBase::addComment(), KCal::IncidenceBase::comments(), KCal::Incidence::doesRecur(), KCal::IncidenceBase::removeComment(), and KCal::IncidenceBase::updated().

Referenced by KCal::VCalFormat::VTodoToEvent().

QDateTime Todo::dtStart bool  first = false  )  const
 

Returns the startdate of the todo.

Parameters:
first If true, the startdate of the todo will be returned. If the todo recurs, the startdate of the first occurence will be returned. If false and the todo recurs, the relative startdate will be returned, based on the date returned by dtRecurrence().

Definition at line 158 of file todo.cpp.

References KCal::Incidence::doesRecur(), dtDue(), and KCal::IncidenceBase::dtStart().

Referenced by KCal::Calendar::dissociateOccurrence(), and KCal::VCalFormat::eventToVTodo().

void Todo::setDtStart const QDateTime dtStart  )  [virtual]
 

Sets the startdate of the todo.

Reimplemented from KCal::Incidence.

Definition at line 166 of file todo.cpp.

References KCal::Incidence::doesRecur(), KCal::Incidence::recurrence(), and KCal::IncidenceBase::setDtStart().

Referenced by KCal::Calendar::dissociateOccurrence(), setDtDue(), and KCal::VCalFormat::VTodoToEvent().

QString Todo::dtStartTimeStr bool  first = false  )  const
 

Returns an todo's starting time as a string formatted according to the users locale settings.

Parameters:
first If true, the startdate of the todo will be returned. If the todo recurs, the startdate of the first occurence will be returned. If false and the todo recurs, the relative startdate will be returned, based on the date returned by dtRecurrence().

Definition at line 173 of file todo.cpp.

References KCal::IncidenceBase::dtStart().

QString Todo::dtStartDateStr bool  shortfmt = true,
bool  first = false
const
 

Returns an todo's starting date as a string formatted according to the users locale settings.

Parameters:
first If true, the startdate of the todo will be returned. If the todo recurs, the startdate of the first occurence will be returned. If false and the todo recurs, the relative startdate will be returned, based on the date returned by dtRecurrence().

Definition at line 178 of file todo.cpp.

References KCal::IncidenceBase::dtStart().

QString Todo::dtStartStr bool  first = false  )  const
 

Returns an todo's starting date and time as a string formatted according to the users locale settings.

Parameters:
first If true, the startdate of the todo will be returned. If the todo recurs, the startdate of the first occurence will be returned. If false and the todo recurs, the relative startdate will be returned, based on the date returned by dtRecurrence().

Definition at line 183 of file todo.cpp.

References KCal::IncidenceBase::dtStart().

bool Todo::isCompleted  )  const
 

Returns true if the todo is 100% completed, otherwise return false.

Definition at line 188 of file todo.cpp.

Referenced by KCal::VCalFormat::eventToVTodo().

void Todo::setCompleted bool  completed  ) 
 

Set completed state.

Parameters:
completed If true set completed state to 100%, if false set completed state to 0%.

Definition at line 194 of file todo.cpp.

References KCal::IncidenceBase::updated().

Referenced by KCal::VCalFormat::VTodoToEvent().

int Todo::percentComplete  )  const
 

Returns how many percent of the task are completed.

Returns a value between 0 and 100.

Definition at line 224 of file todo.cpp.

void Todo::setPercentComplete int   ) 
 

Set how many percent of the task are completed.

Valid values are in the range from 0 to 100.

Definition at line 229 of file todo.cpp.

References KCal::IncidenceBase::updated().

QDateTime Todo::completed  )  const
 

Returns date and time when todo was completed.

Definition at line 201 of file todo.cpp.

Referenced by KCal::VCalFormat::eventToVTodo().

QString Todo::completedStr  )  const
 

Returns string contaiting date and time when the todo was completed formatted according to the users locale settings.

Definition at line 206 of file todo.cpp.

void Todo::setCompleted const QDateTime completed  ) 
 

Set date and time of completion.

Definition at line 211 of file todo.cpp.

References KCal::IncidenceBase::updated().

bool Todo::hasCompletedDate  )  const
 

Returns true, if todo has a date associated with completion, otherwise return false.

Definition at line 219 of file todo.cpp.

Referenced by KCal::VCalFormat::eventToVTodo().

void Todo::setDtRecurrence const QDateTime dt  ) 
 

Sets the due date/time of the current occurence if recurrent.

Definition at line 235 of file todo.cpp.

QDateTime Todo::dtRecurrence  )  const
 

Returns the due date/time of the current occurence if recurrent.

Definition at line 240 of file todo.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkcal Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Aug 23 18:19:01 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003