|
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 "glxmonthsgridviewplugin.h" |
|
24 #include "glxgridviewplugin.hrh" |
|
25 |
|
26 #include <data_caging_path_literals.hrh> |
|
27 #include <glxcommandhandlers.hrh> |
|
28 |
|
29 #include <glxgridviewdata.rsg> |
|
30 |
|
31 #include <AknUtils.h> |
|
32 #include <avkon.hrh> |
|
33 #include <bautils.h> |
|
34 #include <glxcommandhandlerhelp.h> |
|
35 #include <glxresourceutilities.h> // for CGlxResourceUtilities |
|
36 #include <mpxcollectionpath.h> |
|
37 #include <mpxcollectionutility.h> |
|
38 #include <mpxmediageneraldefs.h> |
|
39 |
|
40 #include <photos.hlp.hrh> |
|
41 |
|
42 #include "glxgridview.h" |
|
43 |
|
44 #include <glxcommandhandlers.hrh> |
|
45 |
|
46 _LIT(KGlxGridResource,"glxgridviewdata.rsc"); |
|
47 |
|
48 // --------------------------------------------------------------------------- |
|
49 // C++ default constructor can NOT contain any code, that |
|
50 // might leave. |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 CGlxMonthsGridViewPlugin::CGlxMonthsGridViewPlugin() |
|
54 |
|
55 { |
|
56 iResourceIds.iMenuId = R_GLX_GRID_MENU; |
|
57 iResourceIds.iViewId = R_GLX_MONTHS_GRID_VIEW; |
|
58 iResourceIds.iCbaId = R_GRID_SOFTKEYS; |
|
59 iResourceIds.iEmptyViewTextId = R_GRID_EMPTY_VIEW_TEXT; |
|
60 iResourceIds.iOkOptionsMenuId = R_GRID_OK_MENUBAR; |
|
61 iViewUID = KGlxMonthsGridViewImplementationId; |
|
62 |
|
63 |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------------------------- |
|
67 // Symbian 2nd phase constructor can leave. |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 void CGlxMonthsGridViewPlugin::ConstructL() |
|
71 { |
|
72 // Do nothing |
|
73 } |
|
74 |
|
75 // --------------------------------------------------------------------------- |
|
76 // Two-phased constructor. |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 CGlxMonthsGridViewPlugin* CGlxMonthsGridViewPlugin::NewL() |
|
80 { |
|
81 CGlxMonthsGridViewPlugin* self = |
|
82 new ( ELeave ) CGlxMonthsGridViewPlugin(); |
|
83 CleanupStack::PushL( self ); |
|
84 self->ConstructL(); |
|
85 CleanupStack::Pop( self ); |
|
86 return self; |
|
87 } |
|
88 |
|
89 // --------------------------------------------------------------------------- |
|
90 // Destructor |
|
91 // --------------------------------------------------------------------------- |
|
92 // |
|
93 CGlxMonthsGridViewPlugin::~CGlxMonthsGridViewPlugin() |
|
94 { |
|
95 // Do nothing |
|
96 } |
|
97 |
|
98 // --------------------------------------------------------------------------- |
|
99 // AddCommandHandlersL |
|
100 // --------------------------------------------------------------------------- |
|
101 // |
|
102 void CGlxMonthsGridViewPlugin::AddCommandHandlersL() |
|
103 { |
|
104 CGlxGridViewPluginBase::AddCommandHandlersL(); |
|
105 |
|
106 TGlxHelpContext helpInfo; |
|
107 helpInfo.iBrowseContext = LGAL_HLP_MONTH_GRID; |
|
108 helpInfo.iViewContext = LGAL_HLP_MONTH_FULLSCREEN; |
|
109 iGridView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo)); |
|
110 } |
|
111 |
|
112 |
|
113 // --------------------------------------------------------------------------- |
|
114 // GetResourceFilenameL |
|
115 // --------------------------------------------------------------------------- |
|
116 // |
|
117 void CGlxMonthsGridViewPlugin::GetResourceFilenameL(TFileName& aResFile) |
|
118 { |
|
119 TParse parse; |
|
120 parse.Set(KGlxGridResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
121 aResFile.Append(parse.FullName()); |
|
122 CGlxResourceUtilities::GetResourceFilenameL(aResFile); |
|
123 } |
|
124 |
|
125 // End of File |