ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp
changeset 36 6481344a6d67
parent 33 1ee2af37811f
equal deleted inserted replaced
33:1ee2af37811f 36:6481344a6d67
    34      mSendUiDialog =NULL;
    34      mSendUiDialog =NULL;
    35     }
    35     }
    36 
    36 
    37 void GlxCommandHandlerSend::doHandleUserAction(GlxMediaModel* model,QList<QModelIndex> indexList) const
    37 void GlxCommandHandlerSend::doHandleUserAction(GlxMediaModel* model,QList<QModelIndex> indexList) const
    38 {
    38 {
    39    QList <QVariant> fileList;
    39   QStringList fileList;   
    40    QString imagePath ;
    40   QString imagePath ;
    41    //The Index list is NULL, when the item is selected to be sent from contect menu 
    41    //The Index list is NULL, when the item is selected to be sent from contect menu 
    42    // and fullscreen view,so that inturn is sending the focused item
    42    // and fullscreen view,so that inturn is sending the focused item
    43     if(indexList.count() == 0)
    43     if(indexList.count() == 0)
    44         {
    44         {
    45         imagePath = (model->data(model->index(model->data(model->index(0,0),GlxFocusIndexRole).value<int>(),0),GlxUriRole)).value<QString>();
    45         imagePath = (model->data(model->index(model->data(model->index(0,0),GlxFocusIndexRole).value<int>(),0),GlxUriRole)).value<QString>();
    46         fileList.append(QVariant(imagePath));
    46         fileList.append(imagePath);
    47         }
    47         }
    48     else
    48     else
    49     {
    49     {
    50     for ( int i = 0; i < indexList.count(); i++)
    50     for ( int i = 0; i < indexList.count(); i++)
    51         {        
    51         {        
    52         imagePath = (model->data(indexList[i],GlxUriRole)).value<QString>();
    52         imagePath = (model->data(indexList[i],GlxUriRole)).value<QString>();
    53         fileList.append(QVariant(imagePath));        
    53         fileList.append(imagePath);
    54         } 
    54         } 
    55     }                              
    55     }                              
    56     mSendUiDialog->init(fileList,true);
    56     mSendUiDialog->send(fileList,true);    
    57 }
    57 }
    58 
    58