|
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 "glxtaggridviewplugin.h" |
|
24 #include "glxgridviewplugin.hrh" // KGlxTagGridViewPluginImplementationUid |
|
25 |
|
26 #include <glxgridviewdata.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(KGlxGridResource,"glxgridviewdata.rsc"); //TagGridView Resource File |
|
40 |
|
41 /** |
|
42 * @internal reviewed 12/06/2007 by Alex Birkett |
|
43 */ |
|
44 |
|
45 // --------------------------------------------------------------------------- |
|
46 // C++ default constructor can NOT contain any code, that |
|
47 // might leave. |
|
48 // --------------------------------------------------------------------------- |
|
49 CGlxTagGridViewPlugin::CGlxTagGridViewPlugin() |
|
50 { |
|
51 TRACER("CGlxTagGridViewPlugin::CGlxTagGridViewPlugin()"); |
|
52 |
|
53 iResourceIds.iViewId = R_TAGGRID_VIEW; |
|
54 iResourceIds.iMenuId = R_TAGGRID_MENU; |
|
55 iResourceIds.iCbaId = R_GRID_SOFTKEYS; |
|
56 iResourceIds.iEmptyViewTextId = R_GRID_EMPTY_VIEW_TEXT; |
|
57 iResourceIds.iOkOptionsMenuId = R_GRID_OK_MENUBAR_TAG_GRIDVIEW; |
|
58 iViewUID = KGlxTagGridViewPluginImplementationUid; |
|
59 |
|
60 |
|
61 } |
|
62 |
|
63 // --------------------------------------------------------------------------- |
|
64 // Symbian 2nd phase constructor can leave. |
|
65 // --------------------------------------------------------------------------- |
|
66 void CGlxTagGridViewPlugin::ConstructL() |
|
67 { |
|
68 TRACER("CGlxTagGridViewPlugin::CGlxTagGridViewPlugin()"); |
|
69 // Do nothing |
|
70 } |
|
71 |
|
72 |
|
73 // --------------------------------------------------------------------------- |
|
74 // Two-phased constructor. |
|
75 // --------------------------------------------------------------------------- |
|
76 CGlxTagGridViewPlugin* CGlxTagGridViewPlugin::NewL() |
|
77 { |
|
78 |
|
79 TRACER( "CGlxTagGridViewPlugin::NewL"); |
|
80 |
|
81 CGlxTagGridViewPlugin* self = new ( ELeave ) CGlxTagGridViewPlugin(); |
|
82 CleanupStack::PushL( self ); |
|
83 self->ConstructL(); |
|
84 CleanupStack::Pop( self ); |
|
85 return self; |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------------------------- |
|
89 // Destructor |
|
90 // --------------------------------------------------------------------------- |
|
91 CGlxTagGridViewPlugin::~CGlxTagGridViewPlugin() |
|
92 { |
|
93 // Do nothing |
|
94 } |
|
95 |
|
96 // --------------------------------------------------------------------------- |
|
97 // Adds Command Handlers to the view |
|
98 //----------------------------------------------------------------------------- |
|
99 void CGlxTagGridViewPlugin::AddCommandHandlersL() |
|
100 { |
|
101 TRACER( "CGlxTagGridViewPlugin::AddCommandHandlersL"); |
|
102 |
|
103 CGlxGridViewPluginBase::AddCommandHandlersL(); |
|
104 |
|
105 //For tag Grid view |
|
106 GLX_LOG_INFO("Adding CGlxCommandHandlerRemoveFrom"); |
|
107 iGridView->AddCommandHandlerL(CGlxCommandHandlerRemoveFrom::NewL(iGridView, EMPXTag)); |
|
108 |
|
109 // set up help context info |
|
110 TGlxHelpContext helpInfo; |
|
111 helpInfo.iBrowseContext = LGAL_HLP_TAGS_GRID; |
|
112 helpInfo.iViewContext = LGAL_HLP_TAGS_FULLSCREEN; |
|
113 |
|
114 iGridView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo)); |
|
115 } |
|
116 |
|
117 //----------------------------------------------------------------------------- |
|
118 // Get the Resource File Name |
|
119 //----------------------------------------------------------------------------- |
|
120 |
|
121 void CGlxTagGridViewPlugin::GetResourceFilenameL(TFileName& aResFile) |
|
122 { |
|
123 TRACER( "CGlxTagGridViewPlugin::GetResourceFilenameL"); //Logging |
|
124 TParse parse; |
|
125 parse.Set(KGlxGridResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
126 aResFile.Append(parse.FullName()); |
|
127 CGlxResourceUtilities::GetResourceFilenameL(aResFile); |
|
128 } |
|
129 |
|
130 //End Of File |