videocollection/videocollectionview/inc/videocollectionviewutils.h
changeset 34 bbb98528c666
parent 30 4f111d64a341
child 36 8aed59de29f9
equal deleted inserted replaced
33:48e74db5d516 34:bbb98528c666
    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 
    22 
       
    23 class HbListView;
       
    24 class VideoSortFilterProxyModel;
       
    25 
    23 class VideoCollectionViewUtils : public QObject
    26 class VideoCollectionViewUtils : public QObject
    24 {
    27 {
    25     Q_OBJECT
    28     Q_OBJECT
    26     
    29     
    27 public:
    30 public:
    28     
       
    29     /**
    31     /**
    30      * Returns singleton instance for this class.
    32      * Returns singleton instance for this class.
    31      * 
    33      * 
    32      * WARNING! Not safe to call this from destructor of another function scope static object!
    34      * WARNING! Not safe to call this from destructor of another function scope static object!
    33      * 
    35      * 
    66      * Get service URI string.
    68      * Get service URI string.
    67      * 
    69      * 
    68      * @return Service URI string. Invalid string in error cases.
    70      * @return Service URI string. Invalid string in error cases.
    69      */
    71      */
    70     QString getServiceUriString();
    72     QString getServiceUriString();
    71       
    73     
       
    74 public:
       
    75     /**
       
    76      * Initializes list view for collection and selection dialog with common
       
    77      * properties.
       
    78      */
       
    79     static void initListView(HbListView *view);
       
    80     
       
    81     /**
       
    82      * Initilizes model sort values.
       
    83      */
       
    84     static void sortModel(VideoSortFilterProxyModel *model, bool async);
       
    85 
    72 public slots:
    86 public slots:
    73     
    87     
    74     /**
    88     /**
    75      * Shows status msgs
    89      * Shows status msgs
    76      *
    90      *
    94     /**
   108     /**
    95      * destructor
   109      * destructor
    96      */
   110      */
    97     virtual ~VideoCollectionViewUtils();
   111     virtual ~VideoCollectionViewUtils();
    98 
   112 
       
   113 private:
       
   114     /** current sorting role */
       
   115     int mSortRole;
    99     
   116     
       
   117     /** current sorting order */
       
   118     Qt::SortOrder mSortOrder;
   100 };
   119 };
   101 
   120 
   102 #endif //__VIDEOCOLLECTIONUIUTILS_H__
   121 #endif //__VIDEOCOLLECTIONUIUTILS_H__
   103 
   122