34
|
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: stub videolistdatamodeldata
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef VIDEOLISTDATAMODELDATA_H
|
|
19 |
#define VIDEOLISTDATAMODELDATA_H
|
|
20 |
|
|
21 |
#include "videolistdatamodel.h"
|
|
22 |
|
|
23 |
class VideoListDataModelData
|
|
24 |
{
|
|
25 |
public: // methods
|
|
26 |
static void reset()
|
|
27 |
{
|
|
28 |
mData.clear();
|
|
29 |
mLastIndex = QModelIndex();
|
|
30 |
mDataAccessCount = 0;
|
|
31 |
mRowCount = 0;
|
36
|
32 |
mRowCountDecrement = 0;
|
55
|
33 |
mItemId = TMPXItemId::InvalidId();
|
34
|
34 |
}
|
|
35 |
|
|
36 |
static QModelIndex lastIndex()
|
|
37 |
{
|
|
38 |
return mLastIndex;
|
|
39 |
}
|
|
40 |
|
|
41 |
static int dataAccessCount()
|
|
42 |
{
|
|
43 |
return mDataAccessCount;
|
|
44 |
}
|
|
45 |
|
|
46 |
static void setData(int role, QVariant data)
|
|
47 |
{
|
|
48 |
mData.insert(role, data);
|
|
49 |
}
|
|
50 |
|
|
51 |
static void setRowCount(VideoListDataModel &model, int count)
|
|
52 |
{
|
|
53 |
if (count != mRowCount)
|
|
54 |
{
|
|
55 |
mRowCount = count;
|
|
56 |
model.initialize();
|
|
57 |
}
|
|
58 |
}
|
|
59 |
|
|
60 |
public: // data
|
|
61 |
static QMap<int, QVariant> mData;
|
|
62 |
static QModelIndex mLastIndex;
|
|
63 |
static int mDataAccessCount;
|
|
64 |
static int mRowCount;
|
36
|
65 |
static int mRowCountDecrement;
|
55
|
66 |
static TMPXItemId mItemId;
|
34
|
67 |
};
|
|
68 |
|
|
69 |
#endif /* VIDEOLISTDATAMODELDATA_H */
|