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