CNotepadModel Class Reference
class CNotepadModel : public CNotepadCoreModel |
Engine of NpdLib. CNotepadModel is the engine of Notepad Library. This class has an array of texts for listing data in a text list box.
NpdLib.lib CNotepadCoreModel, CNotepadTableModel
Nested Classes and Structures
Inherited Functions |
---|
| CBase::CBase() |
| CBase::Delete(CBase *) |
| CBase::Extension_(TUint,TAny *&,TAny *) |
| CBase::operator new(TUint) |
| CBase::operator new(TUint,TAny *) |
| CBase::operator new(TUint,TLeave) |
| CBase::operator new(TUint,TLeave,TUint) |
| CBase::operator new(TUint,TUint) |
| CBase::~CBase() |
| CNotepadCoreModel::AppendContentAsLabelL(TDes &,RDbView &) |
| CNotepadCoreModel::AppendContentAsLabelL(TDes &,const TInt) |
| CNotepadCoreModel::CNotepadCoreModel() |
| CNotepadCoreModel::Compact() |
| CNotepadCoreModel::ContentByKeyL(const TInt) |
| CNotepadCoreModel::CountL() |
| CNotepadCoreModel::DeleteL(TInt) |
| CNotepadCoreModel::DoUpdateNotepadItemArrayAndKeyArrayL(CDesCArray &,RArray< TInt > &,HBufC &) |
| CNotepadCoreModel::InsertL(const TDesC &,TInt &) |
| CNotepadCoreModel::IsTemplates()const |
| CNotepadCoreModel::ModeOp() |
| CNotepadCoreModel::SetModeOp(CNotepadCoreModel::TNotepadModelRowResult) |
| CNotepadCoreModel::UpdateL(const TDesC &,TInt &) |
| CNotepadCoreModel::~CNotepadCoreModel() |
Constructor & Destructor Documentation
~CNotepadModel()
IMPORT_C | ~CNotepadModel | ( | ) | [virtual] |
Member Functions Documentation
AbortDeletionL()
void | AbortDeletionL | ( | ) | [private] |
Should be called if deleting process was aborted.
AddContentL(const TDesC &)
IMPORT_C void | AddContentL | ( | const TDesC & | aText | ) | |
Save text as a memo. API for SaveAsMemo.
Parameters
const TDesC & aText | text to save |
BuildItemArrayL(const TBool)
void | BuildItemArrayL | ( | const TBool | aForceSync | ) | [private] |
Create iItemArray and iKeyArray.
CNotepadModel_Reserved()
IMPORT_C void | CNotepadModel_Reserved | ( | ) | [private] |
CancelDeletion()
Cancel deleting process if running.
CompleteDeletionL()
void | CompleteDeletionL | ( | ) | [private] |
Should be called if deleting process has completed.
ConstructL(TInt)
void | ConstructL | ( | TInt | aResId | ) | [private] |
Second phase constructor.
Parameters
TInt aResId | resource id of type STRUCT NOTEPAD_MODEL |
ContentL(TInt)
Return content of the item.
Caller own a returned object.
Parameters
TInt aItemIndex | target index. |
DeleteByKeysL(const RArray< TInt > &)
Start deleting process. This method gives an incremental version of deletion.
Parameters
const RArray< TInt > & aKeys | keys of items to be deleted. |
DeleteCallBack(TAny *)
TInt
| DeleteCallBack | ( | TAny * | aSelf | ) | [private, static] |
Callback function while iExecuter is running for deletion.
Parameters
TAny * aSelf | an object of this class. |
DoBuildItemArrayL()
void | DoBuildItemArrayL | ( | ) | [private] |
Implementation of BuildItemArrayL.
DoBuildNotepadItemArrayL(TPtr &)
void | DoBuildNotepadItemArrayL | ( | TPtr & | aBuf | ) | [private] |
Implementation of BuildItemArrayL when Notepad.
DoBuildTemplateItemArrayL(TPtr &)
void | DoBuildTemplateItemArrayL | ( | TPtr & | aBuf | ) | [private] |
Implementation of BuildItemArrayL when Tempaltes.
DoDeleteCallBackL()
TInt
| DoDeleteCallBackL | ( | ) | [private] |
Callback function while iExecuter is running for deletion.
DoRemoveLinkCallBackL()
TInt
| DoRemoveLinkCallBackL | ( | ) | [private] |
Callback function while iExecuter is running for removal of links.
ExecuteDeleteStepL()
void | ExecuteDeleteStepL | ( | ) | [private] |
HandleDatabaseChangedL(TInt)
void | HandleDatabaseChangedL | ( | TInt | aStatus | ) | |
Refresh the cached data accroding to changes of the database.
This function is called from iDatabaseChangeNotifer.
HandleDateChangedL(TBool)
void | HandleDateChangedL | ( | TBool | aSyncNow | ) | |
Refresh the text array.
This function should be called if date has changed.
IndexOf(const TInt)
Return an index of the key.
Parameters
const TInt aKey | unique key id. |
IsDeleting()
TBool
| IsDeleting | ( | ) | const [inline] |
Return ETrue if deleting process is running.
IsOpen()
Return ETrue if it is opened now.
ItemArrayFlags()
Retruns the item array flags.
Key(TInt)
Return key UID of specified item.
KeyArray()
Return iKeyArray (for Editor to create a sequence).
MdcaCount()
IMPORT_C TInt | MdcaCount | ( | ) | const |
From MDesCArray. Return the number of items.
MdcaPoint(TInt)
From MDesCArray. Return the text of specified item.
NewL(RFs &, TInt)
Parameters
RFs & aFs | file server session. |
TInt aResId | resource id of type STRUCT NOTEPAD_MODEL. |
OpenL()
Open (or create) a datafile.
If already opened, do nothing. If there is no datafile, create a new datafile.
PrepareToDeleteByKeysL(const RArray< TInt > &)
void | PrepareToDeleteByKeysL | ( | const RArray< TInt > & | aKeys | ) | [private] |
Prepare to start deletion. Create a SQL statement and set it on iDbUpdate.
Parameters
const RArray< TInt > & aKeys | keys of items to be deleted. |
SeekKey(const TInt)
Seek a specified key UID in item array.
Parameters
const TInt aKey | key to seek. |
SetItemArrayFlags()
Sets the item array flags.
SetNotepadModelObserver(MNotepadModelObserver *)
Set a Notepad model observer.
SyncL(const TBool)
void | SyncL | ( | const TBool | aForceSync | ) | |
Sync iDbView, iItemArray and iKeyArray.
Parameters
const TBool aForceSync | force sync. |
Member Enumerations Documentation
Enum TNotepadModelFlag
Enumerators
ENotepadRequireDbViewUpdate = 0x01 | |
ENotepadRequireItemArrayUpdate = 0x02 | |
ENotepadIsDeleting = 0x04 | |
ENotepadIsRemovingLinks = 0x08 | |
ENotepadItemArrayUpdateOnly = 0x10 | |
Member Data Documentation
CNotepadModel::CDatabaseChangeNotifier * iDatabaseChangeNotifier
HBufC * iDateFormat
HBufC * | iDateFormat | [private] |
CIdle * iExecuter
CIdle * | iExecuter | [private] |
RFs
iFileSession
RFs
| iFileSession | [private] |
HBufC * iFixedFirstNote
HBufC * | iFixedFirstNote | [private] |
TInt
iListingStyle
TInt
| iListingStyle | [private] |
MNotepadModelObserver * iModelObserver
TInt
iProgressCount
TInt
| iProgressCount | [private] |
RArray< TInt > iSavedDeleteKeys
HBufC * iTimeFormat
HBufC * | iTimeFormat | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.