»
Symbian OS v6.1 Edition for C++ »
API Reference »
Agenda File »
CAgnSymbolList
Location:
agmlists.h
Link against: agnmodel.lib
CAgnSymbolList
Support
Supported from 5.0
Description
A list of the days in a month which have entry symbols.
Each list
item consists of the day number (0 to 30) and either one or two entry symbols
for that day. A list item can hold a maximum of two symbols — if
a day has more than two entry symbols, only the first two symbols are used. If
a day does not have any symbols, there is no list entry for it. If a month does
not have any symbols, there is no list. The list also stores the month and year
of interest. You can iterate through the list using NextDay()
or
PreviousDay()
. The list is populated using
CAgnEntryModel::GetSymbolInstanceList()
or
CAgnModel::PopulateSymbolInstanceListL()
.
Derivation
CAgnSymbolList | A list of the days in a month which have entry symbols |
CBase | Base class for all classes to be instantiated on the heap |
|
Defined in CAgnSymbolList
:
Count()
, DayNumber()
, FirstSymbol()
, Month()
, MoreSymbols()
, NewL()
, NextDay()
, NumSymbols()
, NumSymbolsForDay()
, PreviousDay()
, SecondSymbol()
, SetIteratorToStart()
, SetMonth()
, SetYear()
, SetYearAndMonth()
, TListItem
, Year()
, operator[]()
, ~CAgnSymbolList()
Inherited from CBase
:
operator new()
Construction and destruction
static CAgnSymbolList* NewL(TTimeIntervalYears aYear,TMonth aMonth);
Description
Allocates and constructs a new symbol list with the specified
month and year. The list iterator is set to the start of the
list.
Parameters
TTimeIntervalYears aYear |
The year. |
TMonth aMonth |
The month. |
|
Return value
CAgnSymbolList* |
Pointer to the newly created list. |
|
virtual ~CAgnSymbolList();
Description
The destructor frees all resources owned by the symbol list,
prior to its destruction.
void SetIteratorToStart();
Description
Sets the list iterator to the first item in the list (the first
symbol on the first day). This function is called during
construction.
TBool NextDay(TUint& aDayNum);
Description
Gets the day number of the next list item (if there is one) and
returns True, otherwise returns False. If the iterator is positioned on the
first symbol of the day and there is a second symbol for the day, then gets the
day number of that day and the iterator moves to the second
symbol.
Parameters
TUint& aDayNum |
On return, the day number. |
|
Return value
TBool |
True if there is a next day or if the iterator moves to a second
symbol on the same day, otherwise False. False is also returned if the list is
empty. |
|
TBool PreviousDay(TUint& aDayNum);
Description
Moves backwards through the list and gets the day number of the
previous list item (if there is one) and returns True, otherwise returns False.
If the iterator is positioned on the second symbol of the day, then the day
number returned is of that day and the iterator moves to the first symbol. If
the previous day has two symbols, the iterator is moved to the second symbol,
otherwise the iterator is moved to the first symbol.
Parameters
TUint& aDayNum |
On return, the day number. |
|
Return value
TBool |
True if there is a previous day or if the iterator moves to the first
symbol on the same day, otherwise False. False is also returned if the list is
empty. |
|
void SetMonth(TMonth aMonth);
Description
Sets the month for the list.
Parameters
void SetYear(TTimeIntervalYears aYear);
Description
Sets the year for the list.
Parameters
TTimeIntervalYears aYear |
The year. |
|
void SetYearAndMonth(TTimeIntervalYears aYear,TMonth aMonth);
Description
Sets the year and the month for the list.
Parameters
TTimeIntervalYears aYear |
The year. |
TMonth aMonth |
The month. |
|
TInt Count() const;
Description
Returns the number of items in the list.
Return value
TInt |
The number of items in the list. |
|
TUint DayNumber(TInt aIndex) const;
Description
Returns the day number for the indexed list item.
Parameters
Return value
TUint |
The day number for the indexed list item. |
|
TMonth Month() const;
Description
Gets the month.
Return value
TTimeIntervalYears Year() const;
Description
Gets the year.
Return value
TTimeIntervalYears |
The year. |
|
TChar FirstSymbol(TInt aIndex) const;
Description
Returns the first symbol for the indexed list item.
Parameters
Return value
TChar |
The first symbol for the indexed list item. |
|
TChar SecondSymbol(TInt aIndex) const;
Description
Returns the second symbol for the indexed list item.
Parameters
Return value
TChar |
The second symbol for the indexed list item. |
|
TBool MoreSymbols(TInt aIndex) const;
Description
Tests whether there are more than two symbols for the day indicated by
the indexed list item. Note that list items can only store a maximum of two
entry symbols.
Parameters
Return value
TBool |
ETrue if there are more than two symbols for the day,
EFalse if not.
|
|
TUint NumSymbols(TInt aIndex) const;
Description
Returns the number of symbols for the indexed day.
Parameters
Return value
TUint |
The number of symbols for the indexed day. |
|
TUint NumSymbolsForDay(TUint aDayNum,TInt& aIndex);
Description
Returns the number of symbols and the index for the given day
number.
Parameters
TUint aDayNum |
The day number (0 - 30 inclusive). |
TInt& aIndex |
On return, the corresponding index (if the day number is valid) otherwise
undefined. |
|
Return value
TUint |
The number of symbols if the day number is valid, otherwise zero. |
|
const TListItem& operator[](TInt aIndex) const;
Description
Returns a list item using the supplied list index.
Parameters
Return value
TListItem& |
The list item at the indexed position. |
|
TListItem
Description
A single item in a symbol list.
A
symbol list item is returned by CAgnSymbolList::operator[]()
.
Defined in CAgnSymbolList::TListItem
:
DayNumber()
, FirstSymbol()
, FirstSymbolColor()
, MoreSymbols()
, NumSymbols()
, SecondSymbol()
, SetFirstSymbol()
, SetFirstSymbolColor()
, SetMoreSymbols()
, SetNumSymbols()
, SetSecondSymbol()
Set details
SetNumSymbols()
void SetNumSymbols(TUint aNumSymbols);
Description
Sets the number of entry symbols for the current list
item.
Parameters
TUint aNumSymbols |
The number of symbols. |
|
SetMoreSymbols()
void SetMoreSymbols(TBool aMoreSymbols);
Description
Sets a flag to indicate whether there are more than two entry symbols for
the current list item.
Parameters
TBool aMoreSymbols |
True if there are more than two symbols, otherwise False. |
|
SetFirstSymbol()
void SetFirstSymbol(TChar aSymbol);
Description
Sets the character as the first entry symbol for the current list
item.
Parameters
TChar aSymbol |
The symbol to set. |
|
SetFirstSymbolColor()
void SetFirstSymbolColor(const TRgb& aColor);
Support
Supported from 6.0
Description
Sets the background colour for the first entry symbol for the current
list item.
Note
Only the first entry symbol can have a background
colour.
Return value
TRgb |
The first symbol's background colour. |
|
SetSecondSymbol()
void SetSecondSymbol(TChar aSymbol);
Description
Sets the character as the second entry symbol for the current list
item.
Parameters
TChar aSymbol |
The symbol to set. |
|
Get details
DayNumber()
TUint DayNumber() const;
Description
Gets the day number of the current list item.
Return value
NumSymbols()
TUint NumSymbols() const;
Description
Gets the number of symbols for the current list
item.
Return value
TUint |
The number of symbols. |
|
MoreSymbols()
TBool MoreSymbols() const;
Description
Tests whether there are more than two entry symbols for the day of the
current list item (list items can store a maximum of two entry symbols, but
there may be more than two entry symbols on that day).
Return value
TBool |
True if there are more than two symbols, otherwise False. |
|
FirstSymbol()
TChar FirstSymbol() const;
Description
Get the first entry symbol for the current list
item.
Return value
FirstSymbolColor()
TRgb FirstSymbolColor() const;
Support
Supported from 6.0
Description
Get the background colour for the first symbol in the current list item,
as set by SetFirstSymbolColor()
.
Return value
TRgb |
The first entry symbol's background colour. |
|
SecondSymbol()
TChar SecondSymbol() const;
Description
Get the second symbol for the current list item.
Return value