controlpanel/controlpanel_plat/inc/cpitemdatahelper.h
author hgs
Thu, 01 Apr 2010 03:17:51 +0800
changeset 31 2c9d3aa5bea2
child 32 20bd089f4aaa
permissions -rw-r--r--
201003_2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     1
/*
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     3
* All rights reserved.
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0""
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     8
*
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
     9
* Initial Contributors:
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    11
*
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    12
* Contributors:
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    13
*
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    14
* Description:  
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    15
*
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    16
*/
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    17
#ifndef CP_ITEM_DATA_HELPER_H
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    18
#define CP_ITEM_DATA_HELPER_H
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    19
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    20
#include <qobject>
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    21
#include <cpglobal.h>
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    22
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    23
class QObject;
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    24
class HbDataForm;
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    25
class HbAbstractViewItem;
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    26
class HbDataFormModelItem;
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    27
class CpItemDataHelperPrivate;
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    28
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    29
class CP_EXPORT CpItemDataHelper : public QObject
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    30
{
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    31
	Q_OBJECT
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    32
public:
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    33
    CpItemDataHelper();
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    34
    ~CpItemDataHelper();
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    35
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    36
    void addConnection(HbDataFormModelItem *item,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    37
        const QString &signal,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    38
        QObject *receiver,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    39
        const QString &method);
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    40
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    41
    void removeConnection(HbDataFormModelItem *item,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    42
        const QString &signal,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    43
        QObject *receiver,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    44
        const QString &method);
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    45
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    46
	void addItemPrototype(HbAbstractViewItem *prototype);
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    47
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    48
	void bindToForm(HbDataForm *form) const;
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    49
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    50
signals:
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    51
	void connectionAdded(HbDataFormModelItem *item,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    52
		const QString &signal,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    53
		QObject *receiver,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    54
		const QString &method);
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    55
	void connectionRemoved(HbDataFormModelItem *item,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    56
		const QString &signal,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    57
		QObject *receiver,
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    58
		const QString &method);
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    59
	void prototypeAdded(HbAbstractViewItem *prototype);
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    60
private:
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    61
    CpItemDataHelperPrivate *d;
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    62
};
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    63
2c9d3aa5bea2 201003_2
hgs
parents:
diff changeset
    64
#endif