31
|
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 |
|
32
|
20 |
#include <QObject>
|
31
|
21 |
#include <cpglobal.h>
|
|
22 |
|
|
23 |
class QObject;
|
32
|
24 |
class HbWidget;
|
|
25 |
class QModelIndex;
|
31
|
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:
|
32
|
35 |
explicit CpItemDataHelper(HbDataForm *form = 0);
|
|
36 |
virtual ~CpItemDataHelper();
|
31
|
37 |
|
32
|
38 |
void bindToForm(HbDataForm *form);
|
31
|
39 |
|
|
40 |
void addItemPrototype(HbAbstractViewItem *prototype);
|
|
41 |
|
32
|
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);
|
31
|
51 |
|
32
|
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);
|
36
|
61 |
|
|
62 |
HbDataFormModelItem *modelItemFromModelIndex(const QModelIndex &index);
|
32
|
63 |
|
31
|
64 |
private:
|
|
65 |
CpItemDataHelperPrivate *d;
|
|
66 |
};
|
|
67 |
|
|
68 |
#endif
|