|
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; |
|
44 QSharedPointer<CaEntry> at(int row) const; |
|
45 void reloadEntries(const CaQuery &query); |
|
46 void updateEntry(const QSharedPointer<CaEntry> &entry); |
|
47 int updateProgress(int id, int valueOfProgress); |
|
48 void updateEntries(const CaQuery &query); |
|
49 int indexOf(const int &id) const; |
|
50 void insert(int row, int id); |
|
51 void remove(int id); |
|
52 const int &operator[](int row) const; |
|
53 QList<int> orderedIdList(); |
|
54 |
|
55 private: |
|
56 |
|
57 // Function declarations |
|
58 CaItemModelList(); |
|
59 CaItemModelList &operator=(const CaItemModelList &otherList); |
|
60 |
|
61 private: // data |
|
62 |
|
63 QList<int> mOrderedList; |
|
64 QHash<int, QSharedPointer<CaEntry> > mEntriesHash; |
|
65 QSharedPointer<CaService> mService; |
|
66 |
|
67 }; |
|
68 |
|
69 #endif // CAITEMMODELLIST_P_H |