85
|
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: caitemmodellist_p.h
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CAITEMMODELLIST_P_H
|
|
19 |
#define CAITEMMODELLIST_P_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <QHash>
|
|
23 |
|
|
24 |
// User includes
|
|
25 |
#include "caservice.h"
|
|
26 |
#include "caclient_global.h"
|
|
27 |
|
|
28 |
// Forward declarations
|
|
29 |
class CaItemModel;
|
|
30 |
class CaQuery;
|
|
31 |
CA_CLIENT_TEST_CLASS(TestCaClient)
|
|
32 |
|
|
33 |
// Class declaration
|
|
34 |
class CaItemModelList
|
|
35 |
{
|
|
36 |
|
|
37 |
public:
|
|
38 |
|
|
39 |
// Function declarations
|
|
40 |
CaItemModelList(QSharedPointer<CaService> service);
|
|
41 |
~CaItemModelList();
|
|
42 |
void clear();
|
|
43 |
int count() const;
|
92
|
44 |
QSharedPointer<CaEntry> at(int row) const;
|
85
|
45 |
void reloadEntries(const CaQuery &query);
|
98
|
46 |
void updateEntry(const QSharedPointer<CaEntry> &entry);
|
107
|
47 |
int updateProgress(int id, int valueOfProgress);
|
85
|
48 |
void updateEntries(const CaQuery &query);
|
|
49 |
int indexOf(const int &id) const;
|
87
|
50 |
void insert(int row, int id);
|
85
|
51 |
void remove(int id);
|
|
52 |
const int &operator[](int row) const;
|
89
|
53 |
QList<int> orderedIdList();
|
85
|
54 |
|
|
55 |
private:
|
|
56 |
|
|
57 |
// Function declarations
|
|
58 |
CaItemModelList();
|
|
59 |
CaItemModelList &operator=(const CaItemModelList &otherList);
|
|
60 |
|
|
61 |
private: // data
|
|
62 |
|
|
63 |
QList<int> mOrderedList;
|
92
|
64 |
QHash<int, QSharedPointer<CaEntry> > mEntriesHash;
|
85
|
65 |
QSharedPointer<CaService> mService;
|
87
|
66 |
|
85
|
67 |
};
|
|
68 |
|
|
69 |
#endif // CAITEMMODELLIST_P_H
|