mpviewplugins/mpcollectionviewplugin/tsrc/unittest_mpcollectioncontainers/stub/src/mpcollectiondatamodel.cpp
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Music Player collection data model stub for testing mpcollectioncontainers. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "stub/inc/mpcollectiondatamodel.h" |
|
20 #include "stub/inc/mpmpxcollectiondata.h" |
|
21 #include "mptrace.h" |
|
22 |
|
23 |
|
24 /*! |
|
25 Stub function |
|
26 */ |
|
27 MpCollectionDataModel::MpCollectionDataModel( MpMpxCollectionData *data, QObject *parent ) |
|
28 : QAbstractListModel(parent), |
|
29 mCollectionData(data) |
|
30 { |
|
31 TX_ENTRY |
|
32 TX_EXIT |
|
33 } |
|
34 |
|
35 /*! |
|
36 Stub function |
|
37 */ |
|
38 MpCollectionDataModel::~MpCollectionDataModel() |
|
39 { |
|
40 TX_ENTRY |
|
41 TX_EXIT |
|
42 } |
|
43 |
|
44 /*! |
|
45 Stub function |
|
46 */ |
|
47 int MpCollectionDataModel::rowCount( const QModelIndex &parent ) const |
|
48 { |
|
49 TX_LOG |
|
50 Q_UNUSED(parent); |
|
51 if ( mCachingInProgress ) { |
|
52 return 0; |
|
53 } |
|
54 else { |
|
55 return mRowCount; |
|
56 } |
|
57 } |
|
58 |
|
59 /*! |
|
60 Stub function |
|
61 */ |
|
62 QVariant MpCollectionDataModel::data(const QModelIndex &index, int role) const |
|
63 { |
|
64 TX_ENTRY |
|
65 Q_UNUSED(index); |
|
66 Q_UNUSED(role); |
|
67 QVariant returnValue = QVariant(); |
|
68 return returnValue; |
|
69 TX_EXIT |
|
70 } |
|
71 |
|
72 /*! |
|
73 Stub function |
|
74 */ |
|
75 void MpCollectionDataModel::refreshModel() |
|
76 { |
|
77 TX_ENTRY |
|
78 TX_EXIT |
|
79 } |
|
80 |
|
81 /*! |
|
82 Stub function |
|
83 */ |
|
84 MpMpxCollectionData *MpCollectionDataModel::collectionData() |
|
85 { |
|
86 return mCollectionData; |
|
87 } |
|
88 |