60
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Image viewer metadata dialog container implementation
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef GLXIMGVWRMETADATACONTAINER_H_
|
|
19 |
#define GLXIMGVWRMETADATACONTAINER_H_
|
|
20 |
|
|
21 |
|
|
22 |
#include <glxmedialist.h> //media list
|
|
23 |
#include <alf/alfenv.h>
|
|
24 |
#include <aknsettingitemlist.h> // for CAknSettingItem
|
|
25 |
#include "mglxmedialistobserver.h"
|
|
26 |
#include <glxattributecontext.h>
|
|
27 |
#include <glximageviewermanager.h>
|
|
28 |
|
|
29 |
//FORWARD DECLARATION
|
|
30 |
class MGlxMediaList;
|
|
31 |
class CGlxDetailsMulModelProvider;
|
|
32 |
class CGlxCommandHandlerAddToContainer;
|
|
33 |
|
|
34 |
#include "glxmedia.h"
|
|
35 |
|
|
36 |
// CLASS DECLARATION
|
|
37 |
/**
|
|
38 |
* CGlxImgVwrMetadataContainer
|
|
39 |
*
|
|
40 |
* Metadata Container implementation
|
|
41 |
*/
|
|
42 |
NONSHARABLE_CLASS( CGlxImgVwrMetadataContainer ) : public CAknSettingItemList,
|
|
43 |
public MGlxMediaListObserver
|
|
44 |
|
|
45 |
{
|
|
46 |
public:
|
|
47 |
// Constructors and destructor
|
|
48 |
/**
|
|
49 |
* Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
|
|
50 |
*
|
|
51 |
* @param aRect rect for control
|
|
52 |
* @param aMediaList media list
|
|
53 |
* @return Metadata container object
|
|
54 |
*/
|
|
55 |
static CGlxImgVwrMetadataContainer* NewL(const TRect& aRect,
|
|
56 |
const TDesC& aUri);
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
|
|
60 |
*
|
|
61 |
* @param aRect rect for control
|
|
62 |
* @param aMediaList media list
|
|
63 |
* @return Metadata container object
|
|
64 |
*/
|
|
65 |
static CGlxImgVwrMetadataContainer* NewLC(const TRect& aRect,
|
|
66 |
const TDesC& aUri);
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Destructor
|
|
70 |
*/
|
|
71 |
~CGlxImgVwrMetadataContainer();
|
|
72 |
|
|
73 |
public:
|
|
74 |
|
|
75 |
// @ref CAknSettingItemList::CreateSettingItemL
|
|
76 |
CAknSettingItem* CreateSettingItemL(TInt aIdentifier);
|
|
77 |
|
|
78 |
// @ref CAknSettingItemList::HandleListBoxEventL
|
|
79 |
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
|
|
80 |
void HandleListboxChangesL();
|
|
81 |
|
|
82 |
//Change MSK
|
|
83 |
void ChangeMskL();
|
|
84 |
|
|
85 |
//Enable marquee support
|
|
86 |
void EnableMarqueingL();
|
|
87 |
|
|
88 |
public:
|
|
89 |
//MedialistObserver APIS
|
|
90 |
void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex,
|
|
91 |
MGlxMediaList* aList);
|
|
92 |
void
|
|
93 |
HandleItemRemovedL(TInt aStartIndex, TInt aEndIndex,
|
|
94 |
MGlxMediaList*/* aList */);
|
|
95 |
void HandleAttributesAvailableL(TInt aItemIndex, const RArray<
|
|
96 |
TMPXAttribute>& aAttributes, MGlxMediaList* aList);
|
|
97 |
void HandleFocusChangedL(NGlxListDefs::TFocusChangeType aType,
|
|
98 |
TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList);
|
|
99 |
void HandleItemSelectedL(TInt aIndex, TBool aSelected,
|
|
100 |
MGlxMediaList* aList);
|
|
101 |
void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList);
|
|
102 |
void HandleError(TInt aError);
|
|
103 |
void HandleCommandCompleteL(CMPXCommand* aCommandResult, TInt aError,
|
|
104 |
MGlxMediaList* aList);
|
|
105 |
void HandleMediaL(TInt aListIndex, MGlxMediaList* aList);
|
|
106 |
void HandleItemModifiedL(const RArray<TInt>& aItemIndexes,
|
|
107 |
MGlxMediaList* aList);
|
|
108 |
MGlxMediaList& MediaList();
|
|
109 |
void HandleCommandCompleteL(TAny* aSessionId,
|
|
110 |
CMPXCommand* /*aCommandResult*/, TInt aError,
|
|
111 |
MGlxMediaList* aList);
|
|
112 |
|
|
113 |
private:
|
|
114 |
|
|
115 |
/**
|
|
116 |
* C++ constructor.
|
|
117 |
*
|
|
118 |
* @param aMediaList media list
|
|
119 |
*/
|
|
120 |
CGlxImgVwrMetadataContainer(const TDesC& aUri);
|
|
121 |
|
|
122 |
/**
|
|
123 |
* Symbian 2nd phase constructor
|
|
124 |
* @param aRect rect for this control
|
|
125 |
*/
|
|
126 |
void ConstructL(const TRect& aRect);
|
|
127 |
void CreateMediaListForSelectedItemL();
|
|
128 |
void SetAttributesL(TMPXAttribute attribute);
|
|
129 |
void EditItemL(TInt aIndex, TBool aCalledFromMenu);
|
|
130 |
void SetLicenseItemVisibilityL();
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Create Image Viewer manager Instance
|
|
134 |
*/
|
|
135 |
void CreateImageViewerInstanceL();
|
|
136 |
|
|
137 |
/**
|
|
138 |
* Delete Image Viewer manager Instance
|
|
139 |
*/
|
|
140 |
void DeleteImageViewerInstance();
|
|
141 |
|
|
142 |
private:
|
|
143 |
//data
|
|
144 |
//Flag to check if the item is a video.
|
|
145 |
TBool iVideo;
|
|
146 |
//To check if marquee is enabled.
|
|
147 |
TBool iMarquee;
|
|
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 |
};
|
|
158 |
|
|
159 |
#endif /* GLXIMGVWRMETADATACONTAINER_H_ */
|