|
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 HbDataForm; |
|
25 class HbAbstractViewItem; |
|
26 class HbDataFormModelItem; |
|
27 class CpItemDataHelperPrivate; |
|
28 |
|
29 class CP_EXPORT CpItemDataHelper : public QObject |
|
30 { |
|
31 Q_OBJECT |
|
32 public: |
|
33 CpItemDataHelper(); |
|
34 ~CpItemDataHelper(); |
|
35 |
|
36 void addConnection(HbDataFormModelItem *item, |
|
37 const QString &signal, |
|
38 QObject *receiver, |
|
39 const QString &method); |
|
40 |
|
41 void removeConnection(HbDataFormModelItem *item, |
|
42 const QString &signal, |
|
43 QObject *receiver, |
|
44 const QString &method); |
|
45 |
|
46 void addItemPrototype(HbAbstractViewItem *prototype); |
|
47 |
|
48 void bindToForm(HbDataForm *form) const; |
|
49 |
|
50 signals: |
|
51 void connectionAdded(HbDataFormModelItem *item, |
|
52 const QString &signal, |
|
53 QObject *receiver, |
|
54 const QString &method); |
|
55 void connectionRemoved(HbDataFormModelItem *item, |
|
56 const QString &signal, |
|
57 QObject *receiver, |
|
58 const QString &method); |
|
59 void prototypeAdded(HbAbstractViewItem *prototype); |
|
60 private: |
|
61 CpItemDataHelperPrivate *d; |
|
62 }; |
|
63 |
|
64 #endif |