|
1 /* |
|
2 * Copyright (c) 2010 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 |
|
18 // System includes |
|
19 #include <QApplication> |
|
20 #include <QLocale> |
|
21 #include <QTranslator> |
|
22 #include <cpsettingformentryitemdataimpl.h> |
|
23 |
|
24 // User includes |
|
25 #include "cpipsettingsplugin.h" |
|
26 #include "cpipsettingsview.h" |
|
27 |
|
28 /*! |
|
29 \class CpIpSettingsPlugin |
|
30 \brief Class implements the "Network Settings" entry item for |
|
31 Control Panel. |
|
32 */ |
|
33 |
|
34 // External function prototypes |
|
35 |
|
36 // Local constants |
|
37 |
|
38 // ======== LOCAL FUNCTIONS ======== |
|
39 |
|
40 // ======== MEMBER FUNCTIONS ======== |
|
41 |
|
42 /*! |
|
43 Constructor. |
|
44 */ |
|
45 CpIpSettingsPlugin::CpIpSettingsPlugin() |
|
46 { |
|
47 // Install localization |
|
48 QString lang = QLocale::system().name(); |
|
49 QString path = "z:/resource/qt/translations/"; |
|
50 mTranslator = new QTranslator(this); |
|
51 mTranslator->load(path + "cpipsettingsplugin_" + lang); |
|
52 qApp->installTranslator(mTranslator); |
|
53 } |
|
54 |
|
55 /*! |
|
56 Destructor. |
|
57 */ |
|
58 CpIpSettingsPlugin::~CpIpSettingsPlugin() |
|
59 { |
|
60 } |
|
61 |
|
62 /*! |
|
63 Creates and returns the entry item. |
|
64 */ |
|
65 QList<CpSettingFormItemData*> CpIpSettingsPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const |
|
66 { |
|
67 QList<CpSettingFormItemData*> settingFormData; |
|
68 settingFormData.append(new CpSettingFormEntryItemDataImpl<CpIpSettingsView>( |
|
69 itemDataHelper, |
|
70 hbTrId("txt_occ_dblist_network_settings"), |
|
71 "", |
|
72 HbIcon("qtg_large_network_settings"))); |
|
73 return settingFormData; |
|
74 } |
|
75 |
|
76 Q_EXPORT_PLUGIN2(cpipsettingsplugin, CpIpSettingsPlugin); |