videocollection/videocollectionview/inc/videocollectionviewutils.h
changeset 36 8aed59de29f9
parent 34 bbb98528c666
child 39 f6d44a0cd476
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
    17 
    17 
    18 #ifndef __VIDEOCOLLECTIONVIEWUTILS_H__
    18 #ifndef __VIDEOCOLLECTIONVIEWUTILS_H__
    19 #define __VIDEOCOLLECTIONVIEWUTILS_H__
    19 #define __VIDEOCOLLECTIONVIEWUTILS_H__
    20 
    20 
    21 #include <qobject.h>
    21 #include <qobject.h>
       
    22 #include "videocollectioncommon.h"
    22 
    23 
    23 class HbListView;
    24 class HbListView;
    24 class VideoSortFilterProxyModel;
    25 class VideoSortFilterProxyModel;
    25 
    26 
    26 class VideoCollectionViewUtils : public QObject
    27 class VideoCollectionViewUtils : public QObject
    42      * 
    43      * 
    43      * @param role The sorting role.
    44      * @param role The sorting role.
    44      * @param order The sorting order (e.g. ascending or descending).
    45      * @param order The sorting order (e.g. ascending or descending).
    45      * @return Zero if operation succeeded, less than zero in error cases.
    46      * @return Zero if operation succeeded, less than zero in error cases.
    46      */
    47      */
    47     int saveSortingValues(int role, Qt::SortOrder order);
    48     int saveSortingValues(int role, Qt::SortOrder order, VideoCollectionCommon::TCollectionLevels target);
    48     
    49     
    49     /**
    50     /**
    50      * Loads the sorting role and order from cenrep.
    51      * Loads the sorting role and order from cenrep.
    51      * 
    52      * 
    52      * @param role On return contains the sorting role.
    53      * @param role On return contains the sorting role.
    53      * @param order On return contains the sorting order
    54      * @param order On return contains the sorting order
    54      * @return Zero if operation succeeded, less than zero in error cases.
    55      * @return Zero if operation succeeded, less than zero in error cases.
    55      */
    56      */
    56     int loadSortingValues(int& role, Qt::SortOrder& order);
    57     int loadSortingValues(int& role, Qt::SortOrder& order, VideoCollectionCommon::TCollectionLevels target);
    57     
    58     
    58     /**
    59     /**
    59      * Get service icon resource strings from cenrep.
    60      * Get service icon resource strings from cenrep.
    60      * 
    61      * 
    61      * @param icon On return contains the resource string for icon image.
    62      * @param icon On return contains the resource string for icon image.
    79     static void initListView(HbListView *view);
    80     static void initListView(HbListView *view);
    80     
    81     
    81     /**
    82     /**
    82      * Initilizes model sort values.
    83      * Initilizes model sort values.
    83      */
    84      */
    84     static void sortModel(VideoSortFilterProxyModel *model, bool async);
    85     static void sortModel(VideoSortFilterProxyModel *model, bool async, VideoCollectionCommon::TCollectionLevels target);
    85 
    86 
    86 public slots:
    87 public slots:
    87     
    88     
    88     /**
    89     /**
    89      * Shows status msgs
    90      * Shows status msgs
   110      */
   111      */
   111     virtual ~VideoCollectionViewUtils();
   112     virtual ~VideoCollectionViewUtils();
   112 
   113 
   113 private:
   114 private:
   114     /** current sorting role */
   115     /** current sorting role */
   115     int mSortRole;
   116     int mVideosSortRole;
       
   117     int mCollectionsSortRole;
   116     
   118     
   117     /** current sorting order */
   119     /** current sorting order */
   118     Qt::SortOrder mSortOrder;
   120     Qt::SortOrder mVideosSortOrder;
       
   121     Qt::SortOrder mCollectionsSortOrder;
   119 };
   122 };
   120 
   123 
   121 #endif //__VIDEOCOLLECTIONUIUTILS_H__
   124 #endif //__VIDEOCOLLECTIONUIUTILS_H__
   122 
   125