UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: QikCategoryModel.h
Link against: qikcore.lib

Class QikCategoryUtils

class QikCategoryUtils;

Description

Category utility functions.

This class provides static methods to initialise categories from an INI file or resource file, and to externalise to an INI file. It has a private constructor and destructor, making it impossible to create instances of this class.

Members

Defined in QikCategoryUtils:
ConstructCategoriesLC(), LoadCategoriesFromIniFileL(), LoadCategoriesFromResourceL(), SaveCategoriesToIniFileL()

See also:


Member functions


ConstructCategoriesLC()

static IMPORT_C CQikCategoryModel *ConstructCategoriesLC(TInt aCategoryResourceId=KNoCategoryResource, TUid aCategoryStreamId=TUid::Uid(KCategoryNullStream));

Description

Constructs a category model and initialises it from a resource or ini file.

To construct a category model:

If both resource and stream IDs are given, the categories are loaded from the ini file if possible. If this is not possible, the categories are loaded from the resource.

Parameters

TInt aCategoryResourceId

The ID for the resource containing the category initialisation information.

TUid aCategoryStreamId

The Stream ID in the ini file from which to initialise the categories. If this is not specified the function attempts to load the information from a resource file.

Return value

CQikCategoryModel *


LoadCategoriesFromResourceL()

static IMPORT_C void LoadCategoriesFromResourceL(CQikCategoryModel &aCategoryModel, TInt aCategoryResourceId, TResourceReader *aResourceReader=0);

Description

Initialises a CQikCategoryModel from the application’s resource file.

Parameters

CQikCategoryModel &aCategoryModel

The category model to be initialised.

TInt aCategoryResourceId

The resource id of a resource containing a list of categories.

TResourceReader *aResourceReader

A resource file reader.


LoadCategoriesFromIniFileL()

static IMPORT_C TBool LoadCategoriesFromIniFileL(CQikCategoryModel &aCategoryModel, TUid aCategoryStreamId, const CDictionaryStore *aStore=0);

Description

Initialises a CQikCategoryModel from the application’s INI file.

Parameters

CQikCategoryModel &aCategoryModel

The category model to be initialised.

TUid aCategoryStreamId

The Id of the category stream in the application’s INI file.

const CDictionaryStore *aStore

The INI file store. If set to NULL the function loads the current application’s INI file.

Return value

TBool

ETrue if data was loaded from the INI file, otherwise EFalse .


SaveCategoriesToIniFileL()

static IMPORT_C void SaveCategoriesToIniFileL(const CQikCategoryModel &aCategoryModel, TUid aCategoryStreamId, CDictionaryStore *aStore=0);

Description

Saves category data from the category model to the application's INI file.

Parameters

const CQikCategoryModel &aCategoryModel

The category model which is to have its data saved.

TUid aCategoryStreamId

The stream Id of a category stream in the application's INI file.

CDictionaryStore *aStore

The INI file store. If set to NULL the function loads the current application's INI file.

Terms and conditions of use of the material