Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: agmentry.h
Link against: agnmodel.lib

Class CAgnEvent

CAgnEvent

Support

Supported from 5.0

Description

An event entry or instance. An event has a start date, optionally an end date, and a display time. Events differ from appointments in that events have a start and end date, whereas appointments have a start and end date and time. Whereas an appointment can have a duration of anything from zero to 23 hours and 59 minutes, an event is always an all-day entry with no start or end times.

Derivation

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

Defined in CAgnEvent:
BasicEvent(), CopyFromL(), DisplayTime(), EndDate(), InstanceEndDate(), InstanceStartDate(), NewL(), NewLC(), SetDisplayTime(), SetStartAndEndDate(), StartDate(), 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 CAgnEvent* NewL(const CParaFormatLayer* aParaFormatLayer,const CCharFormatLayer* aCharFormatLayer,TCreateHow aCreateHow = ECreateRichText);

Description

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

The event start and end dates and the instance date are all initialised to null, the event’s has default display time property is set and the display time is set to zero.

Parameters

const CParaFormatLayer* aParaFormatLayer

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

const CCharFormatLayer* aCharFormatLayer

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

TCreateHow aCreateHow = ECreateRichText

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

Return value

CAgnEvent*

Pointer to the new event entry.


NewLC()

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

Description

Allocates memory for and constructs a new event 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 event start and end dates and the instance date are all initialised to null, the event’s has default display time property is set and the display time is set to zero.

Parameters

const CParaFormatLayer* aParaFormatLayer

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

const CCharFormatLayer* aCharFormatLayer

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

TCreateHow aCreateHow = ECreateRichText

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

Return value

CAgnEvent*

Pointer to the new event entry.

[Top]


Event-specific information


BasicEvent()

const TAgnBasicAppt& BasicAppt() const;

Description

Returns the event-specific entry details, i.e. the start date and end date and the display time. Note that these details should normally be set and retrieved using other functions in this class.

Return value

TAgnBasicEvent&

The event-specific entry details.

[Top]


Display time


DisplayTime()

virtual TTimeIntervalMinutes DisplayTime() const;

Description

Returns the event entry’s display time. This may have been set by SetDisplayTime(), or may be the default display time. The display time can be used to tell the user interface where to display the event in a view that contains times of day, such as day or week views.

Return value

TTimeIntervalMinutes

The event entry’s display time, as an offset in minutes from midnight.


SetDisplayTime()

void SetDisplayTime(TTimeIntervalMinutes aDisplayTime);

Description

Sets the display time for an event entry. Unsets the entry's has default display time property.

Parameters

TTimeIntervalMinutes aDisplayTime

The new display time, as an offset in minutes from midnight at the beginning of the start date.

[Top]


Start and end date


StartDate()

TTime StartDate() const;

Description

Returns the start date of the event entry as set by SetStartAndEndDate().

Return value

TTime

The event entry’s start date, specified as a TTime but without a time component.


InstanceStartDate()

virtual TTime InstanceStartDate() const;

Description

Returns the start date of a particular instance of the event. If the instance date isn't set then the start date of the entry is returned.

Return value

TTime

The event instance’s start date, or the event entry’s start date if the instance date isn’t set.


EndDate()

TTime EndDate() const;

Description

Returns the event entry’s end date as set by SetStartAndEndDate(). If SetStartAndEndDate() was called without specifying an end date, then the end date is set to be the same as the start date.

Return value

TTime

The event entry’s end date, specified as a TTime but without a time component.


InstanceEndDate()

virtual TTime InstanceEndDate() const;

Description

Returns the end date (the start date plus the event's duration in days) of an event instance. If the instance date isn't set then the end date of the entry is returned.

Return value

TTime

The event instance’s end date, or the event entry’s end date if the instance date isn’t set.


SetStartAndEndDate()

void SetStartAndEndDate(const TTime& aStartDate,const TTime& aEndDate=Time::NullTTime());

Description

Sets the start and end dates of the event. If the second parameter (the end date) is not supplied in the calling code then the end date is set to the same value as the start date.

Parameters

const TTime& aStartDate

The event entry’s start date.

const TTime& aEndDate=Time::NullTTime()

The event entry’s end date. If this is omitted, the end date will default to the start date.

[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 event. 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 (EEvent).

[Top]


Copy


CopyFromL()

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

Description

Copies the event 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 those specific to event entries.

const MPictureFactory* aPictureFactory

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