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: Utility class for controlpanel plugins. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cppluginutility.h" |
|
19 #include "cpdataformbuttonentryviewitem.h" |
|
20 #include "cpdataformlistentryviewitem.h" |
|
21 |
|
22 #include <hbdataform.h> |
|
23 |
|
24 /*! \class CpPluginUtility |
|
25 \brief This class supply the utility functions for controlpanel plugins. |
|
26 */ |
|
27 |
|
28 /*! |
|
29 Add item prototypes which are supported by controlpanel framework to a setting form. |
|
30 */ |
|
31 void CpPluginUtility::addCpItemPrototype(HbDataForm *settingForm) |
|
32 { |
|
33 if (settingForm) { |
|
34 QList<HbAbstractViewItem *>prototypeList = settingForm->itemPrototypes(); |
|
35 prototypeList.append(new CpDataFormButtonEntryViewItem()); |
|
36 prototypeList.append(new CpDataFormListEntryViewItem()); |
|
37 settingForm->setItemPrototypes(prototypeList); |
|
38 } |
|
39 } |