Location:
agmbasic.h
Link against: agnmodel.lib
CAgnBasicEntry
Supported from 5.0
Abstract base class for the entry classes CAgnAppt
,
CAgnTodo
, CAgnEvent
and CAgnAnniv
. It
provides an interface to alarm and repeat information (for repeating entries)
and to entry attributes e.g. whether the entry is tentative and whether it is
crossed out.
Repeat exceptions are dates which would normally be included in an entry’s repeat dates, but are excluded. For instance if an entry is to repeat on the 4th of every month but not on the 4th January, then the 4th January is an exception. A repeat can have more than one exception and all exceptions are stored in an exception list, which is part of the entry’s repeat details.
Entries have a last changed date/time, which is used for synchronisation, and is updated each time the entry is changed.
|
Defined in 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()
, ~CAgnBasicEntry()
Inherited from CBase
:
operator new()
virtual ~CAgnBasicEntry();
The destructor frees all resources owned by the object, prior to its destruction.
TTimeIntervalDays AlarmDaysWarning() const;
Returns the number of days warning for the entry’s alarm,
as set by CAgnBasicEntry::SetAlarm()
. Number of days warning is a
time interval in days and is the number of days before an entry’s start
date, that the alarm is set to sound. Returns zero if the entry is not
alarmed.
|
TTime AlarmInstanceDateTime() const;
Returns the due date/time of the alarm for the current instance if the entry is repeating or just its normal due date/time if it’s non-repeating.
|
TTimeIntervalMinutes AlarmTime() const;
Returns the time of the alarm as a time interval in minutes from midnight. This time applies to all instances of the alarm if it is repeating because they all occur at the same time on different dates.
|
TBool HasAlarm() const;
Tests whether the entry is alarmed.
|
void SetHasAlarm(TBool aHasAlarm);
Set the entry’s alarm property.
|
void SetAlarm(TTimeIntervalDays aDaysWarning,TTimeIntervalMinutes aTime);
Set the alarm’s due date/time. Two intervals may be set: the time interval in days between the entry's start date and the date on which the alarm will sound; and the time of day (as an interval in minutes from midnight) the alarm is set to sound.
Note
To-dos have their alarm warning period set relative to their due date by
default. The period may also be set relative to the start date of the
to-do — if this is required
CAgnTodo::SetAlarmFromStartDate
should be called after calling
this function.
|
TBool HasEntrySymbol() const;
Tests whether the entry has an entry symbol.
|
void SetHasEntrySymbol(TBool aHasEntrySymbol);
Sets whether or not the entry has an entry symbol.
|
void SetEntrySymbol(TChar aEntrySymbol);
Sets the entry symbol.
|
void SetRptEndDate(TAgnDate aRptEndDate);
For a repeating entry, sets the repeat end date.
|
void SetRptStartDate(TAgnDate aRptStartDate);
For a repeating entry, sets the repeat start date.
|
TBool IsRepeating() const;
Is the entry repeating?
|
void SetIsRepeating(TBool aIsRepeating);
Sets the entry’s is repeating property.
|
void ClearRepeat();
Clears the repeat details including exceptions and unsets the entry's repeating property.
CAgnRptDef* RptDef();
const CAgnRptDef* RptDef() const;
Returns a pointer to the entry’s repeat details, including exceptions.
Two versions of the function are supplied. The compiler chooses the appropriate version based on the use made of the returned reference. If the returned reference is used in an expression where that reference can be modified, then the non-const version is chosen.
|
void AddExceptionL(const TAgnException& aException);
For a repeating entry, adds an exception to the list of repeat exceptions.
|
const CAgnExceptionList* Exceptions() const;
For a repeating entry, returns a pointer to a list of the exceptions.
|
TBool FindException(TAgnException& aException) const;
Searches for an exception in the exceptions list. If the exception is
found in the exception list, ETrue
is returned, otherwise
EFalse
.
|
|
TBool HasExceptions() const;
Returns whether or not the entry has repeat exceptions, as set by
SetHasExceptions()
.
|
void SetHasExceptions(TBool aHasExceptions);
Sets the entry’s has exceptions property.
|
void PruneExceptions();
Compares the entry's exceptions with the repeat start and end dates. Removes any exceptions which occur before the start or after the end of the repeat period and exceptions which do not fall on repeat dates. If, after pruning, there are no exceptions left, the entry's has exceptions property is unset.
void RemoveAllExceptions();
Removes all exceptions from the exception list. The entry's has exceptions property is unset.
TBool RemoveException(const TAgnException& aException);
Removes an exception from the exception list if it can be found and if
so, returns ETrue
. If the exception cannot be found, it returns
EFalse
. If no more exceptions are left after
aException
is removed, the entry's has exceptions property is
unset.
|
|
TBool HasDefaultDisplayTime() const;
Does the entry use the default display time?
|
void SetHasDefaultDisplayTime(TBool aHasDefaultDisplayTime);
Sets the entry’s has default display time property. This property is set to true when an entry (excluding appointments which must have a display time set when created) is created and before a display time has been set. Once the display time is set, this property is set to false.
|
TBool HasExtended() const;
This function indicates whether the entry has extended attributes (added in EPOC Release 5 and later). It should not be called by third parties.
void SetHasExtended(TBool aHasExtended);
This function sets a flag to indicate whether the entry has extended attributes (added in EPOC Release 5 and later). This flag is set automatically so this function should not be called by third parties.
TBool IsSketch() const;
Tests whether the entry is a sketch. An entry can be a sketch if the only thing contained in the entry's rich text is a picture character providing a link to the embedded sketch.
|
void SetIsSketch(TBool aIsSketch);
Set the entry’s sketch property. An entry can be a sketch if the only thing contained in the entry's rich text is a picture character providing a link to the embedded sketch.
|
TBool IsTentative() const;
Tests whether the entry is tentative (not yet confirmed).
|
void SetIsTentative(TBool aIsTentative);
Sets the entry’s tentative property. This is set to true if the entry is not yet confirmed.
|
TBool DisplayInYearView() const;
Returns whether the entry is displayed in the application's year view.
|
void SetDisplayInYearView(TBool aDisplayInYearView);
Sets whether the entry should be displayed in the application's year view.
|
TBool IsADayNote() const;
Tests whether the entry is a day note.
|
void SetIsADayNote(TBool aIsADayNote);
Sets the entry’s is a day note property.
|
TBool IsCrossedOut() const;
Tests whether the entry is crossed out.
|
void SetIsCrossedOut(TBool aIsCrossedOut);
Sets the entry’s crossed out property.
Note
If the entry is a to-do, call CAgnTodo::CrossOut()
or
CAgnTodo::UnCrossOut()
instead.
|
TBool IsStoredInline() const;
Tests whether the entry's rich text object is stored inline or out of line.
|
void SetIsStoredInline(TBool aIsStoredInline);
Sets whether the entry's rich text object is stored inline or out of line.
|
void ClearAllAttributes();
Clears all entry attributes, for instance whether the entry is tentative and whether it is crossed out.