videocollection/videocollectionwrapper/src/videolistdatamodel_p.cpp
changeset 62 0e1e938beb1a
parent 52 e3cecb93e76a
equal deleted inserted replaced
59:a76e86df7ccd 62:0e1e938beb1a
    13 *
    13 *
    14 * Description: VideoListDataModelPrivate class implementation
    14 * Description: VideoListDataModelPrivate class implementation
    15 * 
    15 * 
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 38.1.6 %
    18 // Version : %version: 38.1.7 %
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include <hbglobal.h>
    21 #include <hbglobal.h>
    22 #include <mpxmediageneraldefs.h>
    22 #include <mpxmediageneraldefs.h>
    23 #include <mpxmediavideodefs.h>
    23 #include <mpxmediavideodefs.h>
   124 // getVideoNameFromIndex
   124 // getVideoNameFromIndex
   125 // -----------------------------------------------------------------------------
   125 // -----------------------------------------------------------------------------
   126 //
   126 //
   127 const QString VideoListDataModelPrivate::getVideoNameFromIndex(const int &index )  const
   127 const QString VideoListDataModelPrivate::getVideoNameFromIndex(const int &index )  const
   128 {
   128 {
   129     QString txt;
       
   130     CMPXMedia* media = mMediaData.fromIndex(index);
   129     CMPXMedia* media = mMediaData.fromIndex(index);
   131     VideoCollectionUtils::instance().mediaValue<QString>(media, KMPXMediaGeneralTitle, txt );
   130     QString text;
   132     return txt;
   131 
       
   132     TMPXItemId mpxId( 0, 0 );
       
   133     VideoCollectionUtils::instance().mediaValue<TMPXItemId>(media, KMPXMediaGeneralId, mpxId );
       
   134     
       
   135     //Localize default categories
       
   136     if(mpxId.iId2 == KVcxMvcMediaTypeCategory)
       
   137     {
       
   138         switch(mpxId.iId1)
       
   139         {
       
   140             case KVcxMvcCategoryIdDownloads:
       
   141                 text = hbTrId("txt_videos_dblist_downloaded");
       
   142                 break;
       
   143             case KVcxMvcCategoryIdCaptured:
       
   144                 text = hbTrId("txt_videos_dblist_captured");
       
   145                 break;
       
   146         }
       
   147     }
       
   148     else
       
   149     {
       
   150         VideoCollectionUtils::instance().mediaValue<QString>(media, KMPXMediaGeneralTitle, text );
       
   151     }
       
   152     return text;
   133 }
   153 }
   134  
   154  
   135 // -----------------------------------------------------------------------------
   155 // -----------------------------------------------------------------------------
   136 // getVideoThumbnailFromIndex
   156 // getVideoThumbnailFromIndex
   137 // -----------------------------------------------------------------------------
   157 // -----------------------------------------------------------------------------