author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 14:15:47 +0300 | |
changeset 46 | bc5a64e5bc3c |
parent 37 | ba76fc04e6c2 |
child 50 | 377c906a8701 |
child 51 | f39ed5e045e0 |
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>( |
|
70 |
itemDataHelper, hbTrId("txt_cp_dblist_telephone"), hbTrId(""))); |
|
71 |
return ret; |
|
72 |
} |
|
73 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
74 |
/*! |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
75 |
CpTelephonyPlugin::createSettingView() const |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
76 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
77 |
CpBaseSettingView *CpTelephonyPlugin::createSettingView(const QVariant &hint) const |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
78 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
79 |
QVariantHash hash = hint.value<QVariantHash>(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
80 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
81 |
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
|
82 |
QVariantList params; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
83 |
params << QVariant("cpdivertplugin"); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
84 |
return new CpTelephonyPluginView(params); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
85 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
86 |
return 0; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
87 |
} |
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 |
|
37 | 90 |
Q_EXPORT_PLUGIN2(cptelephonyplugin, CpTelephonyPlugin); |
91 |
||
92 |
||
93 |
// End of File. |