81
|
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: Private data for CntListModel.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CNTLISTMODEL_P_H
|
|
19 |
#define CNTLISTMODEL_P_H
|
|
20 |
|
|
21 |
#include <QSharedData>
|
|
22 |
#include <HbIcon>
|
|
23 |
#include <qcontactmanager.h>
|
|
24 |
#include <qcontactfilter.h>
|
|
25 |
#include <qcontactid.h>
|
|
26 |
|
|
27 |
QTM_USE_NAMESPACE
|
|
28 |
|
|
29 |
class CntCache;
|
|
30 |
class CntContactInfo;
|
|
31 |
class XQSettingsManager;
|
|
32 |
class XQSettingsKey;
|
|
33 |
class CntDisplayTextFormatter;
|
|
34 |
|
|
35 |
class CntListModelData : public QSharedData
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
CntListModelData(QContactManager *manager, const QContactFilter &filter, bool showMyCard);
|
|
39 |
~CntListModelData();
|
|
40 |
void setFilter(const QContactFilter &contactFilter);
|
|
41 |
|
|
42 |
public:
|
|
43 |
QContactManager *mContactManager; // contact manager, not owned
|
|
44 |
CntCache *mCache; // cache instance, not owned
|
|
45 |
|
|
46 |
QContactFilter mFilter; // filter for selecting contacts to display in the list
|
|
47 |
QList<QContactLocalId> mContactIds; // the IDs of the selected contacts
|
|
48 |
QContactLocalId mGroupId; // the ID of the group if the filter is a group filter, otherwise 0
|
|
49 |
|
|
50 |
mutable CntContactInfo *mCurrentContact; // info about last requested contact, owned
|
|
51 |
mutable int mCurrentRow; // row of last requested contact
|
|
52 |
bool mShowMyCard;
|
|
53 |
QContactLocalId mMyCardId; // id of the my card contact
|
|
54 |
|
|
55 |
XQSettingsManager *mSettings; // settings manager, owned
|
|
56 |
XQSettingsKey *mNameListRowSettingkey; // settings key, owned
|
|
57 |
int mCurrentRowSetting; // current setting for how a list item should be displayed; name only or name + info
|
|
58 |
|
|
59 |
CntDisplayTextFormatter *mFormat; // text formatter used for highlighting search strings in list items, owned
|
|
60 |
|
|
61 |
HbIcon mDefaultIcon; // default icon for contacts
|
|
62 |
HbIcon mDefaultMyCardIcon; // default icon for my card
|
|
63 |
};
|
|
64 |
|
|
65 |
#endif
|