|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CNTEDITORDATAVIEWITEM_H |
|
19 #define CNTEDITORDATAVIEWITEM_H |
|
20 |
|
21 #include <hbdataformviewitem.h> |
|
22 #include <qtcontacts.h> |
|
23 |
|
24 class CntBaseDetailEditorView; |
|
25 class CntEditorDataModelItem; |
|
26 class QStandardItemModel; |
|
27 class HbLineEdit; |
|
28 |
|
29 QTM_USE_NAMESPACE |
|
30 |
|
31 class CntEditorDataViewItem : public HbDataFormViewItem |
|
32 { |
|
33 Q_OBJECT |
|
34 |
|
35 public: |
|
36 CntEditorDataViewItem(CntBaseDetailEditorView *view, QGraphicsItem *parent = 0); |
|
37 ~CntEditorDataViewItem(); |
|
38 |
|
39 virtual HbAbstractViewItem* createItem(); |
|
40 void setTextFilter(QObject *aEditor, CntEditorDataModelItem *item); |
|
41 |
|
42 public slots: |
|
43 void textChanged(QString text); |
|
44 void indexChanged(int index); |
|
45 void addDetail(); |
|
46 void editDate(); |
|
47 void load() {} |
|
48 void store() {} |
|
49 void focusLineEdit(); |
|
50 |
|
51 protected: |
|
52 virtual HbWidget* createCustomWidget(); |
|
53 |
|
54 #ifdef PBK_UNIT_TEST |
|
55 public: |
|
56 #else |
|
57 private: |
|
58 #endif |
|
59 int modelPosition(QStandardItemModel *model, QContactDetail &detail); |
|
60 |
|
61 CntBaseDetailEditorView *mView; |
|
62 HbLineEdit *mLineEdit; |
|
63 |
|
64 }; |
|
65 |
|
66 |
|
67 #endif // CNTEDITORDATAVIEWITEM_H |