author | hgs |
Fri, 15 Oct 2010 12:58:46 +0300 | |
changeset 78 | baacf668fe89 |
parent 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> |
|
78 | 19 |
|
37 | 20 |
#include "cptelephonyplugin.h" |
21 |
#include "cptelephonypluginview.h" |
|
22 |
#include "cppluginlogging.h" |
|
23 |
||
24 |
||
25 |
/*! |
|
26 |
CpTelephonyPlugin::CpTelephonyPlugin() |
|
27 |
*/ |
|
28 |
CpTelephonyPlugin::CpTelephonyPlugin() : |
|
29 |
QObject(0), |
|
78 | 30 |
m_translator(NULL) |
37 | 31 |
{ |
32 |
// Install plugin specific msg handler |
|
33 |
INSTALL_TRACE_MSG_HANDLER; |
|
34 |
DPRINT << ": IN"; |
|
78 | 35 |
m_translator.reset(new HbTranslator(QString("telephone_cp"))); |
36 |
m_translator->loadCommon(); |
|
37 | 37 |
DPRINT << ": OUT"; |
38 |
} |
|
39 |
||
40 |
/*! |
|
41 |
CpTelephonyPlugin::~CpTelephonyPlugin() |
|
42 |
*/ |
|
43 |
CpTelephonyPlugin::~CpTelephonyPlugin() |
|
44 |
{ |
|
45 |
DPRINT; |
|
46 |
||
47 |
// Uninstall plugin specific msg handler |
|
48 |
UNINSTALL_TRACE_MSG_HANDLER; |
|
49 |
} |
|
50 |
||
51 |
/*! |
|
52 |
CpTelephonyPlugin::createSettingFormItemData() const |
|
53 |
*/ |
|
54 |
QList<CpSettingFormItemData*> CpTelephonyPlugin::createSettingFormItemData( |
|
55 |
CpItemDataHelper &itemDataHelper) const |
|
56 |
{ |
|
57 |
DPRINT; |
|
58 |
||
59 |
QList<CpSettingFormItemData*> ret; |
|
60 |
ret.append(new CpSettingFormEntryItemDataImpl<CpTelephonyPluginView>( |
|
50 | 61 |
itemDataHelper, |
62 |
hbTrId("txt_cp_dblist_telephone"), |
|
63 |
hbTrId(""), |
|
64 |
HbIcon(QString("qtg_large_voice_call")))); |
|
37 | 65 |
return ret; |
66 |
} |
|
67 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
68 |
/*! |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
69 |
CpTelephonyPlugin::createSettingView() const |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
70 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
71 |
CpBaseSettingView *CpTelephonyPlugin::createSettingView(const QVariant &hint) const |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
72 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
73 |
QVariantHash hash = hint.value<QVariantHash>(); |
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 |
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
|
76 |
QVariantList params; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
77 |
params << QVariant("cpdivertplugin"); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
78 |
return new CpTelephonyPluginView(params); |
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 |
return 0; |
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 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
83 |
|
37 | 84 |
Q_EXPORT_PLUGIN2(cptelephonyplugin, CpTelephonyPlugin); |
85 |
||
86 |
||
87 |
// End of File. |