41 */ |
47 */ |
42 NONSHARABLE_CLASS( CGlxImgVwrMetadataContainer ) : public CAknSettingItemList, |
48 NONSHARABLE_CLASS( CGlxImgVwrMetadataContainer ) : public CAknSettingItemList, |
43 public MGlxMediaListObserver |
49 public MGlxMediaListObserver |
44 |
50 |
45 { |
51 { |
46 public: |
52 public: // Constructors and destructor |
47 // Constructors and destructor |
53 void ViewDynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane); |
48 /** |
54 /** |
49 * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object. |
55 * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object. |
50 * |
56 * |
51 * @param aRect rect for control |
57 * @param aRect rect for control |
52 * @param aMediaList media list |
58 * @param aMediaList media list |
53 * @return Metadata container object |
59 * @return Metadata container object |
54 */ |
60 */ |
55 static CGlxImgVwrMetadataContainer* NewL(const TRect& aRect, |
61 static CGlxImgVwrMetadataContainer* NewL( const TRect& aRect,const TDesC& aUri); |
56 const TDesC& aUri); |
62 |
57 |
|
58 /** |
63 /** |
59 * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object. |
64 * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object. |
60 * |
65 * |
61 * @param aRect rect for control |
66 * @param aRect rect for control |
62 * @param aMediaList media list |
67 * @param aMediaList media list |
63 * @return Metadata container object |
68 * @return Metadata container object |
64 */ |
69 */ |
65 static CGlxImgVwrMetadataContainer* NewLC(const TRect& aRect, |
70 static CGlxImgVwrMetadataContainer* NewLC( const TRect& aRect,const TDesC& aUri); |
66 const TDesC& aUri); |
71 |
67 |
|
68 /** |
72 /** |
69 * Destructor |
73 * Destructor |
70 */ |
74 */ |
71 ~CGlxImgVwrMetadataContainer(); |
75 ~CGlxImgVwrMetadataContainer(); |
72 |
76 |
73 public: |
77 public: |
74 |
78 |
75 // @ref CAknSettingItemList::CreateSettingItemL |
79 // @ref CAknSettingItemList::CreateSettingItemL |
76 CAknSettingItem* CreateSettingItemL(TInt aIdentifier); |
80 CAknSettingItem* CreateSettingItemL(TInt aIdentifier); |
77 |
81 |
78 // @ref CAknSettingItemList::HandleListBoxEventL |
82 // @ref CAknSettingItemList::HandleListBoxEventL |
79 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
83 void HandleListBoxEventL(CEikListBox* aListBox, |
80 void HandleListboxChangesL(); |
84 TListBoxEvent aEventType); |
81 |
85 void HandleListboxChangesL(); |
82 //Change MSK |
86 |
|
87 //Enable disble the options based on the current selected item |
|
88 TBool IsItemModifiable(); |
|
89 //Change MSK |
83 void ChangeMskL(); |
90 void ChangeMskL(); |
84 |
|
85 //Enable marquee support |
91 //Enable marquee support |
86 void EnableMarqueingL(); |
92 void EnableMarqueingL(); |
87 |
93 |
|
94 |
|
95 |
|
96 |
88 public: |
97 public: |
89 //MedialistObserver APIS |
98 //MedialistObserver APIS |
90 void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex, |
99 void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList ); |
91 MGlxMediaList* aList); |
100 void HandleItemRemovedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList*/* aList */); |
92 void |
101 void HandleAttributesAvailableL( TInt aItemIndex, |
93 HandleItemRemovedL(TInt aStartIndex, TInt aEndIndex, |
102 const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList ); |
94 MGlxMediaList*/* aList */); |
103 void HandleFocusChangedL( NGlxListDefs::TFocusChangeType aType, |
95 void HandleAttributesAvailableL(TInt aItemIndex, const RArray< |
104 TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList ); |
96 TMPXAttribute>& aAttributes, MGlxMediaList* aList); |
105 void HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList ); |
97 void HandleFocusChangedL(NGlxListDefs::TFocusChangeType aType, |
106 void HandleMessageL( const CMPXMessage& aMessage, MGlxMediaList* aList ); |
98 TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList); |
107 void HandleError( TInt aError ); |
99 void HandleItemSelectedL(TInt aIndex, TBool aSelected, |
108 void HandleCommandCompleteL( CMPXCommand* aCommandResult, TInt aError, |
100 MGlxMediaList* aList); |
109 MGlxMediaList* aList ); |
101 void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList); |
110 void HandleMediaL( TInt aListIndex, MGlxMediaList* aList ); |
102 void HandleError(TInt aError); |
111 void HandleItemModifiedL( const RArray<TInt>& aItemIndexes, MGlxMediaList* aList ); |
103 void HandleCommandCompleteL(CMPXCommand* aCommandResult, TInt aError, |
112 void HandleErrorL(); |
104 MGlxMediaList* aList); |
113 MGlxMediaList& MediaList(); |
105 void HandleMediaL(TInt aListIndex, MGlxMediaList* aList); |
114 void HandleCommandCompleteL(TAny* aSessionId, |
106 void HandleItemModifiedL(const RArray<TInt>& aItemIndexes, |
115 CMPXCommand* /*aCommandResult*/, TInt aError, MGlxMediaList* aList); |
107 MGlxMediaList* aList); |
|
108 MGlxMediaList& MediaList(); |
|
109 void HandleCommandCompleteL(TAny* aSessionId, |
|
110 CMPXCommand* /*aCommandResult*/, TInt aError, |
|
111 MGlxMediaList* aList); |
|
112 |
116 |
113 private: |
117 private: |
114 |
118 |
115 /** |
119 /** |
116 * C++ constructor. |
120 * C++ constructor. |
117 * |
121 * |
118 * @param aMediaList media list |
122 * @param aMediaList media list |
119 */ |
123 */ |
120 CGlxImgVwrMetadataContainer(const TDesC& aUri); |
124 CGlxImgVwrMetadataContainer(const TDesC& aUri); |
|
125 |
|
126 /** |
|
127 * Symbian 2nd phase constructor |
|
128 * @param aRect rect for this control |
|
129 */ |
|
130 void ConstructL( const TRect& aRect); |
|
131 void CreateMediaListForSelectedItemL(); |
|
132 void SetAttributesL(TMPXAttribute attribute); |
|
133 void EditItemL(TInt aIndex, TBool aCalledFromMenu); |
|
134 void SetNameDescriptionL(TInt aItem); |
|
135 void SetDurationLIicenseItemVisibilityL(); |
|
136 TBool IsLicenseItem(); |
121 |
137 |
122 /** |
138 /** |
123 * Symbian 2nd phase constructor |
139 * Create Image Viewer manager Instance |
124 * @param aRect rect for this control |
140 */ |
125 */ |
141 void CreateImageViewerInstanceL(); |
126 void ConstructL(const TRect& aRect); |
142 |
127 void CreateMediaListForSelectedItemL(); |
143 /** |
128 void SetAttributesL(TMPXAttribute attribute); |
144 * Delete Image Viewer manager Instance |
129 void EditItemL(TInt aIndex, TBool aCalledFromMenu); |
145 */ |
130 void SetLicenseItemVisibilityL(); |
146 void DeleteImageViewerInstance(); |
131 |
147 |
132 /** |
148 |
133 * Create Image Viewer manager Instance |
149 private: //data |
134 */ |
150 |
135 void CreateImageViewerInstanceL(); |
151 //Flag to check if the item is a video. |
136 |
152 TBool iVideo; |
137 /** |
153 //To check if marquee is enabled. |
138 * Delete Image Viewer manager Instance |
154 TBool iMarquee; |
139 */ |
155 //to set visible license items based on the Item. |
140 void DeleteImageViewerInstance(); |
156 TBool iSetVisible; |
141 |
157 RBuf iTextSetter; |
142 private: |
158 const TDesC& iUri ; |
143 //data |
159 MGlxMediaList* iItemMediaList; |
144 //Flag to check if the item is a video. |
160 CGlxAttributeContext* iMainListAttributecontext; |
145 TBool iVideo; |
161 TGlxSelectionIterator iSelectionIterator; |
146 //To check if marquee is enabled. |
162 // For image viewer, not own |
147 TBool iMarquee; |
163 CGlxImageViewerManager* iImageViewerInstance; |
148 //to set visible license items based on the Item. |
|
149 TBool iSetVisible; |
|
150 RBuf iTextSetter; |
|
151 const TDesC& iUri; |
|
152 MGlxMediaList* iItemMediaList; |
|
153 CGlxAttributeContext* iMainListAttributecontext; |
|
154 TGlxSelectionIterator iSelectionIterator; |
|
155 // For image viewer, not own |
|
156 CGlxImageViewerManager* iImageViewerInstance; |
|
157 }; |
164 }; |
158 |
165 |
|
166 |
|
167 |
159 #endif /* GLXIMGVWRMETADATACONTAINER_H_ */ |
168 #endif /* GLXIMGVWRMETADATACONTAINER_H_ */ |