Location:
agmentry.h
Link against: agnmodel.lib
CAgnTodo
Supported from 5.0
A to-do entry or instance. A to-do entry represents a task or an action to be carried out. It has no start or end date or time. It does have a display time, which allows it to be displayed in views that contain times of day, such as day or week views. Also, it may optionally have a start date (the first date on which it is displayed in day or week views) and either a due date (to indicate the date by which the action should be carried out) or a crossed out date (the date the action was carried out). An undated to-do entry does not have a due date, a crossed out date or a start date. To-do details include the ID of the to-do list to which the to-do belongs and a priority.
All functions which set or change to-do details also set the last changed date for synchronisation purposes.
|
Defined in CAgnTodo
:
BasicTodo()
, CopyFromL()
, CrossOut()
, CrossedOutDate()
, DisplayDueDateAs()
, DisplayTime()
, DueDate()
, Duration()
, EAutomatic
, EDate
, EDays
, EDontDisplay
, InstanceEndDate()
, InstanceStartDate()
, IsAlarmSetFromDueDate()
, IsAlarmSetFromStartDate()
, IsDated()
, MakeUndated()
, NewL()
, NewLC()
, Priority()
, SetAlarmFromDueDate()
, SetAlarmFromStartDate()
, SetDisplayDueDateAs()
, SetDisplayTime()
, SetDueDate()
, SetDuration()
, SetPriority()
, SetTodoListId()
, TDisplayDueDateAs
, TodoListId()
, Type()
, UnCrossOut()
Inherited from CAgnBasicEntry
:
AddExceptionL()
,
AlarmDaysWarning()
,
AlarmInstanceDateTime()
,
AlarmTime()
,
ClearAllAttributes()
,
ClearRepeat()
,
DisplayInYearView()
,
EntrySymbol()
,
Exceptions()
,
FindException()
,
HasAlarm()
,
HasDefaultDisplayTime()
,
HasEntrySymbol()
,
HasExceptions()
,
HasExtended()
,
IsADayNote()
,
IsCrossedOut()
,
IsRepeating()
,
IsSketch()
,
IsStoredInline()
,
IsTentative()
,
PruneExceptions()
,
RemoveAllExceptions()
,
RemoveException()
,
RptDef()
,
SetAlarm()
,
SetDisplayInYearView()
,
SetEntrySymbol()
,
SetHasAlarm()
,
SetHasDefaultDisplayTime()
,
SetHasEntrySymbol()
,
SetHasExceptions()
,
SetHasExtended()
,
SetIsADayNote()
,
SetIsCrossedOut()
,
SetIsRepeating()
,
SetIsSketch()
,
SetIsStoredInline()
,
SetIsTentative()
,
SetRptEndDate()
,
SetRptStartDate()
Inherited from CAgnEntry
:
AddAttendeeL()
,
AddCategoryL()
,
AlarmSoundName()
,
AttendeeCount()
,
CastToAnniv()
,
CastToAppt()
,
CastToEvent()
,
CastToTodo()
,
CategoryCount()
,
ClearAlarm()
,
CloseEmbeddedStore()
,
CompareL()
,
CreationDate()
,
DeleteAttendee()
,
DeleteCategory()
,
EAnniv
,
EAppt
,
EDeepCopy
,
EEvent
,
EShallowCopy
,
ETodo
,
EmbeddedStore()
,
EntryId()
,
ExternalizeL()
,
FetchAttendee()
,
FetchCategory()
,
GetBackgroundColor()
,
HasAttendees()
,
HasCategory()
,
InstanceDate()
,
InstanceId()
,
InternalizeL()
,
LoadAllComponentsL()
,
Location()
,
MakeInstanceNonRepeating()
,
OpenEmbeddedStoreL()
,
OpenRichTextStoreL()
,
ReplicationData()
,
RestoreComponentsL()
,
RichTextL()
,
RichTextStreamId()
,
SetAlarmSoundNameL()
,
SetBackgroundColorL()
,
SetCreationDateL()
,
SetId()
,
SetIdAndInstanceDate()
,
SetInstanceDate()
,
SetInstanceId()
,
SetLastChangedDate()
,
SetLocationL()
,
SetReplicationData()
,
SetRichTextStreamId()
,
SetRptDefL()
,
SetUniqueId()
,
StoreComponentsL()
,
TCopyHow
,
TType
,
UniqueId()
Inherited from CBase
:
operator new()
static CAgnTodo* NewL(const CParaFormatLayer* aParaFormatLayer,const CCharFormatLayer* aCharFormatLayer,TCreateHow aCreateHow = ECreateRichText);
Allocates memory for and constructs a new to-do entry. If allocation is successful, it returns a pointer to the new object. A leave occurs if there is insufficient memory available.
|
|
static CAgnTodo* NewLC(const CParaFormatLayer* aParaFormatLayer,const CCharFormatLayer* aCharFormatLayer,TCreateHow aCreateHow = ECreateRichText);
Allocates memory for and constructs a new to-do entry. If allocation is successful, it returns a pointer to the new object which is left on the clean-up stack. A leave occurs if there is insufficient memory available.
|
|
TTime CrossedOutDate() const;
Returns the to-do entry’s crossed out date, i.e. the date on which the action required by the to-do entry was carried out. If the entry has not been crossed out, this function returns a null value.
|
void CrossOut(const TTime& aDate);
Sets the crossed out date for a to-do entry, i.e. the date on which
the action required by the to-do entry was carried out. This function sets the
entry's is crossed out property.
|
void UnCrossOut();
Clears the crossed out date for a to-do entry as set by
CrossOut()
. This function unsets the entry's is crossed out
property.
TTime DueDate() const;
Returns the to-do entry’s due date as a TTime
.
Returns a null value if the due date has not been set.
|
void SetDueDate(const TTime& aDate);
Sets the due date for a to-do entry. Because undated to-dos are possible,
the due date can be set to a null value
(Time::NullTTime()
).
|
TTimeIntervalDays Duration() const;
Returns the to-do entry’s duration, i.e. the number of days between the start date and the due date. This function can be called on an entry if it is not repeating or on an individual instance if the entry is repeating. If the duration has not been set, this function returns zero.
|
void SetDuration(TTimeIntervalDays aDuration);
Set the to-do entry's duration, i.e. the number of days between the start date and the due date. This function can be called on an entry if it is not repeating or on an individual instance if the entry is repeating.
|
virtual TTime InstanceStartDate() const;
Returns the start date of an instance of the to-do, as set by
SetInstanceDate()
or SetIdAndInstanceDate()
. If the
instance date isn't set then the start date of the to-do entry is returned.
|
virtual TTime InstanceEndDate() const;
Returns the end date of an instance of the to-do as set by
SetInstanceDate()
or SetIdAndInstanceDate()
. If the
instance date isn't set then the to-do entry’s due date (and not of one
of its instances) is returned.
|
TBool IsDated() const;
Retrieves whether the entry’s due date has been set.
|
void MakeUndated();
Makes the to-do entry undated, thus clearing most of its fields. This function sets the due date and crossed out date to null, the duration to zero and clears any alarm and repeat details.
virtual TTimeIntervalMinutes DisplayTime() const;
Returns the to-do entry’s display time. This value is set by
SetDisplayTime()
. It is typically used in views as follows. If the
to-do entry is NOT crossed out, it is displayed at the display time on the
start date, and the due date (or the time remaining before the due date) is
shown in brackets at the end of the entry. If the to-do entry IS crossed out,
it is displayed at the display time on the crossed out date (if crossed out
entries are displayed in the view), and it no longer has a due
date.
|
void SetDisplayTime(TTimeIntervalMinutes aDisplayTime);
Sets the to-do entry’s display time. A to-do entry's display time is typically used in views as follows. If the to-do is not crossed out, it is displayed at the display time on the start date, and the due date (or the time remaining before the due date) is shown in brackets at the end of the entry. If the to-do entry IS crossed out, it is displayed at the display time on the crossed out date (if crossed out entries are displayed in the view), and it no longer has a due date.
This function clears the to-do entry’s has default display time property.
|
TDisplayDueDateAs DisplayDueDateAs() const;
Returns how the to-do entry’s due date should be displayed, as set
by SetDisplayDueDateAs()
. By default, the due date is displayed as
EAutomatic
.
|
void SetDisplayDueDateAs(TDisplayDueDateAs aDisplayAs);
Sets the display mode of the to-do entry’s due date.
|
TUint Priority() const;
Returns the priority of a to-do entry as set by
SetPriority()
. The default value is zero.
|
void SetPriority(TUint aPriority);
Sets the priority for a to-do entry.
|
const TAgnBasicTodo& BasicTodo() const;
Returns the entry details specific to the to-do entry, e.g. the due and crossed out dates and the display time. Note that these details should normally be set and retrieved using other functions in this class.
|
TAgnTodoListId TodoListId() const;
Returns the ID of the to-do list to which the to-do entry belongs, as set
by SetTodoListId()
.
|
void SetTodoListId(TAgnTodoListId aTodoListId);
Sets the ID of the to-do list to which the to-do entry belongs. All to-do entries must belong to a to-do list.
|
virtual TType Type() const;
Returns the type of entry as a to-do. Used after retrieving an entry or
instance of an unknown type into a CAgnEntry
. You then have to
cast the entry to its proper type in order to use the functions provided by the
concrete class. Functions provided by CAgnEntry
can be used
without casting the entry.
|
virtual void CopyFromL(CAgnEntry* aSource,const MPictureFactory* aPictureFactory);
Copies the to-do entry and general entry details from
aSource
into this object — any previous contents
are lost.
|
TBool IsAlarmSetFromDueDate() const;
Retrieves whether the alarm date is set relative to the entry’s
due date as set by SetAlarmFromDueDate()
. By default, the alarm is
set relative to the due date.
|
void SetAlarmFromDueDate();
Sets the alarm date to be a number of days relative to the to-do
entry’s due date, rather than from its start date. This function should
be called after calling
CAgnBasicEntry::SetAlarm()
.
TBool IsAlarmSetFromStartDate() const;
Retrieves whether the alarm date is set relative to the entry’s
start date as set by SetAlarmFromStartDate()
. By default, the
alarm is set relative to the due date.
|
void SetAlarmFromStartDate();
Sets the alarm date to be a number of days from the to-do entry’s
start date rather than its due date. This function should be called after
calling CAgnBasicEntry::SetAlarm()
.
TDisplayDueDateAs
Due date display mode
|