equal
deleted
inserted
replaced
|
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 #ifndef CP_ITEM_DATA_HELPER_H |
|
18 #define CP_ITEM_DATA_HELPER_H |
|
19 |
|
20 #include <QObject> |
|
21 #include <cpglobal.h> |
|
22 |
|
23 class QObject; |
|
24 class HbWidget; |
|
25 class QModelIndex; |
|
26 class HbDataForm; |
|
27 class HbAbstractViewItem; |
|
28 class HbDataFormModelItem; |
|
29 class CpItemDataHelperPrivate; |
|
30 |
|
31 class CP_EXPORT CpItemDataHelper : public QObject |
|
32 { |
|
33 Q_OBJECT |
|
34 public: |
|
35 explicit CpItemDataHelper(HbDataForm *form = 0); |
|
36 virtual ~CpItemDataHelper(); |
|
37 |
|
38 void bindToForm(HbDataForm *form); |
|
39 |
|
40 void addItemPrototype(HbAbstractViewItem *prototype); |
|
41 |
|
42 void addConnection(HbDataFormModelItem *item, |
|
43 const char *signal, |
|
44 QObject *receiver, |
|
45 const char *method); |
|
46 |
|
47 void removeConnection(HbDataFormModelItem *item, |
|
48 const char *signal, |
|
49 QObject *receiver, |
|
50 const char *method); |
|
51 |
|
52 void connectToForm(const char *signal, |
|
53 QObject *receiver, |
|
54 const char *method); |
|
55 |
|
56 void disconnectFromForm(const char *signal, |
|
57 QObject *receiver, |
|
58 const char *method); |
|
59 |
|
60 HbWidget *widgetFromModelIndex(const QModelIndex &index); |
|
61 |
|
62 private: |
|
63 CpItemDataHelperPrivate *d; |
|
64 }; |
|
65 |
|
66 #endif |