|
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: Implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include "glxtagfullscreenviewplugin.h" |
|
24 #include "glxfullscreenviewplugin.hrh" // KGlxTagTileViewPluginImplementationUid |
|
25 |
|
26 #include <glxfullscreenviewdata.rsg> |
|
27 |
|
28 #include <bautils.h> //BaflUtils |
|
29 #include <data_caging_path_literals.hrh> //KDC_APP_RESOURCE_DIR |
|
30 #include <glxcommandhandlerremovefrom.h> //CGlxCommandHandlerRemoveFrom |
|
31 #include <glxcommandhandlerhelp.h> |
|
32 #include <glxtracer.h> |
|
33 #include <glxlog.h> |
|
34 |
|
35 #include <glxresourceutilities.h> // for CGlxResourceUtilities |
|
36 |
|
37 |
|
38 |
|
39 _LIT(KGlxTileResource,"glxfullscreenviewdata.rsc"); //TagTileView Resource File |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // C++ default constructor can NOT contain any code, that |
|
43 // might leave. |
|
44 // --------------------------------------------------------------------------- |
|
45 CGlxTagFullScreenViewPlugin::CGlxTagFullScreenViewPlugin() |
|
46 { |
|
47 TRACER("CGlxTagFullScreenViewPlugin::CGlxTagFullScreenViewPlugin()"); |
|
48 |
|
49 iResourceIds.iViewId = R_GLX_TAGFULLSCREEN_VIEW; |
|
50 iResourceIds.iMenuId = R_GLX_TAGFULLSCREEN_MENU; |
|
51 iResourceIds.iCbaId = R_GLX_FULLSCREEN_SOFTKEYS; |
|
52 iViewUID = KGlxTagFullScreenViewPluginImplementationUid; |
|
53 |
|
54 |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // Symbian 2nd phase constructor can leave. |
|
59 // --------------------------------------------------------------------------- |
|
60 void CGlxTagFullScreenViewPlugin::ConstructL() |
|
61 { |
|
62 TRACER("CGlxTagFullScreenViewPlugin::CGlxTagFullScreenViewPlugin()"); |
|
63 // Do nothing |
|
64 } |
|
65 |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // Two-phased constructor. |
|
69 // --------------------------------------------------------------------------- |
|
70 CGlxTagFullScreenViewPlugin* CGlxTagFullScreenViewPlugin::NewL() |
|
71 { |
|
72 |
|
73 TRACER( "CGlxTagFullScreenViewPlugin::NewL"); |
|
74 |
|
75 CGlxTagFullScreenViewPlugin* self = new ( ELeave ) CGlxTagFullScreenViewPlugin(); |
|
76 CleanupStack::PushL( self ); |
|
77 self->ConstructL(); |
|
78 CleanupStack::Pop( self ); |
|
79 return self; |
|
80 } |
|
81 |
|
82 // --------------------------------------------------------------------------- |
|
83 // Destructor |
|
84 // --------------------------------------------------------------------------- |
|
85 CGlxTagFullScreenViewPlugin::~CGlxTagFullScreenViewPlugin() |
|
86 { |
|
87 // Do nothing |
|
88 } |
|
89 |
|
90 // --------------------------------------------------------------------------- |
|
91 // Adds Command Handlers to the view |
|
92 //----------------------------------------------------------------------------- |
|
93 void CGlxTagFullScreenViewPlugin::AddCommandHandlersL() |
|
94 { |
|
95 TRACER( "CGlxTagFullScreenViewPlugin::AddCommandHandlersL"); |
|
96 |
|
97 CGlxFullScreenViewPluginBase::AddCommandHandlersL(); |
|
98 |
|
99 //For tag tile view |
|
100 GLX_LOG_INFO("Adding CGlxCommandHandlerRemoveFrom"); |
|
101 //iTileView->AddCommandHandlerL(CGlxCommandHandlerRemoveFrom::NewL(iTileView, EMPXTag)); |
|
102 |
|
103 // set up help context info |
|
104 TGlxHelpContext helpInfo; |
|
105 helpInfo.iBrowseContext = LGAL_HLP_TAGS_GRID; |
|
106 helpInfo.iBrowseContext = LGAL_HLP_TAGS_FULLSCREEN; |
|
107 |
|
108 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo)); |
|
109 } |
|
110 |
|
111 //----------------------------------------------------------------------------- |
|
112 // Get the Resource File Name |
|
113 //----------------------------------------------------------------------------- |
|
114 |
|
115 void CGlxTagFullScreenViewPlugin::GetResourceFilenameL(TFileName& aResFile) |
|
116 { |
|
117 TRACER( "CGlxTagFullScreenViewPlugin::GetResourceFilenameL"); //Logging |
|
118 TParse parse; |
|
119 parse.Set(KGlxTileResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
120 aResFile.Append(parse.FullName()); |
|
121 CGlxResourceUtilities::GetResourceFilenameL(aResFile); |
|
122 } |
|
123 |
|
124 //End Of File |