author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:32:09 +0300 | |
branch | RCL_3 |
changeset 75 | 01504893d9cb |
parent 60 | 5b3385a43d68 |
permissions | -rw-r--r-- |
60 | 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.cpp |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#include "glximgvwrmetadatadialog.h" |
|
20 |
||
21 |
//system includes |
|
22 |
#include <AknUtils.h> //for AknUtils |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
23 |
#include <lbsposition.h> |
60 | 24 |
#include <akntitle.h> |
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
25 |
#include <coeaui.h> |
60 | 26 |
#include <data_caging_path_literals.hrh>// KDC_APP_RESOURCE_DIR |
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
27 |
#include <eikmenub.h> // for CEikMenuBar |
60 | 28 |
#include <StringLoader.h> |
29 |
#include <akntoolbar.h> |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
30 |
#include <glxcommandhandleraddtocontainer.h> // For CGlxCommandHandlerAddToContainer |
60 | 31 |
|
32 |
//User includes |
|
33 |
#include <glxmetadatadialog.rsg> |
|
34 |
#include <glxresourceutilities.h> |
|
35 |
#include <glxlog.h> |
|
36 |
#include <glxtracer.h> |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
37 |
#include <glxcollectionpluginall.hrh> |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
38 |
#include <glxfilterfactory.h> // for TGlxFilterFactory |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
39 |
#include <glxuiutility.h> |
60 | 40 |
#include <glxcommandhandlers.hrh> |
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
41 |
#include <hlplch.h> // for HlpLauncher |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
42 |
#include <photos.hlp.hrh> |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
43 |
#include <glxgallery.hrh> |
60 | 44 |
#include <glxdetailsboundcommand.hrh> |
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
45 |
#include <glxscreenfurniture.h> |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
46 |
#include <glxuiutilities.rsg> |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
47 |
#include <glxpanic.h> // For Panics |
60 | 48 |
#include "glxmetadatacommandhandler.h" |
49 |
||
50 |
// ============================ MEMBER FUNCTIONS =============================== |
|
51 |
||
52 |
// ----------------------------------------------------------------------------- |
|
53 |
// NewL |
|
54 |
// ----------------------------------------------------------------------------- |
|
55 |
// |
|
56 |
EXPORT_C CGlxImgVwrMetadataDialog* CGlxImgVwrMetadataDialog::NewL( const TDesC& aUri ) |
|
57 |
{ |
|
58 |
TRACER("CGlxImgVwrMetadataDialog::NewL"); |
|
59 |
||
60 |
CGlxImgVwrMetadataDialog* self = new(ELeave) CGlxImgVwrMetadataDialog(aUri ); |
|
61 |
CleanupStack::PushL( self ); |
|
62 |
self->ConstructL(); |
|
63 |
CleanupStack::Pop( self ); |
|
64 |
return self; |
|
65 |
} |
|
66 |
||
67 |
CGlxImgVwrMetadataDialog::CGlxImgVwrMetadataDialog(const TDesC& aUri):iUri(aUri) |
|
68 |
{ |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
69 |
|
60 | 70 |
} |
71 |
// ----------------------------------------------------------------------------- |
|
72 |
// ConstructL |
|
73 |
// ----------------------------------------------------------------------------- |
|
74 |
// |
|
75 |
void CGlxImgVwrMetadataDialog::ConstructL() |
|
76 |
{ |
|
77 |
TRACER("CGlxImgVwrMetadataDialog::ConstructL"); |
|
78 |
||
79 |
// Load dialog's resource file |
|
80 |
InitResourceL(); |
|
81 |
||
82 |
// make the toolbar disabled |
|
83 |
SetDetailsDlgToolbarVisibility(EFalse); |
|
84 |
||
85 |
iStatusPaneAvailable = EFalse; |
|
86 |
// set the title to the dialog, Note that avkon dialogs do not support |
|
87 |
// setting the title in the status pane so we need to do it the hard way |
|
88 |
// get status pane |
|
89 |
CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
90 |
||
91 |
if(statusPane && statusPane->IsVisible()) |
|
92 |
{ |
|
93 |
iStatusPaneAvailable = ETrue; |
|
94 |
} |
|
95 |
||
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
96 |
// make the toolbar disabled |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
97 |
SetDetailsDlgToolbarVisibility(EFalse); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
98 |
|
60 | 99 |
// do we have status pane |
100 |
if( statusPane ) |
|
101 |
{ |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
102 |
GLX_LOG_INFO1("GLX_UMP::CGlxImgVwrMetadataDialog::ConstructL::STATUS PANE = %d",statusPane->IsVisible()); |
60 | 103 |
// load the title text |
104 |
HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS, iEikonEnv ); |
|
105 |
SetTitleL( *text ); |
|
106 |
if( text) |
|
107 |
{ |
|
108 |
delete text; |
|
109 |
} |
|
110 |
iAvkonAppUi->StatusPane()->MakeVisible(ETrue); |
|
111 |
} |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
112 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
113 |
iUiUtility = CGlxUiUtility::UtilityL(); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
114 |
|
60 | 115 |
} |
116 |
||
117 |
// ----------------------------------------------------------------------------- |
|
118 |
// ~CGlxImgVwrMetadataDialog |
|
119 |
// ----------------------------------------------------------------------------- |
|
120 |
// |
|
121 |
CGlxImgVwrMetadataDialog::~CGlxImgVwrMetadataDialog() |
|
122 |
{ |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
123 |
|
60 | 124 |
TRACER("CGlxImgVwrMetadataDialog::~CGlxImgVwrMetadataDialog"); |
125 |
||
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
126 |
|
60 | 127 |
//To Disable the status pane if the dialog is launched from fullscreenview |
128 |
if (!iStatusPaneAvailable && iAvkonAppUi) |
|
129 |
{ |
|
130 |
iAvkonAppUi->StatusPane()->MakeVisible(EFalse); |
|
131 |
} |
|
132 |
||
133 |
TRAP_IGNORE(SetPreviousTitleL()); |
|
134 |
delete iPreviousTitle; |
|
135 |
||
136 |
// Restore the Toolbar as it was in the Calling application |
|
137 |
SetDetailsDlgToolbarVisibility(ETrue); |
|
138 |
||
139 |
// If details launched from FullScreen View, while moving back, |
|
140 |
// all the UI components should be hidden. Hence processing this command here. |
|
141 |
if (iAvkonAppUi) |
|
142 |
{ |
|
143 |
TRAP_IGNORE(iAvkonAppUi->ProcessCommandL(EGlxCmdResetView)); |
|
144 |
} |
|
145 |
||
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
146 |
if( iUiUtility ) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
147 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
148 |
iUiUtility->Close(); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
149 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
150 |
|
60 | 151 |
if (iResourceOffset) |
152 |
{ |
|
153 |
CCoeEnv::Static()->DeleteResourceFile(iResourceOffset); |
|
154 |
} |
|
155 |
} |
|
156 |
||
157 |
// --------------------------------------------------------------------------- |
|
158 |
// SetDetailsDlgToolbarVisibility() |
|
159 |
// --------------------------------------------------------------------------- |
|
160 |
void CGlxImgVwrMetadataDialog::SetDetailsDlgToolbarVisibility(TBool aVisible) |
|
161 |
{ |
|
162 |
TRACER("CGlxImgVwrMetadataDialog::SetDetailsDlgToolbarVisibility"); |
|
163 |
||
164 |
HandleToolbarResetting(aVisible); |
|
165 |
CAknToolbar* currentPopupToolbar = iAvkonAppUi->CurrentPopupToolbar(); |
|
166 |
if(currentPopupToolbar) |
|
167 |
{ |
|
168 |
currentPopupToolbar->SetToolbarVisibility(aVisible); |
|
169 |
currentPopupToolbar->MakeVisible( aVisible ); |
|
170 |
} |
|
171 |
} |
|
172 |
||
173 |
// ----------------------------------------------------------------------------- |
|
174 |
// ExecuteLD |
|
175 |
// ----------------------------------------------------------------------------- |
|
176 |
// |
|
177 |
EXPORT_C TInt CGlxImgVwrMetadataDialog::ExecuteLD() |
|
178 |
{ |
|
179 |
TRACER("CGlxImgVwrMetadataDialog::ExecuteLD"); |
|
180 |
return CAknDialog::ExecuteLD( R_IMG_VIEWER_METADATA_DIALOG ); |
|
181 |
} |
|
182 |
// ----------------------------------------------------------------------------- |
|
183 |
// ProcessCommandL |
|
184 |
// ----------------------------------------------------------------------------- |
|
185 |
// |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
186 |
void CGlxImgVwrMetadataDialog::ProcessCommandL( TInt aCommandId ) |
60 | 187 |
{ |
188 |
TRACER("CGlxImgVwrMetadataDialog::ProcessCommandL"); |
|
189 |
// hide menu bar |
|
190 |
iMenuBar->StopDisplayingMenuBar(); |
|
191 |
} |
|
192 |
//----------------------------------------------------------------------------- |
|
193 |
// CGlxImgVwrMetadataDialog::CreateCustomControlL |
|
194 |
//----------------------------------------------------------------------------- |
|
195 |
SEikControlInfo CGlxImgVwrMetadataDialog::CreateCustomControlL(TInt |
|
196 |
aControlType) |
|
197 |
{ |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
198 |
GLX_LOG_INFO("CShwSlideshowSettingsDialog::CreateCustomControlL"); |
60 | 199 |
|
200 |
// create control info, no flags or trailer text set |
|
201 |
SEikControlInfo controlInfo; |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
202 |
controlInfo.iControl = NULL; |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
203 |
controlInfo.iTrailerTextId = 0; |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
204 |
controlInfo.iFlags = 0; |
60 | 205 |
if (aControlType == EMetaDataDialogListBox) |
206 |
{ |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
207 |
iContainer = CGlxImgVwrMetadataContainer::NewL(iAvkonAppUi->ClientRect(),iUri); |
60 | 208 |
controlInfo.iControl = iContainer; // giving ownership |
209 |
} |
|
210 |
return controlInfo; // returns ownership of ItemList |
|
211 |
} |
|
212 |
||
213 |
// ----------------------------------------------------------------------------- |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
214 |
// CGlxImgVwrMetadataDialog::DynInitMenuPaneL |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
215 |
// ----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
216 |
// |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
217 |
void CGlxImgVwrMetadataDialog::DynInitMenuPaneL(TInt /*aMenuId*/, |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
218 |
CEikMenuPane* /*aMenuPane*/) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
219 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
220 |
//no implementation |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
221 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
222 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
223 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
224 |
// CGlxImgVwrMetadataDialog::SizeChanged |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
225 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
226 |
void CGlxImgVwrMetadataDialog::SizeChanged() |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
227 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
228 |
TRACER("CGlxImgVwrMetadataDialog::SizeChanged"); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
229 |
CAknDialog::SizeChanged(); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
230 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
231 |
// ----------------------------------------------------------------------------- |
60 | 232 |
// CGlxImgVwrMetadataDialog::InitResourceL |
233 |
// ----------------------------------------------------------------------------- |
|
234 |
// |
|
235 |
void CGlxImgVwrMetadataDialog::InitResourceL() |
|
236 |
{ |
|
237 |
TRACER("CGlxImgVwrMetadataDialog::InitResourceL"); |
|
238 |
||
239 |
_LIT(KGlxMetadataDialogResource,"glxmetadatadialog.rsc"); |
|
240 |
//add resource file |
|
241 |
TParse parse; |
|
242 |
parse.Set(KGlxMetadataDialogResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
243 |
TFileName resourceFile; |
|
244 |
resourceFile.Append(parse.FullName()); |
|
245 |
CGlxResourceUtilities::GetResourceFilenameL(resourceFile); |
|
246 |
iResourceOffset = CCoeEnv::Static()->AddResourceFileL(resourceFile); |
|
247 |
} |
|
248 |
||
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
249 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
250 |
// ----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
251 |
// CGlxImgVwrMetadataDialog::HandleViewCommandL |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
252 |
// ----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
253 |
// |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
254 |
TBool CGlxImgVwrMetadataDialog::HandleViewCommandL( TInt /*aCommand*/ ) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
255 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
256 |
TRACER("CGlxImgVwrMetadataDialog::HandleViewCommandL"); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
257 |
return EFalse; |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
258 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
259 |
// --------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
260 |
// CGlxImgVwrMetadataDialog::PreLayoutDynInitL |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
261 |
// --------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
262 |
// |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
263 |
void CGlxImgVwrMetadataDialog::PreLayoutDynInitL() |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
264 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
265 |
// No Implementation |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
266 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
267 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
268 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
269 |
// CGlxImgVwrMetadataDialog::PostLayoutDynInitL |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
270 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
271 |
// |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
272 |
void CGlxImgVwrMetadataDialog::PostLayoutDynInitL() |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
273 |
{} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
274 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
275 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
276 |
// CGlxImgVwrMetadataDialog::Draw |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
277 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
278 |
// |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
279 |
void CGlxImgVwrMetadataDialog::Draw( const TRect& /*aRect*/ ) const |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
280 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
281 |
TRACER("CGlxImgVwrMetadataDialog::Draw"); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
282 |
TRect rect; |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
283 |
AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
284 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
285 |
// Get the standard graphics context |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
286 |
CWindowGc& gc = SystemGc(); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
287 |
gc.SetBrushColor(KRgbWhite); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
288 |
gc.DrawRect(rect); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
289 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
290 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
291 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
292 |
// CGlxImgVwrMetadataDialog::HandlePointerEventL |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
293 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
294 |
// |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
295 |
void CGlxImgVwrMetadataDialog::HandlePointerEventL( |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
296 |
const TPointerEvent& aPointerEvent) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
297 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
298 |
TRACER("CGlxImgVwrMetadataDialog::HandlePointerEventL"); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
299 |
CCoeControl::HandlePointerEventL( aPointerEvent ); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
300 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
301 |
|
60 | 302 |
// --------------------------------------------------------------------------- |
303 |
// CGlxImgVwrMetadataDialog::SetTitleL() |
|
304 |
// --------------------------------------------------------------------------- |
|
305 |
void CGlxImgVwrMetadataDialog::SetTitleL(const TDesC& aTitleText) |
|
306 |
{ |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
307 |
TRACER("CGlxFetcherContainer::SetTitleL"); |
60 | 308 |
CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
309 |
CleanupStack::PushL(statusPane); |
|
310 |
// get pointer to the default title pane control |
|
311 |
CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL( |
|
312 |
TUid::Uid( EEikStatusPaneUidTitle )); |
|
313 |
CleanupStack::PushL(titlePane); |
|
314 |
// set the title if we got the title pane control |
|
315 |
if( titlePane ) |
|
316 |
{ |
|
317 |
GLX_LOG_INFO("GLX_UMP::CGlxImgVwrMetadataDialog::ConstructL::INSIDE titlePane"); |
|
318 |
iPreviousTitle = titlePane->Text()->AllocL(); |
|
319 |
// Set the required Title |
|
320 |
titlePane->SetTextL( aTitleText ); |
|
321 |
} |
|
322 |
CleanupStack::Pop(titlePane); |
|
323 |
CleanupStack::Pop(statusPane); |
|
324 |
} |
|
325 |
||
326 |
// --------------------------------------------------------------------------- |
|
327 |
// CGlxImgVwrMetadataDialog::SetPreviousTitleL |
|
328 |
// --------------------------------------------------------------------------- |
|
329 |
void CGlxImgVwrMetadataDialog::SetPreviousTitleL() |
|
330 |
{ |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
331 |
TRACER("CGlxFetcherContainer::SetPreviousTitleL"); |
60 | 332 |
CEikStatusPane* prevStatusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
333 |
CleanupStack::PushL(prevStatusPane); |
|
334 |
CAknTitlePane* prevTitlePane = ( CAknTitlePane* )prevStatusPane->ControlL( |
|
335 |
TUid::Uid( EEikStatusPaneUidTitle )); |
|
336 |
CleanupStack::PushL(prevTitlePane); |
|
337 |
if( prevTitlePane ) |
|
338 |
{ |
|
339 |
// Restore the Title back of the Calling Application |
|
340 |
prevTitlePane->SetTextL( *iPreviousTitle ); |
|
341 |
} |
|
342 |
CleanupStack::Pop(prevTitlePane); |
|
343 |
CleanupStack::Pop(prevStatusPane); |
|
344 |
} |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
345 |
// ----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
346 |
// CGlxImgVwrMetadataDialog::HandleResourceChange |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
347 |
// ----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
348 |
// |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
349 |
void CGlxImgVwrMetadataDialog::HandleResourceChange( TInt aType ) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
350 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
351 |
TRACER("CGlxImgVwrMetadataDialog::HandleResourceChange"); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
352 |
//Handle global resource changes, such as scalable UI or skin events and orientation change (override) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
353 |
CAknDialog::HandleResourceChange( aType ); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
354 |
} |
60 | 355 |
// ----------------------------------------------------------------------------- |
356 |
// CGlxImgVwrMetadataDialog::HandleToolbarResetting |
|
357 |
// ----------------------------------------------------------------------------- |
|
358 |
// |
|
359 |
void CGlxImgVwrMetadataDialog::HandleToolbarResetting(TBool aVisible) |
|
360 |
{ |
|
361 |
TRACER("CGlxImgVwrMetadataDialog::HandleToolbarResetting"); |
|
362 |
||
363 |
CAknToolbar* popupToolbar = iAvkonAppUi->PopupToolbar(); |
|
364 |
if(popupToolbar) |
|
365 |
{ |
|
366 |
popupToolbar->SetToolbarVisibility( !aVisible ); |
|
367 |
popupToolbar->MakeVisible( !aVisible ); |
|
368 |
if(!aVisible) |
|
369 |
{ |
|
370 |
popupToolbar->DrawNow(); |
|
371 |
} |
|
372 |
} |
|
373 |
CAknToolbar* toolbar = iAvkonAppUi->CurrentFixedToolbar(); |
|
374 |
if(toolbar) |
|
375 |
{ |
|
376 |
toolbar->HideItemsAndDrawOnlyBackground(!aVisible); |
|
377 |
toolbar->SetToolbarVisibility(aVisible); |
|
378 |
toolbar->MakeVisible( aVisible ); |
|
379 |
} |
|
380 |
} |
|
381 |
||
382 |
// End of File |
|
383 |