author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 09:48:26 +0300 | |
changeset 56 | 5bcb308bd24d |
parent 46 | bc5a64e5bc3c |
child 76 | cfea66083b62 |
permissions | -rw-r--r-- |
37 | 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
#include <cpsettingformentryitemdataimpl.h> |
|
18 |
#include <cpitemdatahelper.h> |
|
19 |
#include "cptelephonyplugin.h" |
|
20 |
#include "cptelephonypluginview.h" |
|
21 |
#include "cppluginlogging.h" |
|
22 |
||
23 |
||
24 |
/*! |
|
25 |
CpTelephonyPlugin::CpTelephonyPlugin() |
|
26 |
*/ |
|
27 |
CpTelephonyPlugin::CpTelephonyPlugin() : |
|
28 |
QObject(0), |
|
29 |
m_localisation(0) |
|
30 |
{ |
|
31 |
// Install plugin specific msg handler |
|
32 |
INSTALL_TRACE_MSG_HANDLER; |
|
33 |
DPRINT << ": IN"; |
|
34 |
||
35 |
// Set scoped pointer |
|
36 |
m_localisation.reset(new CpPhoneLocalisation(this)); |
|
37 |
||
38 |
// Install required translations |
|
39 |
m_localisation->installTranslator( |
|
40 |
CpPhoneLocalisation:: |
|
41 |
TranslationFileCommon); |
|
42 |
m_localisation->installTranslator( |
|
43 |
CpPhoneLocalisation:: |
|
44 |
TranslationFileTelephoneCp); |
|
45 |
||
46 |
DPRINT << ": OUT"; |
|
47 |
} |
|
48 |
||
49 |
/*! |
|
50 |
CpTelephonyPlugin::~CpTelephonyPlugin() |
|
51 |
*/ |
|
52 |
CpTelephonyPlugin::~CpTelephonyPlugin() |
|
53 |
{ |
|
54 |
DPRINT; |
|
55 |
||
56 |
// Uninstall plugin specific msg handler |
|
57 |
UNINSTALL_TRACE_MSG_HANDLER; |
|
58 |
} |
|
59 |
||
60 |
/*! |
|
61 |
CpTelephonyPlugin::createSettingFormItemData() const |
|
62 |
*/ |
|
63 |
QList<CpSettingFormItemData*> CpTelephonyPlugin::createSettingFormItemData( |
|
64 |
CpItemDataHelper &itemDataHelper) const |
|
65 |
{ |
|
66 |
DPRINT; |
|
67 |
||
68 |
QList<CpSettingFormItemData*> ret; |
|
69 |
ret.append(new CpSettingFormEntryItemDataImpl<CpTelephonyPluginView>( |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
70 |
itemDataHelper, |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
71 |
hbTrId("txt_cp_dblist_telephone"), |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
72 |
hbTrId(""), |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
73 |
HbIcon(QString("qtg_large_voice_call")))); |
37 | 74 |
return ret; |
75 |
} |
|
76 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
77 |
/*! |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
78 |
CpTelephonyPlugin::createSettingView() const |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
79 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
80 |
CpBaseSettingView *CpTelephonyPlugin::createSettingView(const QVariant &hint) const |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
81 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
82 |
QVariantHash hash = hint.value<QVariantHash>(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
83 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
84 |
if( hash.value("view").toString().compare("divert_view",Qt::CaseInsensitive) == 0){ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
85 |
QVariantList params; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
86 |
params << QVariant("cpdivertplugin"); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
87 |
return new CpTelephonyPluginView(params); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
88 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
89 |
return 0; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
90 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
91 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
92 |
|
37 | 93 |
Q_EXPORT_PLUGIN2(cptelephonyplugin, CpTelephonyPlugin); |
94 |
||
95 |
||
96 |
// End of File. |