videocollection/videocollectionwrapper/inc/videosortfilterproxymodel.h
changeset 52 e3cecb93e76a
parent 17 69946d1824c4
child 59 a76e86df7ccd
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
   130      * 
   130      * 
   131      * @param index index of the item in UI.
   131      * @param index index of the item in UI.
   132      * @return TMPXItemId mpx id if succeeds TMPXItemId::InvalidId() in case of error
   132      * @return TMPXItemId mpx id if succeeds TMPXItemId::InvalidId() in case of error
   133      *  
   133      *  
   134      */
   134      */
   135     TMPXItemId getMediaIdAtIndex(const QModelIndex &index) const;
   135     const TMPXItemId& getMediaIdAtIndex(const QModelIndex &index) const;
   136   
   136   
   137     /**
   137     /**
   138      * returns qmodelindex of item id provided.
   138      * returns qmodelindex of item id provided.
   139      * 
   139      * 
   140      * @param item id
   140      * @param item id
   141      * @return QModelIndex;
   141      * @return QModelIndex;
   142      */
   142      */
   143     QModelIndex indexOfId(TMPXItemId id);
   143     QModelIndex indexOfId(const TMPXItemId &id);
   144     
   144     
   145     /**
   145     /**
   146      * Method checks that model exists and asks for file path from
   146      * Method checks that model exists and asks for file path from
   147      * given object.
   147      * given object.
   148      * 
   148      * 
   149      * @param mediaId id of the item.
   149      * @param mediaId id of the item.
   150      * @return QString file path if succeeds, empty string in case of error.
   150      * @return QString file path if succeeds, empty string in case of error.
   151      *  
   151      *  
   152      */
   152      */
   153     QString getMediaFilePathForId(TMPXItemId mediaId);
   153     QString getMediaFilePathForId(const TMPXItemId &mediaId);
   154         
   154         
   155     /**
   155     /**
   156      * Add a new album.
   156      * Add a new album.
   157      * 
   157      * 
   158      * @param title, Album title.
   158      * @param title, Album title.
   186      * @return 0 if no errors.
   186      * @return 0 if no errors.
   187      */
   187      */
   188     int removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &mediaIds);    
   188     int removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &mediaIds);    
   189 	
   189 	
   190     /**
   190     /**
   191      * Renames an album.
   191      * Renames a video or user defined colletion.
   192      * 
   192      * 
   193      * @param itemId, Album to be renamed.
   193      * @param itemId, id of item  to be renamed.
   194      * @param newTitle, New title for the album.
   194      * @param newTitle, New title for the item.
   195      * @return 0 if no errors.
   195      * @return 0 if no errors.
   196      */
   196      */
   197     int renameAlbum(const TMPXItemId &albumId, const QString &newTitle);
   197     int renameItem(const TMPXItemId &itemId, const QString &newTitle);
   198 
   198 
   199     /**
   199     /**
   200 	 * Resolves duplicate album names and returns the resolved name.
   200 	 * Resolves duplicate album names and returns the resolved name.
   201 	 * 'New collection' -> 'New collection (1)' -> 'New collection (2)', etc.
   201 	 * 'New collection' -> 'New collection (1)' -> 'New collection (2)', etc.
   202 	 * 
   202 	 * 
   215      * 
   215      * 
   216      * 
   216      * 
   217      * @param filterValue item id used as filter
   217      * @param filterValue item id used as filter
   218      * @param filterValue
   218      * @param filterValue
   219      */
   219      */
   220     void setGenericIdFilter(TMPXItemId itemId, bool filterValue);
   220     void setGenericIdFilter(const TMPXItemId &itemId, bool filterValue);
   221     
   221     
   222     /**
   222     /**
   223      * Set album in use and invalidates filtering.
   223      * Set album in use and invalidates filtering.
   224      * 
   224      * 
   225      * @param albumId album id
   225      * @param albumId album id
   226      */
   226      */
   227     void setAlbumInUse(TMPXItemId albumId);
   227     void setAlbumInUse(const TMPXItemId &albumId);
   228     
   228     
   229 	/**
   229 	/**
   230 	 * Gets the currently opened item.
   230 	 * Gets the currently opened item.
   231 	 * 
   231 	 * 
   232 	 * @param None.
   232 	 * @param None.
   295     /**
   295     /**
   296      * signaled when particular album content has changed and 
   296      * signaled when particular album content has changed and 
   297      * refiltering is required
   297      * refiltering is required
   298      */
   298      */
   299     void albumChangedSlot();
   299     void albumChangedSlot();
   300 
       
   301     /**
       
   302      * signaled when data for item has changed and 
       
   303      * invalidate is required.
       
   304      */
       
   305     void itemModifiedSlot(const TMPXItemId &itemId);
       
   306     
   300     
   307 private:
   301 private:
   308     
   302     
   309     /**
   303     /**
   310      * disabled contructor
   304      * disabled contructor