diff -r 74c9f037fd5d -r 99ad1390cd33 ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Fri Apr 16 14:58:46 2010 +0300 @@ -0,0 +1,58 @@ +/* +* Copyright (c) 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: +* +*/ + +#include "glxcommandhandlersend.h" +#include +#include +#include +#include +#include + +GlxCommandHandlerSend::GlxCommandHandlerSend() + { + + } + + +GlxCommandHandlerSend::~GlxCommandHandlerSend() + { + + } + +void GlxCommandHandlerSend::doHandleUserAction(GlxMediaModel* model,QList indexList) const +{ + QList fileList; + QString imagePath ; + //The Index list is NULL, when the item is selected to be sent from contect menu + // and fullscreen view,so that inturn is sending the focused item + if(indexList.count() == 0) + { + imagePath = (model->data(model->index(model->data(model->index(0,0),GlxFocusIndexRole).value(),0),GlxUriRole)).value(); + fileList.append(QVariant(imagePath)); + } + else + { + for ( int i = 0; i < indexList.count(); i++) + { + imagePath = (model->data(indexList[i],GlxUriRole)).value(); + fileList.append(QVariant(imagePath)); + } + } + ShareUi dialog; + dialog.init(fileList,true); +} +