22 #include <QMap> |
22 #include <QMap> |
23 |
23 |
24 #include <qcontactmanager.h> |
24 #include <qcontactmanager.h> |
25 #include <qcontactfilter.h> |
25 #include <qcontactfilter.h> |
26 #include <qcontactsortorder.h> |
26 #include <qcontactsortorder.h> |
|
27 #include <cntuids.h> |
27 #include "cntcache.h" |
28 #include "cntcache.h" |
28 |
29 |
29 QTM_USE_NAMESPACE |
30 QTM_USE_NAMESPACE |
30 |
31 |
31 class CntListModelData : public QSharedData |
32 class CntListModelData : public QSharedData |
32 { |
33 { |
33 public: |
34 public: |
34 CntListModelData( const QContactFilter& contactFilter = QContactFilter(), |
35 CntListModelData( const QContactFilter& contactFilter = QContactFilter(), |
35 const QList<QContactSortOrder>& contactSortOrders = QList<QContactSortOrder>(), |
|
36 bool showMyCard = true) : |
36 bool showMyCard = true) : |
37 m_contactManager(0), |
37 m_contactManager(NULL), |
38 ownedContactManager(false), |
38 m_ownedContactManager(false), |
39 currentRow(-1), |
39 m_currentRow(-1), |
40 filter(contactFilter), |
40 m_filter(contactFilter), |
41 sortOrders(contactSortOrders), |
41 m_showMyCard(showMyCard) |
42 showMyCard(showMyCard) |
42 { |
43 { } |
43 } |
44 ~CntListModelData() { if (ownedContactManager) {delete m_contactManager;}} |
44 ~CntListModelData() {if (m_ownedContactManager) delete m_contactManager;} |
45 |
45 |
46 public: |
46 public: |
47 QContactManager* m_contactManager; |
47 QContactManager* m_contactManager; |
48 CntCache* m_cache; |
48 CntCache* m_cache; |
49 bool ownedContactManager; |
49 bool m_ownedContactManager; |
50 mutable CntContactInfo currentContact; |
50 mutable CntContactInfo m_currentContact; |
51 mutable int currentRow; |
51 mutable int m_currentRow; |
52 |
52 |
53 QList<QContactLocalId> contactIds; |
53 QList<QContactLocalId> m_contactIds; |
54 QContactFilter filter; |
54 QContactFilter m_filter; |
55 QList<QContactSortOrder> sortOrders; |
55 QList<QContactSortOrder> m_sortOrders; |
56 bool showMyCard; |
56 bool m_showMyCard; |
57 QContactLocalId mMyCardId; |
57 QContactLocalId m_myCardId; |
|
58 int nameOrder; |
58 }; |
59 }; |
59 |
60 |
60 #endif // QCONTACTMODELPRIVATE_H |
61 #endif // QCONTACTMODELPRIVATE_H |
61 |
62 |