diff -r 000000000000 -r 4e91876724a2 photosgallery/viewframework/plugins/listviewplugin/src/glxalbumlistviewplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/photosgallery/viewframework/plugins/listviewplugin/src/glxalbumlistviewplugin.cpp Thu Dec 17 08:45:44 2009 +0200 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: List view plugin implementation +* +*/ + + + + +// INCLUDE FILES +#include "glxalbumlistviewplugin.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "glxlistviewplugin.hrh" + +// --------------------------------------------------------------------------- +// Two-phased constructor for album list view plugin. +// --------------------------------------------------------------------------- +// +CGlxAlbumListViewPlugin* CGlxAlbumListViewPlugin::NewL() + { + CGlxAlbumListViewPlugin* self = new (ELeave) CGlxAlbumListViewPlugin(); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + +// --------------------------------------------------------------------------- +// Symbian 2nd phase constructor can leave. +// --------------------------------------------------------------------------- +// +void CGlxAlbumListViewPlugin::ConstructL() + { + // Do nothing + } + +// --------------------------------------------------------------------------- +// C++ default constructor can NOT contain any code, that might leave. +// --------------------------------------------------------------------------- +// +CGlxAlbumListViewPlugin::CGlxAlbumListViewPlugin() + { + iResourceIds.iViewId = R_GLX_ALBUM_LIST_VIEW; + iResourceIds.iMenuId = R_GLX_ALBUM_LIST_VIEW_MENU; + iResourceIds.iCbaId = R_GLX_LIST_VIEW_SOFTKEYS; + iResourceIds.iEmptyTextId = R_GLX_LIST_VIEW_EMPTY_TEXT; + + + } + +// --------------------------------------------------------------------------- +// Destructor +// --------------------------------------------------------------------------- +// +CGlxAlbumListViewPlugin::~CGlxAlbumListViewPlugin() + { + // Do nothing + } + +// --------------------------------------------------------------------------- +// From CGlxListViewPluginBase +// --------------------------------------------------------------------------- +// +CGlxListView* CGlxAlbumListViewPlugin::ConstructListViewLC(MGlxMediaListFactory* aMediaListFactory) + { + return CGlxListView::NewLC(aMediaListFactory, KGlxAlbumListViewImplementationUid, iResourceIds); + } + +// --------------------------------------------------------------------------- +// From CGlxListViewPluginBase +// --------------------------------------------------------------------------- +// +void CGlxAlbumListViewPlugin::AddCommandHandlersL() + { + CGlxListViewPluginBase::AddCommandHandlersL(); + iListView->AddCommandHandlerL(CGlxCommandHandlerSlideshow::NewL( iListView, EFalse, ETrue ) ); + iListView->AddCommandHandlerL(CGlxCommandHandlerDelete::NewL(iListView, ETrue, EFalse)); + iListView->AddCommandHandlerL(CGlxCommandHandlerNewMedia::NewL(iListView)); + iListView->AddCommandHandlerL(CGlxCommandHandlerRename::NewL(iListView, ETrue)); + // add help command handler + + // set up help context info + TGlxHelpContext helpInfo; + helpInfo.iBrowseContext = LGAL_HLP_ALBUM_LIST; + + iListView->AddCommandHandlerL(CGlxCommandHandlerHelp::NewL(helpInfo)); + } + +// End of File