libkcal

#include <todo.h>

Inheritance diagram for KCal::Todo:
KCal::Incidence KCal::IncidenceBase KCal::CustomProperties

Public Types

typedef ListBase< TodoList
 
- Public Types inherited from KCal::Incidence
enum  Status {
  StatusNone , StatusTentative , StatusConfirmed , StatusCompleted ,
  StatusNeedsAction , StatusCanceled , StatusInProcess , StatusDraft ,
  StatusFinal , StatusX
}
 
enum  { SecrecyPublic = 0 , SecrecyPrivate = 1 , SecrecyConfidential = 2 }
 
typedef ListBase< IncidenceList
 
- Public Types inherited from KCal::IncidenceBase
enum  { SYNCNONE = 0 , SYNCMOD = 1 , SYNCDEL = 3 }
 

Public Member Functions

 Todo (const Todo &)
 
Todooperator= (const Todo &)
 
bool operator== (const Todo &) const
 
TQCString type () const
 
Todoclone ()
 
void setDtDue (const TQDateTime &dtDue, bool first=false)
 
TQDateTime dtDue (bool first=false) const
 
TDE_DEPRECATED TQString dtDueTimeStr () const
 
TDE_DEPRECATED TQString dtDueDateStr (bool shortfmt=true) const
 
TDE_DEPRECATED TQString dtDueStr () const
 
bool hasDueDate () const
 
void setHasDueDate (bool hasDueDate)
 
bool hasStartDate () const
 
void setHasStartDate (bool hasStartDate)
 
TQDateTime dtStart (bool first=false) const
 
void setDtStart (const TQDateTime &dtStart)
 
TQString dtStartTimeStr (bool first=false) const
 
TQString dtStartDateStr (bool shortfmt=true, bool first=false) const
 
TQString dtStartStr (bool first=false) const
 
bool isCompleted () const
 
void setCompleted (bool completed)
 
int percentComplete () const
 
void setPercentComplete (int)
 
TQDateTime completed () const
 
TQString completedStr () const
 
void setCompleted (const TQDateTime &completed)
 
bool hasCompletedDate () const
 
void setDtRecurrence (const TQDateTime &dt)
 
TQDateTime dtRecurrence () const
 
virtual bool recursOn (const TQDate &date) const
 
bool isOverdue () const
 
- Public Member Functions inherited from KCal::Incidence
 Incidence (const Incidence &)
 
Incidenceoperator= (const Incidence &i)
 
bool operator== (const Incidence &) const
 
void setReadOnly (bool readonly)
 
void setFloats (bool f)
 
void recreate ()
 
void setCreated (const TQDateTime &)
 
TQDateTime created () const
 
void setRevision (int rev)
 
int revision () const
 
virtual TQDateTime dtEnd () const
 
void setDescription (const TQString &description)
 
TQString description () const
 
void setSummary (const TQString &summary)
 
TQString summary () const
 
void setCategories (const TQStringList &categories)
 
void setCategories (const TQString &catStr)
 
TQStringList categories () const
 
TQString categoriesStr () const
 
void setRelatedToUid (const TQString &)
 
TQString relatedToUid () const
 
void setRelatedTo (Incidence *relatedTo)
 
IncidencerelatedTo () const
 
Incidence::List relations () const
 
void addRelation (Incidence *)
 
void removeRelation (Incidence *)
 
Recurrencerecurrence () const
 
void clearRecurrence ()
 
bool doesRecur () const
 
uint recurrenceType () const
 
bool recursAt (const TQDateTime &qdt) const
 
virtual bool recursOn (const TQDate &qd, Calendar *cal) const
 
bool recursAt (const TQDateTime &qdt, Calendar *cal) const
 
virtual TQValueList< TQDateTime > startDateTimesForDate (const TQDate &date) const
 
virtual TQValueList< TQDateTime > startDateTimesForDateTime (const TQDateTime &datetime) const
 
virtual TQDateTime endDateForStart (const TQDateTime &startDt) const
 
void addAttachment (Attachment *attachment)
 
void deleteAttachment (Attachment *attachment)
 
void deleteAttachments (const TQString &mime)
 
Attachment::List attachments () const
 
Attachment::List attachments (const TQString &mime) const
 
void clearAttachments ()
 
void setSecrecy (int)
 
int secrecy () const
 
TQString secrecyStr () const
 
void setStatus (Status status)
 
void setCustomStatus (const TQString &status)
 
Status status () const
 
TQString statusStr () const
 
void setResources (const TQStringList &resources)
 
TQStringList resources () const
 
void setPriority (int priority)
 
int priority () const
 
bool hasRecurrenceID () const
 
void setHasRecurrenceID (bool hasRecurrenceID)
 
void setRecurrenceID (const TQDateTime &recurrenceID)
 
TQDateTime recurrenceID () const
 
void addChildIncidence (TQString childIncidence)
 
void deleteChildIncidence (TQString childIncidence)
 
IncidenceList childIncidences () const
 
const Alarm::Listalarms () const
 
AlarmnewAlarm ()
 
void addAlarm (Alarm *)
 
void removeAlarm (Alarm *)
 
void clearAlarms ()
 
bool isAlarmEnabled () const
 
void setLocation (const TQString &location)
 
TQString location () const
 
void setSchedulingID (const TQString &sid)
 
TQString schedulingID () const
 
virtual void recurrenceUpdated (Recurrence *)
 
- Public Member Functions inherited from KCal::IncidenceBase
 IncidenceBase (const IncidenceBase &)
 
IncidenceBaseoperator= (const IncidenceBase &i)
 
bool operator== (const IncidenceBase &) const
 
void setUid (const TQString &)
 
TQString uid () const
 
void setLastModified (const TQDateTime &lm)
 
TQDateTime lastModified () const
 
void setOrganizer (const Person &o)
 
void setOrganizer (const TQString &o)
 
Person organizer () const
 
bool isReadOnly () const
 
virtual TQDateTime dtStart () const
 
virtual TDE_DEPRECATED TQString dtStartTimeStr () const
 
virtual TDE_DEPRECATED TQString dtStartDateStr (bool shortfmt=true) const
 
virtual TDE_DEPRECATED TQString dtStartStr () const
 
virtual void setDuration (int seconds)
 
int duration () const
 
void setHasDuration (bool)
 
bool hasDuration () const
 
bool doesFloat () const
 
void setFloats (bool f)
 
void addComment (const TQString &comment)
 
bool removeComment (const TQString &comment)
 
void clearComments ()
 
TQStringList comments () const
 
void addAttendee (Attendee *attendee, bool doUpdate=true)
 
void clearAttendees ()
 
const Attendee::Listattendees () const
 
int attendeeCount () const
 
AttendeeattendeeByMail (const TQString &) const
 
AttendeeattendeeByMails (const TQStringList &, const TQString &email=TQString()) const
 
AttendeeattendeeByUid (const TQString &uid) const
 
void setSyncStatus (int status)
 
void setSyncStatusSilent (int status)
 
int syncStatus () const
 
void setPilotId (unsigned long id)
 
unsigned long pilotId () const
 
void registerObserver (Observer *)
 
void unRegisterObserver (Observer *)
 
void updated ()
 
void updatedSilent ()
 
- 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 Member Functions

virtual TQDateTime endDateRecurrenceBase () const
 
- Protected Member Functions inherited from KCal::IncidenceBase
virtual void customPropertyUpdated ()
 

Additional Inherited Members

- Static Public Member Functions inherited from KCal::Incidence
static TQStringList secrecyList ()
 
static TQString secrecyName (int)
 
static TQString statusName (Status)
 
- Protected Attributes inherited from KCal::IncidenceBase
bool mReadOnly
 

Detailed Description

This class provides a Todo in the sense of RFC2445.

Definition at line 31 of file todo.h.

Member Function Documentation

◆ clone()

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.

◆ completed()

TQDateTime Todo::completed ( ) const

Returns date and time when todo was completed.

Definition at line 235 of file todo.cpp.

◆ completedStr()

TQString Todo::completedStr ( ) const

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

Definition at line 243 of file todo.cpp.

◆ dtDue()

TQDateTime Todo::dtDue ( bool  first = false) const

Returns due date and time.

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

Definition at line 117 of file todo.cpp.

◆ dtDueDateStr()

TQString Todo::dtDueDateStr ( bool  shortfmt = true) const

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

Parameters
shortfmtIf set to true, use short date format, if set to false use long format.
Deprecated:
use IncidenceFormatter::dateToString()

Definition at line 133 of file todo.cpp.

◆ dtDueStr()

TQString Todo::dtDueStr ( ) const

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

Deprecated:
use IncidenceFormatter::dateTimeToString()

Definition at line 139 of file todo.cpp.

◆ dtDueTimeStr()

TQString Todo::dtDueTimeStr ( ) const

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

Deprecated:
use IncidenceFormatter::timeToString()

Definition at line 128 of file todo.cpp.

◆ dtRecurrence()

TQDateTime Todo::dtRecurrence ( ) const

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

Definition at line 284 of file todo.cpp.

◆ dtStart()

TQDateTime Todo::dtStart ( bool  first = false) const

Returns the startdate of the todo.

Parameters
firstIf true, the startdate of the todo will be returned. If the todo recurs, the startdate of the first occurrence 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 177 of file todo.cpp.

◆ dtStartDateStr()

TQString 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
shortfmtIf true, use short date format, if set to false use long format.
firstIf true, the startdate of the todo will be returned. If the todo recurs, the startdate of the first occurrence 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 207 of file todo.cpp.

◆ dtStartStr()

TQString 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
firstIf true, the startdate of the todo will be returned. If the todo recurs, the startdate of the first occurrence 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 212 of file todo.cpp.

◆ dtStartTimeStr()

TQString Todo::dtStartTimeStr ( bool  first = false) const

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

Parameters
firstIf true, the startdate of the todo will be returned. If the todo recurs, the startdate of the first occurrence 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 202 of file todo.cpp.

◆ endDateRecurrenceBase()

virtual TQDateTime KCal::Todo::endDateRecurrenceBase ( ) const
inlineprotectedvirtual

Return the end date/time of the base incidence.

Reimplemented from KCal::Incidence.

Definition at line 222 of file todo.h.

◆ hasCompletedDate()

bool Todo::hasCompletedDate ( ) const

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

Definition at line 258 of file todo.cpp.

◆ hasDueDate()

bool Todo::hasDueDate ( ) const

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

Definition at line 144 of file todo.cpp.

◆ hasStartDate()

bool Todo::hasStartDate ( ) const

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

Definition at line 157 of file todo.cpp.

◆ isCompleted()

bool Todo::isCompleted ( ) const

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

Definition at line 217 of file todo.cpp.

◆ isOverdue()

bool Todo::isOverdue ( ) const

Returns true if this todo is overdue (e.g.

due date is lower than today and not completed), else false.

Definition at line 328 of file todo.cpp.

◆ percentComplete()

int Todo::percentComplete ( ) const

Returns how many percent of the task are completed.

Returns a value between 0 and 100.

Definition at line 263 of file todo.cpp.

◆ recursOn()

bool Todo::recursOn ( const TQDate &  date) const
virtual

Returns true if the date specified is one on which the todo will recur.

Todo's are a special case, hence the overload. It adds an extra check, which make it return false if there's an occurrence between the recurstart and today.

Reimplemented from KCal::Incidence.

Definition at line 289 of file todo.cpp.

◆ setCompleted() [1/2]

void Todo::setCompleted ( bool  completed)

Set completed state.

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

Definition at line 223 of file todo.cpp.

◆ setCompleted() [2/2]

void Todo::setCompleted ( const TQDateTime &  completed)

Set date and time of completion.

Definition at line 248 of file todo.cpp.

◆ setDtDue()

void Todo::setDtDue ( const TQDateTime &  dtDue,
bool  first = false 
)

Sets due date and time.

Parameters
dtDueThe due date/time.
firstSet the date of the first occurrence (if the todo is recurrent).

Definition at line 85 of file todo.cpp.

◆ setDtRecurrence()

void Todo::setDtRecurrence ( const TQDateTime &  dt)

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

Definition at line 279 of file todo.cpp.

◆ setDtStart()

void Todo::setDtStart ( const TQDateTime &  dtStart)
virtual

Sets the startdate of the todo.

Reimplemented from KCal::Incidence.

Definition at line 192 of file todo.cpp.

◆ setHasDueDate()

void Todo::setHasDueDate ( bool  hasDueDate)

Set if the todo has a due date.

Parameters
hasDueDatetrue if todo has a due date, otherwise false

Definition at line 149 of file todo.cpp.

◆ setHasStartDate()

void Todo::setHasStartDate ( bool  hasStartDate)

Set if the todo has a start date.

Parameters
hasStartDatetrue if todo has a start date, otherwise false

Definition at line 162 of file todo.cpp.

◆ setPercentComplete()

void Todo::setPercentComplete ( int  v)

Set how many percent of the task are completed.

Valid values are in the range from 0 to 100.

Definition at line 268 of file todo.cpp.


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