|
1 /* |
|
2 * Copyright (c) 2008-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: glximgvwrmetadatadialog.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef GLXIMGVWRMETADATADIALOG_H_ |
|
21 #define GLXIMGVWRMETADATADIALOG_H_ |
|
22 |
|
23 |
|
24 |
|
25 // SYSTEM INCLUDES |
|
26 #include <AknDialog.h> |
|
27 |
|
28 #include <alf/alfscreenbuffer.h> |
|
29 #include <glximgvwrmetadatacontainer.h> |
|
30 // FORWARD DECLARATIONS |
|
31 class CGlxMetadataCommandHandler; |
|
32 class CGlxCommandHandlerAddToContainer; |
|
33 class CGlxUiUtility; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * CGlxImgVwrMetadataDialog |
|
38 * |
|
39 * Metadata dialog implementation |
|
40 */ |
|
41 class CGlxImgVwrMetadataDialog : public CAknDialog |
|
42 |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 * |
|
49 * @param aURI uri or file name of item |
|
50 */ |
|
51 IMPORT_C static CGlxImgVwrMetadataDialog* NewL( const TDesC& aUri ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CGlxImgVwrMetadataDialog(); |
|
57 |
|
58 private : |
|
59 CGlxImgVwrMetadataDialog(const TDesC& aUri); |
|
60 |
|
61 |
|
62 public: // Functions from base classes |
|
63 |
|
64 /** |
|
65 * Initializes the dialog and calls CAknDialog's |
|
66 * ExecuteLD() |
|
67 * This method need to be called to execute the dialog. |
|
68 * After exiting the dialog gets automatically destroyed |
|
69 * |
|
70 * @return TInt ID value of the button that closed the dialog. |
|
71 */ |
|
72 IMPORT_C TInt ExecuteLD(); |
|
73 |
|
74 |
|
75 protected: // Functions from base classes |
|
76 |
|
77 /** |
|
78 * From MEikCommandObserver Prosesses menucommands |
|
79 * |
|
80 * @param aCommandId Commant value defined in resources. |
|
81 */ |
|
82 void ProcessCommandL( TInt aCommandId ); |
|
83 |
|
84 /** |
|
85 * From MEikMenuObserver Initializes items on the menu |
|
86 * |
|
87 * @param aMenuId Current menu's resource Id |
|
88 * @param aMenuPane Pointer to menupane |
|
89 */ |
|
90 void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane); |
|
91 //hanldes orientation changes. |
|
92 void HandleResourceChange( TInt aType ); |
|
93 void SizeChanged(); |
|
94 |
|
95 private: |
|
96 /** |
|
97 * Initializes the dialog's controls before the dialog is sized and |
|
98 * layed out. Empty by default. |
|
99 */ |
|
100 void PreLayoutDynInitL(); |
|
101 |
|
102 /** |
|
103 * Initializes the dialog's controls after the dialog has been sized |
|
104 * but before it has been activated. |
|
105 */ |
|
106 void PostLayoutDynInitL(); |
|
107 /** |
|
108 * Symbian 2nd phase constructor. |
|
109 * |
|
110 * @param aURI |
|
111 */ |
|
112 void ConstructL(); |
|
113 |
|
114 /** |
|
115 * Constructs the Alf Environment and display |
|
116 */ |
|
117 void ConstructAlfEnvL(); |
|
118 |
|
119 /** |
|
120 * Initalise the resource |
|
121 * |
|
122 */ |
|
123 void InitResourceL(); |
|
124 |
|
125 /** |
|
126 * To deal with any specific commands |
|
127 * |
|
128 * @param aCommand The command to respond to |
|
129 * @return ETrue if the command has been handled. |
|
130 * |
|
131 */ |
|
132 TBool HandleViewCommandL(TInt aCommand); |
|
133 |
|
134 |
|
135 |
|
136 private: |
|
137 |
|
138 void Draw( const TRect& /*aRect*/ ) const; |
|
139 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
140 /** |
|
141 * SetTitleL |
|
142 * Sets title for view |
|
143 * @param aTitleText title of view to be set |
|
144 */ |
|
145 void SetTitleL(const TDesC& aTitleText); |
|
146 /** |
|
147 * SetPreviousTitleL |
|
148 * Sets title of previous view |
|
149 */ |
|
150 void SetPreviousTitleL(); |
|
151 |
|
152 void SetDetailsDlgToolbarVisibility(TBool aVisible); |
|
153 |
|
154 public: // from MEikDialogPageObserver |
|
155 /** |
|
156 * @ref MEikDialogPageObserver::CreateCustomControlL |
|
157 */ |
|
158 SEikControlInfo CreateCustomControlL(TInt aControlType); |
|
159 |
|
160 public: |
|
161 /* |
|
162 * |
|
163 */ |
|
164 void HandleToolbarResetting(TBool aVisible); |
|
165 |
|
166 private: //data |
|
167 |
|
168 TInt iResourceOffset; |
|
169 TBool iStatusPaneAvailable; |
|
170 CGlxUiUtility* iUiUtility; |
|
171 HBufC* iPreviousTitle; |
|
172 const TDesC& iUri; |
|
173 CGlxImgVwrMetadataContainer* iContainer; |
|
174 }; |
|
175 |
|
176 |
|
177 #endif /* GLXIMGVWRMETADATADIALOG_H_ */ |