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:

KCal::Incidence KCal::IncidenceBase KCal::CustomProperties List of all members.

Public Types

typedef ListBase< Todo > List

Public Methods

 Todo ()
 Todo (const Todo &)
 ~Todo ()
bool operator== (const Todo &) const
QCString type () const
Todo * clone ()
void setDtDue (const QDateTime &dtDue)
QDateTime dtDue () 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)
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

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]
 

Return an exact copy of this todo.

The returned object is owned by the caller.

Implements KCal::Incidence.

Definition at line 53 of file todo.cpp.

void Todo::setDtDue const QDateTime   dtDue
 

Set due date and time.

Definition at line 71 of file todo.cpp.

References KCal::IncidenceBase::updated().

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

QDateTime Todo::dtDue   const
 

Return due date and time.

Definition at line 93 of file todo.cpp.

Referenced by KCal::VCalFormat::eventToVTodo(), KCal::DndFactory::pasteIncidence(), KCal::Alarm::time(), and KCal::CalendarLocal::todos().

QString Todo::dtDueTimeStr   const
 

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

Definition at line 98 of file todo.cpp.

References QDateTime::time().

QString Todo::dtDueDateStr bool    shortfmt = true const
 

Return 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 103 of file todo.cpp.

References QDateTime::date().

QString Todo::dtDueStr   const
 

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

Definition at line 108 of file todo.cpp.

bool Todo::hasDueDate   const
 

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

Definition at line 113 of file todo.cpp.

Referenced by KCal::VCalFormat::eventToVTodo(), and KCal::CalendarLocal::todos().

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 118 of file todo.cpp.

References KCal::IncidenceBase::updated().

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

bool Todo::hasStartDate   const
 

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

Definition at line 126 of file todo.cpp.

Referenced by 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 131 of file todo.cpp.

References KCal::IncidenceBase::updated().

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

bool Todo::isCompleted   const
 

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

Definition at line 139 of file todo.cpp.

Referenced by KCal::VCalFormat::eventToVTodo(), and KCal::CalFilter::filterTodo().

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 145 of file todo.cpp.

References KCal::IncidenceBase::updated().

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

int Todo::percentComplete   const
 

Return how many percent of the task are completed.

Returns a value between 0 and 100.

Definition at line 175 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 180 of file todo.cpp.

References KCal::IncidenceBase::updated().

QDateTime Todo::completed   const
 

Return date and time when todo was completed.

Definition at line 152 of file todo.cpp.

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

QString Todo::completedStr   const
 

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

Definition at line 157 of file todo.cpp.

void Todo::setCompleted const QDateTime   completed
 

Set date and time of completion.

Definition at line 162 of file todo.cpp.

References KCal::IncidenceBase::updated().

bool Todo::hasCompletedDate   const
 

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

Definition at line 170 of file todo.cpp.

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


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.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:25 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003