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 * Control Panel plugin for showing destinations and access points |
|
16 * settings. |
|
17 */ |
|
18 |
|
19 // System includes |
|
20 #include <QApplication> |
|
21 #include <QLocale> |
|
22 #include <QTranslator> |
|
23 |
|
24 // User includes |
|
25 #include "cpdestinationplugin.h" |
|
26 #include "cpdestinationgroup.h" |
|
27 #include "OstTraceDefinitions.h" |
|
28 #ifdef OST_TRACE_COMPILER_IN_USE |
|
29 #include "cpdestinationpluginTraces.h" |
|
30 #endif |
|
31 /*! |
|
32 \class CpDestinationPlugin |
|
33 \brief This class is a Control Panel plugin for accessing |
|
34 destination and access point settings. |
|
35 */ |
|
36 |
|
37 // External function prototypes |
|
38 |
|
39 // Local constants |
|
40 |
|
41 // ======== LOCAL FUNCTIONS ======== |
|
42 |
|
43 // ======== MEMBER FUNCTIONS ======== |
|
44 |
|
45 /*! |
|
46 Constructor. |
|
47 */ |
|
48 CpDestinationPlugin::CpDestinationPlugin() |
|
49 { |
|
50 OstTraceFunctionEntry0(CPDESTINATIONPLUGIN_CPDESTINATIONPLUGIN_ENTRY); |
|
51 // Install localization |
|
52 QString lang = QLocale::system().name(); |
|
53 QString path = "z:/resource/qt/translations/"; |
|
54 mTranslator = new QTranslator(this); |
|
55 mTranslator->load(path + "cpdestinationplugin_" + lang); |
|
56 qApp->installTranslator(mTranslator); |
|
57 OstTraceFunctionExit0(CPDESTINATIONPLUGIN_CPDESTINATIONPLUGIN_EXIT); |
|
58 } |
|
59 |
|
60 /*! |
|
61 Destructor. |
|
62 */ |
|
63 CpDestinationPlugin::~CpDestinationPlugin() |
|
64 { |
|
65 OstTraceFunctionEntry0(DUP1_CPDESTINATIONPLUGIN_CPDESTINATIONPLUGIN_ENTRY); |
|
66 OstTraceFunctionExit0(DUP1_CPDESTINATIONPLUGIN_CPDESTINATIONPLUGIN_EXIT); |
|
67 } |
|
68 |
|
69 /*! |
|
70 Inherited member from CpPluginInterface. |
|
71 |
|
72 @param[in] itemDataHelper Helper for connecting signals and slots. |
|
73 |
|
74 \return Returns only one data item in QList. The item contains destination group item. |
|
75 */ |
|
76 QList<CpSettingFormItemData*> CpDestinationPlugin::createSettingFormItemData(CpItemDataHelper &itemDataHelper) const |
|
77 { |
|
78 OstTraceFunctionEntry0(CPDESTINATIONPLUGIN_CREATESETTINGFORMITEMDATA_ENTRY); |
|
79 QList<CpSettingFormItemData*> settingFormData; |
|
80 settingFormData.append(new CpDestinationGroup(itemDataHelper)); |
|
81 |
|
82 OstTraceFunctionExit0(CPDESTINATIONPLUGIN_CREATESETTINGFORMITEMDATA_EXIT); |
|
83 return settingFormData; |
|
84 } |
|
85 |
|
86 Q_EXPORT_PLUGIN2(cpdestinationplugin, CpDestinationPlugin); |
|