|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : CCEGroupView.h 00004 * Part of : Content Listing Framework Sample Application 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 00017 #ifndef __CCEGROUPVIEW_H__ 00018 #define __CCEGROUPVIEW_H__ 00019 00020 // INCLUDES 00021 #include <aknview.h> 00022 #include <e32base.h> 00023 #include <e32std.h> 00024 #include <babackup.h> 00025 #include <CLFContentListing.hrh> 00026 00027 #include "CLFExample.hrh" 00028 00029 // FORWARD DECLARATIONS 00030 class MCLFContentListingEngine; 00031 class MCLFItemListModel; 00032 00033 class CCEGroupContainer; 00034 class CCEOperationObserver; 00035 class CCECustomGrouper; 00036 class CCEPostFilter; 00037 class CCEWaitNote; 00038 00039 // CLASS DECLARATION 00040 00041 /** 00042 * Group view for CLF Example Application. 00043 * The view is for displaying groups of music files. 00044 */ 00045 class CCEGroupView 00046 : public CAknView 00047 { 00048 public: // Constructors and destructor 00049 00050 /** 00051 * Creates and returns a new instance of this class. 00052 * @param aEngine Pointer to a Content Listing Engine 00053 * @param aModel Pointer to a Listing Model 00054 * @param aObserver Pointer to a CLF Operation Observer 00055 * @return Pointer to the CCEGroupView object 00056 */ 00057 static CCEGroupView* NewL( MCLFContentListingEngine* aEngine, 00058 MCLFItemListModel* aModel, 00059 CCEOperationObserver* aObserver ); 00060 00061 /** 00062 * Creates and returns a new instance of this class. 00063 * The returned object is left on the cleanup stack. 00064 * @param aEngine Pointer to a Content Listing Engine 00065 * @param aModel Pointer to a Listing Model 00066 * @param aObserver Pointer to a CLF Operation Observer 00067 * @return Pointer to the CCEGroupView object 00068 */ 00069 static CCEGroupView* NewLC( MCLFContentListingEngine* aEngine, 00070 MCLFItemListModel* aModel, 00071 CCEOperationObserver* aObserver ); 00072 00073 /** 00074 * Destructor. 00075 */ 00076 virtual ~CCEGroupView(); 00077 00078 private: // Constructors 00079 /** 00080 * C++ default constructor. 00081 * @param aEngine Pointer to a Content Listing Engine 00082 * @param aModel Pointer to a Listing Model 00083 * @param aObserver Pointer to a CLF Operation Observer 00084 */ 00085 CCEGroupView( MCLFContentListingEngine* aEngine, 00086 MCLFItemListModel* aModel, 00087 CCEOperationObserver* aObserver ); 00088 00089 /** 00090 * Symbian 2nd phase constructor. 00091 */ 00092 void ConstructL(); 00093 00094 public: // Functions from base classes 00095 00096 /** 00097 * From CAknView. Handle user's commands. 00098 */ 00099 void HandleCommandL( TInt aCommand ); 00100 00101 /** 00102 * From CAknView. Get Id of the view. 00103 */ 00104 TUid Id() const; 00105 00106 /** 00107 * From CAknView. Activate the view. 00108 */ 00109 void DoActivateL(const TVwsViewId& aPrevViewId, 00110 TUid aCustomMessageId, 00111 const TDesC8& aCustomMessage); 00112 00113 /** 00114 * From CAknView. Deactivate the view. 00115 */ 00116 void DoDeactivate(); 00117 00118 /** 00119 * From CAknView. Handle change of rect. 00120 */ 00121 void HandleClientRectChange(); 00122 00123 /** 00124 * From CAknView. Dim items of the menu pane. 00125 */ 00126 void DynInitMenuPaneL( TInt aResourceId, 00127 CEikMenuPane* aMenuPane ); 00128 00129 private: // New functions 00130 00131 /** 00132 * Group items in the list model if they were grouped when the view 00133 * was deactivated. For example, files are grouped when you switch 00134 * back from music view to group view. 00135 * @param aGroupingState State of grouping 00136 */ 00137 void GroupListItemsL( const TCEGrouping aGroupingState ); 00138 00139 /** 00140 * Show user a warning note that no music files were found for selected 00141 * grouping option. 00142 */ 00143 void NoMusicFilesFoundL(); 00144 00145 /** 00146 * List all files from the list model to the list box. 00147 * @param aFieldId Field to view in the list box. Album name is shown 00148 * in album grouping and artist name is shown in the artist 00149 * grouping. 00150 */ 00151 void PopulateListBoxL( const TCLFDefaultFieldId aFieldId ); 00152 00153 private: // Data 00154 00155 // Container of group view (owned) 00156 CCEGroupContainer* iContainer; 00157 00158 // Content listing engine (not owned) 00159 MCLFContentListingEngine* iEngine; 00160 00161 // Content listing model (not owned) 00162 MCLFItemListModel* iModel; 00163 00164 // Operation observer (not owned) 00165 CCEOperationObserver* iObserver; 00166 00167 // Custom grouper for artist grouping (owned) 00168 CCECustomGrouper* iArtistGrouper; 00169 00170 // Post filter for filtering by artist and album (owned) 00171 CCEPostFilter* iPostFilter; 00172 00173 // Wait note dialog for indicating refreshing process of the List Model 00174 // (owned) 00175 CCEWaitNote* iWaitNote; 00176 00177 // For waiting the asynchronous refresh operation to complete 00178 CActiveSchedulerWait iWait; 00179 00180 // Grouping state that is currently selected 00181 TCEGrouping iGrouping; 00182 }; 00183 00184 #endif // __CCEGROUPVIEW_H__ 00185 00186 // End of File
|
© Nokia 2009 |