videocollection/videocollectionwrapper/tsrc/testvideomodel_p/stub/inc/videolistdatamodel.h
changeset 36 8aed59de29f9
parent 34 bbb98528c666
child 50 21fe8338c6bf
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
    28     /**
    28     /**
    29      * disable copy-constructor and assignment operator
    29      * disable copy-constructor and assignment operator
    30      */
    30      */
    31     Q_DISABLE_COPY(VideoListDataModel) 
    31     Q_DISABLE_COPY(VideoListDataModel) 
    32     
    32     
    33    friend class VideoListDataModelPrivate;
    33     friend class VideoListDataModelPrivate;
    34 
    34 
    35 public: 
    35 public: 
    36 
    36 
    37     /**
    37     /**
    38      * Default constructor
    38      * Default constructor
   102      * index
   102      * index
   103      */
   103      */
   104     QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const
   104     QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const
   105     {
   105     {
   106         Q_UNUSED(parent);
   106         Q_UNUSED(parent);
       
   107         if(mIndexReturnsInvalid)
       
   108         {
       
   109             return QModelIndex();
       
   110         }
   107         return createIndex(row, column);
   111         return createIndex(row, column);
   108     }
   112     }
   109     
   113     
   110     /**
   114     /**
   111      * Parent
   115      * Parent
   137     void reportAsyncStatus(int status, QVariant data)
   141     void reportAsyncStatus(int status, QVariant data)
   138     {
   142     {
   139         mStatus = status;
   143         mStatus = status;
   140         mStatusData = data;
   144         mStatusData = data;
   141     }
   145     }
       
   146 
       
   147     void itemModified(const TMPXItemId itemId)
       
   148     {
       
   149         mModifiedItemId = itemId;
       
   150     }
       
   151     
   142     /**
   152     /**
   143      * dummy collectionclient
   153      * dummy collectionclient
   144      */
   154      */
   145     VideoCollectionClient *mCollectionClient;
   155     VideoCollectionClient *mCollectionClient;
   146     
   156     
   176     
   186     
   177     /**
   187     /**
   178      * setted in reportAsyncStatus
   188      * setted in reportAsyncStatus
   179      */
   189      */
   180     static QVariant mStatusData;
   190     static QVariant mStatusData;
       
   191     
       
   192     /**
       
   193      * setted in itemModified 
       
   194      */
       
   195     static TMPXItemId mModifiedItemId;
       
   196     
       
   197     /**
       
   198      * Flag if index() should return invalid index.
       
   199      */
       
   200     static bool mIndexReturnsInvalid;
   181 };
   201 };
   182 #endif  // __STUBTESTMODEL_H__
   202 #endif  // __STUBTESTMODEL_H__
   183 
   203 
   184 // End of file
   204 // End of file
   185     
       
   186 
       
   187