Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: agmtodos.h
Link against: agnmodel.lib

Class CAgnTodoList

CAgnTodoList

Support

Supported from 5.0

Description

A to-do list is a list of to-do entries. It has a name, an ID and display settings. The display settings include the sort order, whether to-do entries should be displayed in other views and whether crossed out to-do entries should be displayed.

A to-do instance list (CAgnTodoInstanceList) on the other hand, contains a list of to-do instance IDs that match the filter criteria specified when populating the list and holds a subset of a to-do list's entries that are to be displayed at a given time.

To-do lists are held in a list of to-do lists (CAgnTodoListList), which is owned by the agenda model. Before a new to-do entry is added to the model, the to-do list to which it belongs must be specified using CAgnTodo::SetTodoListId().

Derivation

CAgnTodoListA to-do list is a list of to-do entries
CBaseBase class for all classes to be instantiated on the heap

Defined in CAgnTodoList:
ChangeTodoOrderL(), CopyBasicsFrom(), Count(), DefaultDisplayTimeInOtherViews(), DisplayCrossedOutEntries(), DisplayCrossedOutEntriesInOtherViews(), DisplayEntriesInOtherViews(), EByDate, EByPriority, EManual, Id(), Name(), NewL(), SetDefaultDisplayTimeInOtherViews(), SetDisplayCrossedOutEntries(), SetDisplayCrossedOutEntriesInOtherViews(), SetDisplayEntriesInOtherViews(), SetName(), SetSortOrder(), SetTodoDefaults(), SetTodoDisplaySettings(), SortOrder(), TSortOrder, TodoDefaults(), TodoDisplaySettings(), ~CAgnTodoList()

Inherited from CBase:
operator new()


Construction and destruction


NewL()

static CAgnTodoList* NewL();

Description

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

Return value

CAgnTodoList*

Pointer to the new to-do list.


~CAgnTodoList()

virtual ~CAgnTodoList();

Description

The destructor deletes the array of entry IDs owned by the object, prior to its destruction.

[Top]


Display information


DisplayEntriesInOtherViews()

TBool DisplayEntriesInOtherViews() const;

Description

Returns whether to-do entries should be displayed in views other than the to-do view.

Return value

TBool

ETrue if to-do entries should be displayed in views other than the to-do view, EFalse if not.


SetDisplayEntriesInOtherViews()

void SetDisplayEntriesInOtherViews(TBool aSetting);

Description

Sets whether to-do entries should be displayed in views other than the to-do view and updates the to-do list's last changed date/time.

Parameters

TBool aSetting

ETrue if to-do entries should be displayed in views other than the to-do view, EFalse if not.


DefaultDisplayTimeInOtherViews()

TTimeIntervalMinutes DefaultDisplayTimeInOtherViews() const;

Description

Returns the default display time for to-do entries which belong to this to-do list in views other than the to-do view. This value is a number of minutes since midnight and is set by SetDefaultDisplayTimeInOtherViews().

Return value

TTimeIntervalMinutes

The default display time setting, in number of minutes since midnight, for to-do entries in views other than the to-do view.


SetDefaultDisplayTimeInOtherViews()

void SetDefaultDisplayTimeInOtherViews(TTimeIntervalMinutes aTime);

Description

For to-do entries belonging to this to-do list, sets the default display time setting for views other than the to-do view. The value is a number of minutes since midnight.

Parameters

TTimeIntervalMinutes aTime

The default display time setting, as a number of minutes since midnight, for to-do entries in views other than the to-do view.


DisplayCrossedOutEntries()

TBool DisplayCrossedOutEntries() const;

Description

Tests whether crossed out to-do entries should be displayed in the to-do view as set by SetDisplayCrossedOutEntries().

Return value

TBool

ETrue if crossed out to-do entries should be displayed in the to-do view, EFalse if not.


SetDisplayCrossedOutEntries()

void SetDisplayCrossedOutEntries(TBool aDisplay);

Description

Sets whether crossed out to-do entries should be displayed in the to-do view and updates the to-do list's last changed date/time.

Parameters

TBool aDisplay

ETrue if crossed out to-do entries should be displayed in the to-do view, EFalse if not.


DisplayCrossedOutEntriesInOtherViews()

TBool DisplayCrossedOutEntriesInOtherViews() const;

Description

Tests whether crossed out to-do entries should be displayed in views other than the to-do view as set by SetDisplayCrossedOutEntriesInOtherViews().

Return value

TBool

ETrue if crossed out to-do entries should be displayed in views other than the to-do view, EFalse if not.


SetDisplayCrossedOutEntriesInOtherViews()

void SetDisplayCrossedOutEntriesInOtherViews(TBool aSetting);

Description

Sets whether crossed out to-do entries should be displayed in views other than the to-do view and updates the to-do list's last changed date/time.

Parameters

TBool aSetting

ETrue if crossed out to-do entries should be displayed in views other than the to-do view, EFalse if not.


TodoDisplaySettings()

const TAgnTodoDisplaySettings& TodoDisplaySettings() const;

Description

Returns the settings that control how to-do entries are displayed in views other than the to-do view. Note that all of these settings can also be retrieved using other member functions of CAgnTodoList.

Return value

TAgnTodoDisplaySettings&

Reference to the settings that show how to-do entries are displayed in views other than the to-do view.


SetTodoDisplaySettings()

void SetTodoDisplaySettings(const TAgnTodoDisplaySettings& aSettings);

Description

Sets the settings that control how to-do entries are displayed in views other than the to-do view. Note that all of these settings can also be set using other member functions of CAgnTodoList.

Parameters

const TAgnTodoDisplaySettings& aSettings

Const reference to the settings that show how to-do entries are displayed in views other than the to-do view.

[Top]


To-do list name


Name()

TPtrC Name() const;

Description

Gets the name of the to-do list, as set by SetName().

Return value

TPtrC

The name of the to-do list.


SetName()

void SetName(const TDesC& aName);

Description

Sets the name for the to-do list. The maximum length for the name is 50 characters. If the name is more than 50 characters, only the first 50 will be used.

Parameters

const TDesC& aName

Const reference to the name for the to-do list.

[Top]


Sort order


SortOrder()

TSortOrder SortOrder() const;

Description

Gets the sort order of the to-do entries in the to-do list as it is displayed in the to-do view. Also updates the last changed date/time. The sort order is set by SetSortOrder().

Return value

TSortOrder

How the to-do entries are to be sorted in the to-do view: EManual, EByDate or EByPriority.


SetSortOrder()

void SetSortOrder(TSortOrder aSortOrder);

Description

Sets the sort order of the to-do entries in the to-do list as it is displayed in the to-do view. This is not the sort order of the to-do entries in the to-do list object.

Parameters

TSortOrder aSortOrder

How the to-do entries are to be sorted in the to-do view: EManual, EByDate or EByPriority.


ChangeTodoOrderL()

void ChangeTodoOrderL(TAgnEntryId aId,TAgnEntryId aTodoPositionReferenceId = AgnModel::NullId());

Description

Moves an entry from its current position to the position before aTodoPositionReferenceId. This function should only be called if the sort order is EManual. If aTodoPositionReferenceId is null (the default), or if aTodoPositionReferenceId is not found, aId is added to the end of the list.

Parameters

TAgnEntryId aId

The entry ID of the to-do entry to move.

TAgnEntryId aTodoPositionReferenceId = AgnModel::NullId()

The ID which identifies the position in the list before which to place the new to-do entry.

[Top]


To-do list details


Id()

TAgnTodoListId Id() const;

Description

Gets the to-do list ID.

Return value

TAgnTodoListId

The to-do list ID.


Count()

TInt Count() const;

Description

Gets the number of to-do entries in the list.

Return value

TInt

The number of to-do entries in the list.

[Top]


Copy


CopyBasicsFrom()

void CopyBasicsFrom(const CAgnTodoList* aTodoList);

Description

Copy the details (including name, sort order, display settings and default settings, but not including the to-do list ID or any to-do entries) from aTodoList into this to-do list.

Parameters

const CAgnTodoList* aTodoList

Const pointer to the to-do list details.

[Top]


To-do list defaults


TodoDefaults()

const TAgnTodoDefaults& TodoDefaults() const;

Description

Returns the default settings given to a new to-do entry.

Return value

TAgnTodoDefaults&

Reference to the default settings (including alarm defaults) given to a new to-do entry.


SetTodoDefaults()

void SetTodoDefaults(const TAgnTodoDefaults& aTodoDefaults);

Description

Changes the default settings given to a new to-do entry. Also updates the to-do list's last changed date/time. The to-do entry defaults have default values — for details see the documentation of class TAgnTodoDefaults.

Parameters

const TAgnTodoDefaults& aTodoDefaults

Const reference to the default settings given to a new to-do entry.

[Top]


Enumerations


Enum TSortOrder

TSortOrder

Description

Ordering of to-do entries as displayed in a view

EManual

Sort manually.

EByDate

Sort by date.

EByPriority

Sort by priority.