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