Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: agmentry.h
Link against: agnmodel.lib

Class CAgnAppt

CAgnAppt

Support

Supported from 5.0

Description

An appointment entry or instance. Other entry types have a start and end date (or due/crossed out date for to-dos), and a separate display time. Appointments on the other hand have a start date/time and an end date/time specified using the TAgnDateTime class. The display time is inherent in the start date/time.

An appointment whose end date/time is the same as its start date/time is known as a day note. A day note has a date (the date component of its date/time) and a display time (the time component of the date/time). The display time can be used to tell the user interface where to display the day note in a view that contains times of day, such as in day or week views.

Derivation

CAgnApptAn appointment entry or instance
CAgnBasicEntryAbstract base class for the entry classes CAgnAppt, CAgnTodo, CAgnEvent and CAgnAnniv
CAgnEntryAbstract base class for the concrete agenda entry classes
CBaseBase class for all classes to be instantiated on the heap

Defined in CAgnAppt:
BasicAppt(), CopyFromL(), DisplayTime(), EndDateTime(), InstanceEndDate(), InstanceStartDate(), NewL(), NewLC(), SetDisplayTime(), SetStartAndEndDateTime(), StartDateTime(), Type()

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()


Construction


NewL()

static CAgnAppt* NewL(const CParaFormatLayer* aParaFormatLayer,const CCharFormatLayer* aCharFormatLayer,TCreateHow aCreateHow = ECreateRichText));

Description

Allocates memory for and constructs a new appointment entry. If allocation is successful, it returns a pointer to the new object. A leave occurs if there is insufficient memory available.

The appointment's start and end dates and the instance date are all initialised to null, and the start and end times are initialised to zero, i.e. it is a day note by default.

Parameters

const CParaFormatLayer* aParaFormatLayer

Pointer to the format layer on which the entry's rich text paragraph formatting will be based.

const CCharFormatLayer* aCharFormatLayer

Pointer to the format layer on which the entry's rich text character formatting will be based.

TCreateHow aCreateHow = ECreateRichText

This argument is used internally, for test purposes only. As it has a default value, it should be ignored by developers.

Return value

CAgnAppt*

Pointer to the new appointment entry.


NewLC()

static CAgnAppt* NewLC(const CParaFormatLayer* aParaFormatLayer,const CCharFormatLayer* aCharFormatLayer,TCreateHow aCreateHow = ECreateRichText);

Description

Allocates memory for and constructs a new appointment 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.

The appointment's start and end dates and the instance date are all initialised to null, and the start and end times are initialised to zero, i.e. it is a day note by default.

Parameters

const CParaFormatLayer* aParaFormatLayer

Pointer to the format layer on which the entry's rich text paragraph formatting will be based.

const CCharFormatLayer* aCharFormatLayer

Pointer to the format layer on which the entry's rich text character formatting will be based.

TCreateHow aCreateHow = ECreateRichText

This argument is used internally, for test purposes only. As it has a default value, it should be ignored by developers.

Return value

CAgnAppt*

Pointer to the new appointment entry.

[Top]


Basic appointment information


BasicAppt()

const TAgnBasicAppt& BasicAppt() const;

Description

Returns the appointment entry's basic details, i.e. the start date/time and end date/time. Note that these details should normally be set and retrieved using other functions in this class.

Return value

TAgnBasicAppt&

The appointment entry’s basic details (start date/time and end date/time).

[Top]


Display time


DisplayTime()

virtual TTimeIntervalMinutes DisplayTime() const;

Description

Returns the day note’s display time. When called for an ordinary appointment (i.e. which is not a day note), the function returns the time component of the appointment's start date/time.

Return value

TTimeIntervalMinutes

The day note’s display time or the timed appointment’s start time.


SetDisplayTime()

void SetDisplayTime(TTimeIntervalMinutes aDisplayTime);

Description

Sets the display time for day notes. This function should only be called for a day note. It also unsets the entry's has default display time property.

Parameters

TTimeIntervalMinutes aDisplayTime

The display time to be set — an interval in minutes from midnight.

[Top]


Start and end date/time


StartDateTime()

TTime StartDateTime() const;

Description

Returns the start date/time of an appointment entry. To get a day note's display time, DisplayTime() should normally be used instead.

Return value

TTime

The appointment entry’s start date/time or the display time if it is a day note.


EndDateTime()

TTime EndDateTime() const;

Description

Returns the appointment’s end date/time. This is the same as the start date/time for a day note.

Return value

TTime

The appointment entry’s end date/time.


SetStartAndEndDateTime()

void SetStartAndEndDateTime(const TTime& aStartDateTime,const TTime& aEndDateTime);

Description

Sets the start and end date/times for an appointment. A null value for the end date/time (this is the default) indicates that the appointment is a day note.

If the entry is alarmed and an appointment is changed into a day note, or vice versa, then its alarm time must be adjusted accordingly. This is because a day note's alarm time is calculated as an offset from midnight, but an appointment's alarm time is calculated as an offset from the start time.

Parameters

const TTime& aStartDateTime

The appointment entry’s new start date/time.

const TTime& aEndDateTime

The appointment entry’s new end date/time — this should be NULL if the appointment is a day note.


InstanceStartDate()

virtual TTime InstanceStartDate() const;

Description

Returns the start date/time of an instance of the appointment. If the instance date isn't set (i.e. it is a non-repeating entry) then the start date/time of the entry is returned.

Return value

TTime

The appointment instance’s start date/time, or the appointment entry’s start date/time if the instance date/time isn’t set.


InstanceEndDate()

virtual TTime InstanceEndDate() const;

Description

Returns the end date/time of an instance of the appointment entry. If the instance date isn't set (i.e. it is a non-repeating entry) then the end date/time of the appointment entry is returned, or the display date/time, if the entry is a day note.

Return value

TTime

The appointment instance’s end date/time, or the appointment entry’s end date/time if the instance date/time isn’t set, or the display time if it is a day note.

[Top]


Entry type


Type()

virtual TType Type() const;

Description

This implements the pure virtual function in CAgnEntry and returns the type of entry as an appointment. 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.

Return value

TType

The entry type (EAppt).

[Top]


Copy


CopyFromL()

virtual void CopyFromL(CAgnEntry* aSource,const MPictureFactory* aPictureFactory);

Description

Copies the appointment entry and general entry details from aSource into this object  — any previous contents are lost.

Parameters

CAgnEntry* aSource

Pointer to an agenda entry object containing details common to all entries and optionally details specific to appointment entries.

const MPictureFactory* aPictureFactory

Pointer to a picture header factory. This argument only needs to be specified if the source entry contains embedded pictures.