MCLFCustomGrouper Class Reference

API published in: S60 3rd Ed FP 1

Link against: contentlistingframework.lib

Capability Information

Required Capabilities

None


#include <mclfcustomgrouper.h>

Detailed Description

Custom grouper interface of Content Listing Framework.

With this interface, client can add own custom grouper to its List Model. Custom grouper is used for grouping list model items. For example, List Model of music files can be grouped by genre or artist name by using this interface. Use ContentListingFactory to create items for new groups (MCLFModifiableItem).

Example:

  // This grouper will overwrite the source list and add three items to model.
  void CMyGrouper::GroupItemsL( const TArray<MCLFItem*>& aSourceList,
                                RPointerArray<MCLFItem>& aGroupedList )
      {
      _LIT( KTest, "test" );
      MCLFModifiableItem* item = ContentListingFactory::NewModifiableItemLC();
      item->AddFieldL( ECLFFieldIdName, KTest );
      aGroupedList.AppendL( item );
      CleanupStack::Pop(); // item

      _LIT( KTest1, "test1" );
      item = ContentListingFactory::NewModifiableItemLC();
      item->AddFieldL( ECLFFieldIdName, KTest1 );
      aGroupedList.AppendL( item );
      CleanupStack::Pop(); // item

      _LIT( KTest2, "test2" );
      item = ContentListingFactory::NewModifiableItemLC();
      item->AddFieldL( ECLFFieldIdName, KTest2 );
      aGroupedList.AppendL( item );
      CleanupStack::Pop(); // item
      }

Custom grouper is activated and removed by calling method MCLFItemListModel::SetCustomGrouper


Public Member Functions

virtual void  GroupItemsL (const TArray< MCLFItem * > &aSourceList, RPointerArray< MCLFItem > &aGroupedList)=0
  Abstract method for grouping Content Listing Framework items of list models.

Protected Member Functions

virtual  ~MCLFCustomGrouper ()
  Destructor.

Constructor & Destructor Documentation

virtual MCLFCustomGrouper::~MCLFCustomGrouper  )  [inline, protected, virtual]
 

Destructor.


Member Function Documentation

virtual void MCLFCustomGrouper::GroupItemsL const TArray< MCLFItem * > &  aSourceList,
RPointerArray< MCLFItem > &  aGroupedList
[pure virtual]
 

Abstract method for grouping Content Listing Framework items of list models.

This method is called when the grouping process is executed by refreshing the model.

Parameters:
aSourceList  Source list. Contains all items that are in the list model when the grouping process starts.
aGroupedList  Grouped/destination list. While grouping, each group should be added to this list. The list model will contain only these items when the grouping process is finished.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top