# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1284701609 -10800 # Node ID 2313cb430f28c0072ee7e8957ca9e81de372feca # Parent 61f927bc9441ec0591c8a0dc2fc1b7556afd629c Revision: 201035 Kit: 201037 diff -r 61f927bc9441 -r 2313cb430f28 cbs/CbsServer/Group/CbsServer.mmp --- a/cbs/CbsServer/Group/CbsServer.mmp Thu Sep 02 21:00:29 2010 +0300 +++ b/cbs/CbsServer/Group/CbsServer.mmp Fri Sep 17 08:33:29 2010 +0300 @@ -39,7 +39,7 @@ START RESOURCE ../Data/CbsServer.rss HEADER -TARGET CbsServer.rsg +TARGET cbsserver.rsg TARGETPATH RESOURCE_FILES_DIR LANGUAGE_IDS END diff -r 61f927bc9441 -r 2313cb430f28 cbs/CbsServer/ServerSrc/CCbsDbImp.cpp --- a/cbs/CbsServer/ServerSrc/CCbsDbImp.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/cbs/CbsServer/ServerSrc/CCbsDbImp.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -33,7 +33,7 @@ #include #include -#include +#include #include "CbsUtils.h" #include "CbsServerPanic.h" diff -r 61f927bc9441 -r 2313cb430f28 cbs/CbsServer/ServerSrc/CCbsDbImpTopicList.cpp --- a/cbs/CbsServer/ServerSrc/CCbsDbImpTopicList.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/cbs/CbsServer/ServerSrc/CCbsDbImpTopicList.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -30,7 +30,7 @@ #include // Resource access #include // Resource access -#include +#include #include "CbsServerPanic.h" #include "CbsStreamHelper.h" diff -r 61f927bc9441 -r 2313cb430f28 cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp --- a/cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -27,7 +27,7 @@ #include // Resource access #include // Resource access -#include +#include #include "CbsCommon.h" #include "CbsUtils.h" diff -r 61f927bc9441 -r 2313cb430f28 cellular/psuinotes/inc/psuilogging.h --- a/cellular/psuinotes/inc/psuilogging.h Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/psuinotes/inc/psuilogging.h Fri Sep 17 08:33:29 2010 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" diff -r 61f927bc9441 -r 2313cb430f28 cellular/psuinotes/inc/psuiutils.h --- a/cellular/psuinotes/inc/psuiutils.h Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/psuinotes/inc/psuiutils.h Fri Sep 17 08:33:29 2010 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -35,7 +35,67 @@ class PSUINOTES_EXPORT PsUiUtils : public QObject { Q_OBJECT - + +public: + enum BasicServiceGroups + { + Unknown = -1, //this is not part of GSM standard + // Phone settings updates this automatically to ETelephony or to EAltTele, + // depending on if ALS is supported, and which line is active. + AllTeleAndBearer = 0, + AllTele = 10, + Telephony = 11, + AllDataTele = 12, + Fax = 13, + Sms = 16, + AllDataExSms = 18, //voice broadcast in gsm 02.30 v. 7.1.0 + AllTeleExcSms = 19, + + AllPlmnTele = 50, + PlmnTele1 = 51, + PlmnTele2 = 52, + PlmnTele3 = 53, + PlmnTele4 = 54, + PlmnTele5 = 55, + PlmnTele6 = 56, + PlmnTele7 = 57, + PlmnTele8 = 58, + PlmnTele9 = 59, + PlmnTeleA = 60, + PlmnTeleB = 61, + PlmnTeleC = 62, + PlmnTeleD = 63, + PlmnTeleE = 64, + PlmnTeleF = 65, + + AllBearer = 20, + AllAsync = 21, + AllSync = 22, + SyncData = 24, + AsyncData = 25, + PacketData = 26, + PadAccess = 27, + AllPlmnBearer = 70, + PlmnBearerServ1 = 71, + PlmnBearerServ2 = 72, + PlmnBearerServ3 = 73, + PlmnBearerServ4 = 74, + PlmnBearerServ5 = 75, + PlmnBearerServ6 = 76, + PlmnBearerServ7 = 77, + PlmnBearerServ8 = 78, + PlmnBearerServ9 = 79, + PlmnBearerServA = 80, + PlmnBearerServB = 81, + PlmnBearerServC = 82, + PlmnBearerServD = 83, + PlmnBearerServE = 84, + PlmnBearerServF = 85, + + AltTele = 89 + // no ui note support + }; + public: /*! Error code text conversion diff -r 61f927bc9441 -r 2313cb430f28 cellular/psuinotes/src/psuidivertnotehandler.cpp --- a/cellular/psuinotes/src/psuidivertnotehandler.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/psuinotes/src/psuidivertnotehandler.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -134,7 +134,7 @@ } else { if (ongoing) { PsUiNotes::instance()->showGlobalProgressNote( - m_activeProgressNoteId, hbTrId("txt_phone_info_requesting")); + m_activeProgressNoteId, hbTrId("txt_common_info_requesting")); } else { PsUiNotes::instance()->cancelNote(m_activeProgressNoteId); } diff -r 61f927bc9441 -r 2313cb430f28 cellular/psuinotes/src/psuilocalisation.cpp --- a/cellular/psuinotes/src/psuilocalisation.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/psuinotes/src/psuilocalisation.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" diff -r 61f927bc9441 -r 2313cb430f28 cellular/psuinotes/src/psuinotes.cpp --- a/cellular/psuinotes/src/psuinotes.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/psuinotes/src/psuinotes.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -414,7 +414,7 @@ const QList &divertingStatusList, QString &text) { - text.append(hbTrId("Active for:") + "\n\n"); //txt_phone_title_active_for + text.append(hbTrId("txt_phone_title_active_for") + "\n\n"); int entries = divertingStatusList.count(); DPRINT << ": entries " << entries; @@ -427,24 +427,23 @@ ((entry->iServiceGroup & ServiceGroupData)) && !dataSet) { if ((entry->iServiceGroup & ServiceGroupVoice) && !voiceSet) { voiceSet = true; - text.append(hbTrId("Voice calls") + "\n"); //txt_phone_info_voice_calls + text.append(hbTrId("txt_phone_info_voice_calls") + "\n"); } else if ((entry->iServiceGroup & ServiceGroupData) && !dataSet) { dataSet = true; - text.append(hbTrId("Video calls") + "\n"); //txt_phone_info_video_calls + text.append(hbTrId("txt_phone_info_video_calls") + "\n"); } QString phoneNumber = formatPhoneNumber(divertingStatusList.at(i)->iNumber); - text.append(hbTrId("To number:\n%L1").arg(phoneNumber) +"\n"); //txt_phone_info_to_numbernl1 + text.append(hbTrId("txt_phone_info_to_numbernl1").arg(phoneNumber) +"\n"); if (0 < entry->iTimeout) { - text.append(hbTrId("Delay time:\n%L1 seconds"). - arg(entry->iTimeout) +"\n\n"); // txt_phone_info_delay_timenln_seconds + text.append(hbTrId("txt_phone_info_delay_timenln_seconds", + entry->iTimeout) + "\n\n"); } else { text.append("\n"); } - } } // Convert plain text to html @@ -457,7 +456,8 @@ void PsUiNotes::activeNoteAboutToClose() { DPRINT << ": IN"; - + + if (m_isNoteShowingOngoing) { m_isNoteShowingOngoing = false; QObject* note(NULL); @@ -473,7 +473,7 @@ note->deleteLater(); } } - + DPRINT << ": OUT"; } @@ -483,9 +483,9 @@ void PsUiNotes::handleProgressNoteCanceled() { DPRINT << ": IN"; - + emit progressNoteCanceled(); - + DPRINT << ": OUT"; } @@ -496,7 +496,7 @@ { DPRINT << ": IN"; Q_ASSERT(m_passwordDialog && m_passwordValidator); - + HbLineEdit *hbLineEdit = m_passwordDialog->lineEdit(); int position = 0; QString password = hbLineEdit->text(); @@ -504,7 +504,7 @@ (QValidator::Acceptable == m_passwordValidator->validate( password, position)); m_passwordDialog->actions().at(0)->setEnabled(isPasswordValid); - + DPRINT << ": OUT"; } @@ -515,12 +515,12 @@ void PsUiNotes::showNotificationDialog(const QString& text) { DPRINT << ": IN"; - + HbNotificationDialog *notifDialog = new HbNotificationDialog(); notifDialog->setDismissPolicy(HbPopup::TapAnywhere); notifDialog->setAttribute(Qt::WA_DeleteOnClose, true); - notifDialog->setText(text); + notifDialog->setTitle(text); notifDialog->show(); DPRINT << ": OUT"; @@ -534,10 +534,10 @@ DPRINT << ": IN"; HbDeviceNotificationDialog notifDialog; - - notifDialog.setText(text); + + notifDialog.setTitle(text); notifDialog.show(); - + DPRINT << ": OUT"; } diff -r 61f927bc9441 -r 2313cb430f28 cellular/psuinotes/src/psuiwaitingnotehandler.cpp --- a/cellular/psuinotes/src/psuiwaitingnotehandler.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/psuinotes/src/psuiwaitingnotehandler.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -29,9 +29,9 @@ m_callWaitingWrapper(callWaitingWrapper) { DPRINT << ": IN"; - + m_settingsWrapper = new PsUiSettingsWrapper(); - + QObject::connect( &m_callWaitingWrapper, SIGNAL(handleCallWaitingGetStatus( @@ -81,21 +81,28 @@ PsUiNotes::instance()->cancelNote(m_activeNoteId); + bool alsCaseOnly = false; + if (1 == basicServiceGroupIds.count() && + PsUiUtils::AltTele == static_cast(basicServiceGroupIds.at(0))) { + DPRINT << "Status is only for als"; + alsCaseOnly = true; + } + if (PSetCallWaitingWrapper::StatusNotProvisioned == status && m_settingsWrapper->isFeatureCallWaitingDistiquishNotProvisionedEnabled()) { DPRINT << ": not provisioned"; - PsUiNotes::instance()->showGlobalNotificationDialog(hbTrId("txt_phone_info_request_not_completed")); - } - - else if (PSetCallWaitingWrapper::StatusActive == status) { + PsUiNotes::instance()-> + showGlobalNotificationDialog(hbTrId("txt_phone_info_request_not_completed")); + } + else if (PSetCallWaitingWrapper::StatusActive == status && !alsCaseOnly ) { DPRINT << ": status active"; PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("Call waiting active")); //txt_phone_dpopinfo_call_waiting_active + hbTrId("txt_phone_dpopinfo_call_waiting_active")); } else { DPRINT << ": status not active"; PsUiNotes::instance()->showGlobalNotificationDialog( - hbTrId("Call waiting not active")); //txt_phone_dpopinfo_call_waiting_not_active + hbTrId("txt_phone_dpopinfo_call_waiting_not_active")); } DPRINT << ": OUT"; @@ -130,7 +137,7 @@ break; } } - + DPRINT << ": OUT"; } @@ -141,16 +148,16 @@ { DPRINT << ": IN"; DPRINT << "ongoing:" << ongoing << ", interrupted:" << interrupted; - + if (ongoing) { - PsUiNotes::instance()->showGlobalProgressNote(m_activeNoteId, hbTrId("txt_common_info_requesting")); + PsUiNotes::instance()->showGlobalProgressNote(m_activeNoteId, + hbTrId("txt_common_info_requesting")); } - + if (interrupted) { PsUiNotes::instance()->cancelNote(m_activeNoteId); } - - + DPRINT << ": OUT"; } @@ -161,7 +168,7 @@ { DPRINT << ": IN"; DPRINT << "errorCode:" << error; - PsUiNotes::instance()->cancelNote(m_activeNoteId); + PsUiNotes::instance()->cancelNote(m_activeNoteId); PsUiNotes::instance()->showGlobalErrorNote(m_activeNoteId, error); DPRINT << ": OUT"; diff -r 61f927bc9441 -r 2313cb430f28 cellular/telephonysettings/group/phonesettings.mmp --- a/cellular/telephonysettings/group/phonesettings.mmp Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/telephonysettings/group/phonesettings.mmp Fri Sep 17 08:33:29 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -12,12 +12,12 @@ * Contributors: * * Description: This is project specification file for the Phone Settings. -* +* * */ #include -#include "../logger/phonesettingsloggingconf.h" +#include "../logger/phonesettingsloggingconf.h" // Capability assignment. CAPABILITY CAP_GENERAL_DLL @@ -28,41 +28,36 @@ UID 0x1000008d 0x100058e3 SOURCEPATH ../src -SOURCE psetcallwaiting.cpp -SOURCE psetcontainer.cpp -SOURCE psetcallbarring.cpp -SOURCE psetcalldiverting.cpp -SOURCE psettelephony.cpp -SOURCE psetcli.cpp -SOURCE psetvariationproxy.cpp -SOURCE psetnetwork.cpp -SOURCE psetsaobserver.cpp -SOURCE psetcsp.cpp -SOURCE psetutility.cpp -SOURCE psetrefreshhandlerimpl.cpp -SOURCE psetcalldivertingbase.cpp -SOURCE psetsubscriberidcheck.cpp -SOURCE psetcalldivertingbasicimpl.cpp -SOURCE psetcalldivertingcreator.cpp -SOURCE psetcalldivertingdualaffectimpl.cpp +SOURCE psetcallwaiting.cpp +SOURCE psetcontainer.cpp +SOURCE psetcallbarring.cpp +SOURCE psetcalldiverting.cpp +SOURCE psettelephony.cpp +SOURCE psetcli.cpp +SOURCE psetvariationproxy.cpp +SOURCE psetnetwork.cpp +SOURCE psetsaobserver.cpp +SOURCE psetcsp.cpp +SOURCE psetutility.cpp +SOURCE psetrefreshhandlerimpl.cpp +SOURCE psetcalldivertingbase.cpp +SOURCE psetsubscriberidcheck.cpp +SOURCE psetcalldivertingbasicimpl.cpp +SOURCE psetcalldivertingcreator.cpp +SOURCE psetcalldivertingdualaffectimpl.cpp USERINCLUDE ../inc -USERINCLUDE ../logger +USERINCLUDE ../logger SYSTEMINCLUDE ../../../inc -// APP include needed because telephonysettings -// uses vmbx headers from APP layer. -// <-- QT PHONE START --> + MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END --> + LIBRARY euser.lib LIBRARY etel.lib LIBRARY etelmm.lib LIBRARY customapi.lib -LIBRARY bafl.lib +LIBRARY bafl.lib LIBRARY sssettings.lib -// <-- QT PHONE START --> -//LIBRARY vmbx.lib -// <-- QT PHONE END --> LIBRARY featmgr.lib LIBRARY centralrepository.lib diff -r 61f927bc9441 -r 2313cb430f28 cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pri --- a/cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pri Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pri Fri Sep 17 08:33:29 2010 +0300 @@ -14,13 +14,13 @@ # Description: # -HEADERS += ../../../../phonesrv_plat/\phone_settings_api/inc/psetcallbarringwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetcalldivertingwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetcallwaitingwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetcliwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetnetworkwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetwrapper.h \ - ../../../../phonesrv_plat/\phone_settings_api/inc/psetwrappertypes.h \ +HEADERS += ../../../../phonesrv_plat/phone_settings_api/inc/psetcallbarringwrapper.h \ + ../../../../phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h \ + ../../../../phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h \ + ../../../../phonesrv_plat/phone_settings_api/inc/psetcliwrapper.h \ + ../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h \ + ../../../../phonesrv_plat/phone_settings_api/inc/psetwrapper.h \ + ../../../../phonesrv_plat/phone_settings_api/inc/psetwrappertypes.h \ ./src/psetcallbarringwrapper_p.h \ ./src/psetcalldivertingwrapper_p.h \ ./src/psetcallwaitingwrapper_p.h \ diff -r 61f927bc9441 -r 2313cb430f28 cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.cpp --- a/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -19,7 +19,6 @@ #include #include #include -#include #include "ut_psetcliwrapper.h" #include "testutilities.h" #define private public diff -r 61f927bc9441 -r 2313cb430f28 convergedcallengine/cenrepdatabase/group/cenrepdatabase.mmp --- a/convergedcallengine/cenrepdatabase/group/cenrepdatabase.mmp Thu Sep 02 21:00:29 2010 +0300 +++ b/convergedcallengine/cenrepdatabase/group/cenrepdatabase.mmp Fri Sep 17 08:33:29 2010 +0300 @@ -33,9 +33,7 @@ USERINCLUDE ../inc -// <-- QT PHONE START --> MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END --> LIBRARY euser.lib LIBRARY centralrepository.lib diff -r 61f927bc9441 -r 2313cb430f28 convergedcallengine/spsettings/group/serviceprovidersettings.mmp --- a/convergedcallengine/spsettings/group/serviceprovidersettings.mmp Thu Sep 02 21:00:29 2010 +0300 +++ b/convergedcallengine/spsettings/group/serviceprovidersettings.mmp Fri Sep 17 08:33:29 2010 +0300 @@ -38,9 +38,7 @@ USERINCLUDE ../inc -// <-- QT PHONE START--> MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END--> LIBRARY euser.lib LIBRARY centralrepository.lib @@ -50,4 +48,4 @@ LIBRARY featmgr.lib LIBRARY cenrepdatabase.lib -//DEFFILE ?filename + diff -r 61f927bc9441 -r 2313cb430f28 package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_definition.xml Fri Sep 17 08:33:29 2010 +0300 @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 61f927bc9441 -r 2313cb430f28 package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_map.xml Fri Sep 17 08:33:29 2010 +0300 @@ -0,0 +1,1 @@ + diff -r 61f927bc9441 -r 2313cb430f28 phoneclientserver/phoneserver/Group/PhoneServer.mmp --- a/phoneclientserver/phoneserver/Group/PhoneServer.mmp Thu Sep 02 21:00:29 2010 +0300 +++ b/phoneclientserver/phoneserver/Group/PhoneServer.mmp Fri Sep 17 08:33:29 2010 +0300 @@ -113,16 +113,11 @@ USERINCLUDE ../../phoneclient/inc/sharedclientserver -// <-- QT PHONE START--> MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END--> SYSTEMINCLUDE ../../../inc SYSTEMINCLUDE ../../inc // for RPhCltEmergencyCall.h, CPhCltExtPhoneDialData.h -// TEMPORARY DEFINITION FOR TELEPHONY VARIATION HEADERS -SYSTEMINCLUDE ../../../../../app/phone/inc - // TEMPORARY DEFINITION FOR Orbit Device Dialog SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore diff -r 61f927bc9441 -r 2313cb430f28 phonecmdhandler/phonecmdhnlr/group/PhoneCmdHandler.mmp --- a/phonecmdhandler/phonecmdhnlr/group/PhoneCmdHandler.mmp Thu Sep 02 21:00:29 2010 +0300 +++ b/phonecmdhandler/phonecmdhnlr/group/PhoneCmdHandler.mmp Fri Sep 17 08:33:29 2010 +0300 @@ -51,9 +51,6 @@ LIBRARY phoneclient.lib LIBRARY logcli.lib LIBRARY efsrv.lib -// <-- QT PHONE START --> -//LIBRARY pbkeng.lib -// <-- QT PHONE END --> MACRO API_TRACE_FLAG MACRO COMPONENT_TRACE_FLAG diff -r 61f927bc9441 -r 2313cb430f28 satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp --- a/satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -765,6 +765,15 @@ CompleteSetupCall( RSat::KModifiedByCallControl ); break; } + case KErrSatBusy: + { + LOG( SIMPLE, + "SETUPCALL: CSetUpCallHandler::CompleteSetupCallWithStatus \ + KInteractionWithCCTemporaryError" ) + // Call control some time can case this error. + CompleteSetupCall( RSat::KInteractionWithCCTemporaryError ); + break; + } default: { diff -r 61f927bc9441 -r 2313cb430f28 satengine/SatServer/inc/SatMacroes.h --- a/satengine/SatServer/inc/SatMacroes.h Thu Sep 02 21:00:29 2010 +0300 +++ b/satengine/SatServer/inc/SatMacroes.h Fri Sep 17 08:33:29 2010 +0300 @@ -29,9 +29,11 @@ // MACRO MODULE_TESTING_LB // #define MODULE_TESTING_LB +#ifdef _DEBUG // Use this macro to enable logging. // Must be disabled on released version. -// MACRO ENABLE_SAT_LOGGING -// #define ENABLE_SAT_LOGGING +MACRO ENABLE_SAT_LOGGING +#define ENABLE_SAT_LOGGING +#endif #endif // SATMACROES_H diff -r 61f927bc9441 -r 2313cb430f28 satui/satapp/inc/satappmainhandler.h --- a/satui/satapp/inc/satappmainhandler.h Thu Sep 02 21:00:29 2010 +0300 +++ b/satui/satapp/inc/satappmainhandler.h Fri Sep 17 08:33:29 2010 +0300 @@ -30,6 +30,7 @@ class SatAppToneProvider; class SatAppPopupProvider; class SatAppConfirmProvider; +class AfActivityStorage; class SatAppMainHandler : public QObject { @@ -59,6 +60,7 @@ SatAppPopupProvider* mPopup; SatAppConfirmProvider *mConfirm; QVariantHash mActivity; + AfActivityStorage *mActivityStorage; HbMessageBox *mOfflineWarningDlg; }; diff -r 61f927bc9441 -r 2313cb430f28 satui/satapp/satapp.pro --- a/satui/satapp/satapp.pro Thu Sep 02 21:00:29 2010 +0300 +++ b/satui/satapp/satapp.pro Fri Sep 17 08:33:29 2010 +0300 @@ -47,7 +47,8 @@ -lCdlEngine \ -lmediaclientaudio \ -lprofileeng \ - -lbafl + -lbafl \ + -lafservice HEADERS += inc/satappmainhandler.h \ inc/satappserverdispatcher.h \ diff -r 61f927bc9441 -r 2313cb430f28 satui/satapp/src/satappmainhandler.cpp --- a/satui/satapp/src/satappmainhandler.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/satui/satapp/src/satappmainhandler.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -17,9 +17,10 @@ */ //Qt #include -#include #include #include +#include +#include // symbian #include @@ -62,6 +63,8 @@ else{ showOfflineWarning(); } + + mActivityStorage = new AfActivityStorage(this); removeActivity(); qDebug("SATAPP: SatAppMainHandler::SatAppMainHandler <"); @@ -211,7 +214,8 @@ void SatAppMainHandler::updateActivity() { qDebug("SATAPP: SatAppMainHandler::updateActivity >"); - mActivity.insert("screenshot", mMenu->takeScreenShot()); + mActivity.insert(ActivityScreenshotKeyword, + mMenu->takeScreenShot()); qDebug("SATAPP: SatAppMainHandler::updateActivity <"); } @@ -224,8 +228,8 @@ qDebug("SATAPP: SatAppMainHandler::saveActivity >"); // Add the activity to the activity manager - const bool ok = qobject_cast(qApp)->activityManager()-> - addActivity(SATAPP_ACTIVITY_ID, QVariant(), mActivity); + const bool ok = mActivityStorage->saveActivity( + SATAPP_ACTIVITY_ID, QVariant(), mActivity); qDebug("SATAPP: SatAppMainHandler::saveActivity < %d", ok); } @@ -238,20 +242,13 @@ { qDebug("SATAPP: SatAppMainHandler::removeActivity >"); - QList activityList = - qobject_cast(qApp)->activityManager()->activities(); - qDebug("SATAPP: SatAppMenuProvider::removeActivity count=%d", - activityList.count()); - foreach (QVariantHash activity, activityList){ - if (activity.keys().contains(SATAPP_ACTIVITY_ID)){ - mActivity = activity; - qDebug("SATAPP: SatAppMenuProvider::removeActivity store"); - break; - } - } - - const bool ok = qobject_cast(qApp)->activityManager()-> - removeActivity(SATAPP_ACTIVITY_ID); + + QVariantHash activity = mActivityStorage->activityMetaData(SATAPP_ACTIVITY_ID); + if(activity.keys().contains(SATAPP_ACTIVITY_ID)) { + mActivity = activity; + qDebug("SATAPP: SatAppMenuProvider::removeActivity store"); + } + const bool ok = mActivityStorage->removeActivity(SATAPP_ACTIVITY_ID); qDebug("SATAPP: SatAppMainHandler::removeActivity < %d", ok); } diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/dialpad.pro --- a/telutils/dialpad/dialpad.pro Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/dialpad.pro Fri Sep 17 08:33:29 2010 +0300 @@ -38,7 +38,8 @@ inc/dialpadmailboxeventfilterbase.h \ inc/dialpademergencycalleventfilter.h \ inc/dialpadhasheventfilter.h \ - inc/dialpadnumericbutton.h + inc/dialpadnumericbutton.h \ + inc/dialpadnumericbuttongrid.h SOURCES += src/dialpad.cpp \ src/dialpadbutton.cpp \ @@ -56,7 +57,8 @@ src/dialpademergencycalleventfilter.cpp \ src/dialpadvtkeyhandler.cpp \ src/dialpadhasheventfilter.cpp \ - src/dialpadnumericbutton.cpp + src/dialpadnumericbutton.cpp \ + src/dialpadnumericbuttongrid.cpp RESOURCES += dialpad.qrc diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/inc/dialpadinputfield.h --- a/telutils/dialpad/inc/dialpadinputfield.h Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/inc/dialpadinputfield.h Fri Sep 17 08:33:29 2010 +0300 @@ -23,19 +23,23 @@ class HbLineEdit; class DialpadButtonStyle; class DialpadButton; +class HbMainWindow; class DialpadInputField : public HbWidget { Q_OBJECT public: - DialpadInputField(QGraphicsItem* parent=0); + DialpadInputField(const HbMainWindow& mainWindow, + QGraphicsItem* parent=0); ~DialpadInputField(); HbLineEdit& editor() const; DialpadButton& backspaceButton() const; + void updateLayout(Qt::Orientation orientation); + protected: QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const; @@ -44,9 +48,10 @@ void onEditorContentChanged(); private: + const HbMainWindow& mMainWindow; HbLineEdit* mNumberEditor; DialpadButton* mBackspace; - int mHeight; + qreal mHeight; }; #endif // DIALPADINPUTFIELD_H diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/inc/dialpadkeypad.h --- a/telutils/dialpad/inc/dialpadkeypad.h Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/inc/dialpadkeypad.h Fri Sep 17 08:33:29 2010 +0300 @@ -11,24 +11,21 @@ * * Contributors: * -* Description: Dialpad keypad +* Description: Number grid and dial key. * */ #ifndef DIALPADKEYPAD_H #define DIALPADKEYPAD_H -#include -#include -#include +#include class DialpadInputField; class DialpadButton; -class DialpadNumericButton; +class DialpadNumericButtonGrid; class QSignalMapper; -class QGraphicsGridLayout; -class DialpadKeypad : public HbInputButtonGroup +class DialpadKeypad : public HbWidget { Q_OBJECT @@ -41,71 +38,34 @@ ~DialpadKeypad(); public: + bool isCallButtonEnabled() const; + void setCallButtonEnabled(bool enabled); void resetButtons(); - DialpadButton& callButton() const; - protected slots: - void setButtonTexts(); - void handleKeyClicked(int key); void sendKeyPressEvent(const QKeyEvent& event); void sendKeyReleaseEvent(const QKeyEvent& event); void sendLongPressEvent(const QKeyEvent& event); void handleKeyChangeEvent(const QKeyEvent& releaseEvent, const QKeyEvent& pressEvent); - void cancelButtonPress(); protected: void postKeyEvent(QEvent::Type type, int key); void sendKeyEventToEditor(QEvent::Type type, int key); - inline DialpadNumericButton* button(int i) const; - void updateButtonLabels(); - void updateColorArray(); - void updateIconColor(); - void updateTextLayouts(const QSizeF &size); - void resolveTextContent(QList &content); - void createTextLayouts(const QSizeF &size, - const QList &content); - void layoutTextLines(const QSizeF &size, - QTextLayout &textLayout, - int state, - int type); - protected: - void paint(QPainter* painter, - const QStyleOptionGraphicsItem* option, - QWidget* widget); void setGeometry(const QRectF &rect); - void changeEvent(QEvent *event); - -private: - enum ButtonState { - Normal = 0, - Pressed, - StateCount - }; - - enum TextType { - PrimaryText = 0, - SecondaryText, - TextTypeCount - }; private: const HbMainWindow& mMainWindow; DialpadInputField& mInputField; QSignalMapper* mKeyClickedSignalMapper; - QMap mGeneratedChar; int mPressedNumericKey; DialpadButton* mCallButton; - QList mColors; - QList mTextLayouts; - qreal mUnit; - qreal mMaxPrimaryLineWidth; + DialpadNumericButtonGrid* mNumericButtonGrid; }; #endif // DIALPADKEYPAD_H diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/inc/dialpadnumericbutton.h --- a/telutils/dialpad/inc/dialpadnumericbutton.h Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/inc/dialpadnumericbutton.h Fri Sep 17 08:33:29 2010 +0300 @@ -38,10 +38,14 @@ void setSecondaryText(const QString& text); QString secondaryText() const; + void setSecondary2ndRowText(const QString& text); + QString secondary2ndRowText() const; + private: HbIcon mIcon; QString mText; QString mSecondaryText; + QString mSecondaryTextRow2; }; #endif // DIALPADNUMERICBUTTON_H diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/inc/dialpadnumericbuttongrid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/telutils/dialpad/inc/dialpadnumericbuttongrid.h Fri Sep 17 08:33:29 2010 +0300 @@ -0,0 +1,109 @@ +/*! +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements grid of numeric buttons +* +*/ + +#ifndef DIALPADNUMERICBUTTONGRID_H +#define DIALPADNUMERICBUTTONGRID_H + +#include +#include +#include + +class DialpadNumericButton; + +class DialpadNumericButtonGrid : public HbInputButtonGroup +{ + Q_OBJECT + +public: + explicit DialpadNumericButtonGrid( + const HbMainWindow& mainWindow, + QGraphicsItem* parent=0); + + ~DialpadNumericButtonGrid(); + +public: + void resetButtons(); + + QChar inputCharacter(int keyCode) const; + +protected slots: + void setButtonTexts(); + void updateButtonLabels(); + void cancelButtonPress(); + +protected: + inline DialpadNumericButton* button(int i) const; + void updateColorArray(); + void updateIconColor(); + void updateTextLayouts(const QSizeF &size); + void resolveTextContent(QList &content, bool& useTwoRows); + void createTextLayouts(const QSizeF &size, + const QList &content, + bool useTwoRows); + void layoutTextLines(const QSizeF &size, + QTextLayout &textLayout, + int state, + int type, + bool useTwoRows); + inline void layoutPrimaryText( + QTextLayout& layout, + DialpadNumericButton& button, + qreal cellWidth, + qreal cellHeight, + qreal textHeight) const; + inline void layoutSecondaryText( + QTextLayout& layout, + DialpadNumericButton& button, + qreal cellWidth, + qreal cellHeight, + qreal textHeight, + qreal textDescent, + bool useTwoRows) const; + bool isButtonPressed() const; + void updateIconSizes(); + +protected: + void paint(QPainter* painter, + const QStyleOptionGraphicsItem* option, + QWidget* widget); + void setGeometry(const QRectF &rect); + void changeEvent(QEvent *event); + +private: + enum ButtonState { + Normal = 0, + Pressed, + StateCount + }; + + enum TextType { + PrimaryText = 0, + SecondaryText, + TextTypeCount + }; + +private: + const HbMainWindow& mMainWindow; + QList mColors; + QList mTextLayouts; + qreal mUnit; + qreal mMaxPrimaryLineWidth; + qreal mPrimaryTextBaseline; + QMap mGeneratedChar; +}; + +#endif // DIALPADNUMERICBUTTONGRID_H diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/resources/dialpad.css --- a/telutils/dialpad/resources/dialpad.css Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/resources/dialpad.css Fri Sep 17 08:33:29 2010 +0300 @@ -14,7 +14,7 @@ DialpadInputField > HbLineEdit::text{ left: -var(hb-param-margin-gene-middle-horizontal); right: var(hb-param-margin-gene-middle-horizontal); - top: -var(hb-param-margin-gene-middle-vertical); - bottom: var(hb-param-margin-gene-middle-vertical); + top: -0.3un; + bottom: 0.3un; } diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/src/dialpad.cpp --- a/telutils/dialpad/src/dialpad.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/src/dialpad.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -37,17 +37,15 @@ #include "dialpadbackground.h" #include "dialpadbutton.h" -static const QLatin1String backgroundGraphics("qtg_fr_input_v_bg"); +static const QLatin1String backgroundGraphicsV("qtg_fr_input_v_bg"); static const QLatin1String backgroundGraphicsH("qtg_fr_input_h_bg"); -static const QLatin1String minimizeIcon("qtg_graf_input_v_swipe"); +static const QLatin1String minimizeIconV("qtg_graf_input_v_swipe"); static const QLatin1String minimizeIconH("qtg_graf_input_h_swipe"); static const int DialpadCloseAnimDuration = 200; // ms static const int DialpadOpenAnimDuration = 200; // ms static const qreal DialpadComponentMargin = 0.75; // units static const qreal DialpadCloseHandleHeight = 2.23; // units static const qreal DialpadCloseHandleWidth = 18.8; // units -static const qreal DialpadCallButtonHeight = 8.75; // units, same as numeric buttons -static const qreal DialpadCallButtonHeightH = 7.25; // units static const QLatin1String handsetIcon("qtg_mono_call"); static const QLatin1String vmbxIcon("qtg_mono_voice_mailbox"); @@ -84,25 +82,23 @@ void Dialpad::initialize() { + setObjectName(QLatin1String("dialpad")); setFocusPolicy(Qt::StrongFocus); setFlag(QGraphicsItem::ItemIsFocusable,true); setFlag(QGraphicsItem::ItemHasNoContents, false); // create input field - mInputField = new DialpadInputField(this); + mInputField = new DialpadInputField(mMainWindow,this); // create keypad mKeypad = new DialpadKeypad(mMainWindow,*mInputField,this); // layouting params - qreal unit = HbDeviceProfile::current().unitValue(); + qreal unit = HbDeviceProfile::profile(&mMainWindow).unitValue(); qreal margin = DialpadComponentMargin * unit; mCloseHandleHeight = DialpadCloseHandleHeight * unit; mCloseHandleWidth = DialpadCloseHandleWidth * unit; - mKeypad->callButton().setPreferredHeight(DialpadCallButtonHeight*unit); - mKeypad->callButton().setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - // create popup background mBackgroundDrawer = new HbFrameDrawer(); mIconDrawer = new HbFrameDrawer(); @@ -112,7 +108,6 @@ new QGraphicsLinearLayout(Qt::Vertical); popupLayout->addItem(mInputField); popupLayout->addItem(mKeypad); - popupLayout->addItem(&mKeypad->callButton()); popupLayout->setContentsMargins(margin, mCloseHandleHeight, margin, margin); popupLayout->setSpacing(0); popupLayout->setItemSpacing(0,margin); @@ -179,8 +174,8 @@ // paint popup background if ( mOrientation == Qt::Vertical ) { - mBackgroundDrawer->setFrameGraphicsName(backgroundGraphics); - mIconDrawer->setFrameGraphicsName(minimizeIcon); + mBackgroundDrawer->setFrameGraphicsName(backgroundGraphicsV); + mIconDrawer->setFrameGraphicsName(minimizeIconV); mBackgroundDrawer->setFrameType(HbFrameDrawer::ThreePiecesVertical); mBackgroundDrawer->setBorderWidths(0.0, mCloseHandleHeight, 0.0, 0.0); } else { @@ -227,7 +222,7 @@ bool Dialpad::isCallButtonEnabled() const { - return mKeypad->callButton().isEnabled(); + return mKeypad->isCallButtonEnabled(); } void Dialpad::openDialpad() @@ -258,6 +253,7 @@ if (mOrientation!=previousOrientation) { updateLayout((Qt::Orientation)mOrientation); + mInputField->updateLayout((Qt::Orientation)mOrientation); } show(); @@ -410,6 +406,7 @@ void Dialpad::orientationChangeFinished(Qt::Orientation current) { updateLayout(current); + mInputField->updateLayout(current); show(); @@ -441,7 +438,7 @@ { Q_ASSERT(layout()); - qreal unit = HbDeviceProfile::current().unitValue(); + qreal unit = HbDeviceProfile::profile(&mMainWindow).unitValue(); qreal margin = DialpadComponentMargin * unit; QGraphicsLinearLayout* mainLayout = @@ -453,13 +450,11 @@ mCloseHandleHeight, margin, margin); - mKeypad->callButton().setPreferredHeight(DialpadCallButtonHeight*unit); } else { mainLayout->setContentsMargins(mCloseHandleHeight, margin, margin, margin); - mKeypad->callButton().setPreferredHeight(DialpadCallButtonHeightH*unit); } } diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/src/dialpadinputfield.cpp --- a/telutils/dialpad/src/dialpadinputfield.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/src/dialpadinputfield.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -21,6 +21,7 @@ #include #include #include +#include #include "dialpadinputfield.h" #include "dialpadbutton.h" @@ -29,15 +30,21 @@ static const int DialpadAutoRepeatInterval = 150; // ms static const int DialpadAutoRepeatDelay = 1000; // ms static const qreal DialpadComponentMargin = 0.75; // units -static const qreal DialpadBackspaceWidth = 9.4; // units -static const qreal DialpadInputFieldHeight = 6.3; // units +static const qreal DialpadBackspaceWidthV = 9.8; // units +static const qreal DialpadBackspaceWidthH = 8.6; // units +static const qreal DialpadInputFieldHeightV = 7.2; // units +static const qreal DialpadInputFieldHeightH = 6.6; // units static const int DialpadMaxEditStringLenght = 100; -DialpadInputField::DialpadInputField(QGraphicsItem* parent) - : HbWidget(parent) +DialpadInputField::DialpadInputField( + const HbMainWindow& mainWindow, + QGraphicsItem* parent) + : HbWidget(parent), + mMainWindow(mainWindow) { // create editor mNumberEditor = new HbLineEdit(this); + mNumberEditor->setObjectName(QLatin1String("numberEdit")); HbEditorInterface editorInterface(mNumberEditor); editorInterface.setFilter(HbPhoneNumberFilter::instance()); editorInterface.setInputConstraints(HbEditorConstraintIgnoreFocus); @@ -45,37 +52,32 @@ mNumberEditor->setMinRows(1); mNumberEditor->setMaxRows(1); mNumberEditor->setAdjustFontSizeToFitHeight(true); + mNumberEditor->setFontSpec(HbFontSpec(HbFontSpec::Primary)); // create backspace button mBackspace = new DialpadButton(this); + mBackspace->setObjectName(QLatin1String("backspaceButton")); mBackspace->setButtonType(DialpadButton::FunctionButton); // for css mBackspace->setFocusPolicy(Qt::NoFocus); mBackspace->setFlag(QGraphicsItem::ItemIsFocusable,false); mBackspace->setIcon(HbIcon(HbBackspaceIcon)); mBackspace->setEnabled(false); - QString buttonName; - buttonName.setNum(Qt::Key_Backspace); - mBackspace->setObjectName(buttonName); mBackspace->setAutoRepeat(true); mBackspace->setAutoRepeatInterval(DialpadAutoRepeatInterval); mBackspace->setAutoRepeatDelay(DialpadAutoRepeatDelay); + mBackspace->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding); connect(mNumberEditor,SIGNAL(contentsChanged()), SLOT(onEditorContentChanged())); // set input field layout - qreal unit = HbDeviceProfile::current().unitValue(); - mHeight = (int) DialpadInputFieldHeight * unit; QGraphicsLinearLayout* layout = new QGraphicsLinearLayout; layout->addItem(mNumberEditor); layout->setAlignment(mNumberEditor,Qt::AlignVCenter); layout->addItem(mBackspace); layout->setContentsMargins(0,0,0,0); - layout->setSpacing(DialpadComponentMargin* unit); - // layout parameters - mBackspace->setPreferredWidth(DialpadBackspaceWidth * unit); - mBackspace->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding); setLayout(layout); + updateLayout(mMainWindow.orientation()); } DialpadInputField::~DialpadInputField() @@ -92,6 +94,26 @@ return *mBackspace; } +void DialpadInputField::updateLayout(Qt::Orientation orientation) +{ + Q_ASSERT(layout()); + + qreal unit = HbDeviceProfile::profile(&mMainWindow).unitValue(); + + QGraphicsLinearLayout* mainLayout = + static_cast(layout()); + + mainLayout->setSpacing(DialpadComponentMargin* unit); + + if (orientation==Qt::Vertical) { + mHeight = DialpadInputFieldHeightV * unit; + mBackspace->setPreferredWidth(DialpadBackspaceWidthV * unit); + } else { + mHeight = DialpadInputFieldHeightH * unit; + mBackspace->setPreferredWidth(DialpadBackspaceWidthH * unit); + } +} + void DialpadInputField::onEditorContentChanged() { mBackspace->setEnabled(mNumberEditor->text().length()); diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/src/dialpadkeypad.cpp --- a/telutils/dialpad/src/dialpadkeypad.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/src/dialpadkeypad.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -11,61 +11,34 @@ * * Contributors: * -* Description: Dialpad keypad +* Description: Number grid and dial key. * */ -#include #include -#include -#include -#include -#include -#include -#include #include -#include #include -#include #include +#include #include "dialpadnumericbutton.h" #include "dialpadkeypad.h" #include "dialpadbutton.h" #include "dialpadinputfield.h" +#include "dialpadnumericbuttongrid.h" -static const int DialpadRowCount = 4; -static const int DialpadColumnCount = 3; +static const int DialpadKeypadRowCount = 5; static const QLatin1String handsetIcon("qtg_mono_call"); -static const QLatin1String vmbxIcon("qtg_mono_voice_mailbox"); -// layout values in units -static const qreal DialpadPrimaryTextSize = 5.5; -static const qreal DialpadSecondaryTextSize = 4.0; -static const qreal DialpadIconSize = 4.0; -static const qreal DialpadPrimaryTextLeftMargin = 1.5; -static const qreal DialpadPrimarySecondaryMargin = 0.75; - -static const int DialpadKeyCodeTable[DialpadRowCount*DialpadColumnCount] = -{ - Qt::Key_1, Qt::Key_2, Qt::Key_3, - Qt::Key_4, Qt::Key_5, Qt::Key_6, - Qt::Key_7, Qt::Key_8, Qt::Key_9, - Qt::Key_Asterisk, Qt::Key_0, Qt::Key_NumberSign - // Qt::Key_Yes and Qt::Key_BackSpace are handled separately -}; DialpadKeypad::DialpadKeypad( const HbMainWindow& mainWindow, DialpadInputField& inputField, QGraphicsItem* parent) : - HbInputButtonGroup(parent), + HbWidget(parent), mMainWindow(mainWindow), - mInputField(inputField), - mMaxPrimaryLineWidth(0) + mInputField(inputField) { - setObjectName("keypad"); - // create clicked signal mapper mKeyClickedSignalMapper = new QSignalMapper(this); connect(mKeyClickedSignalMapper,SIGNAL(mapped(int)), @@ -77,42 +50,11 @@ mKeyClickedSignalMapper->setMapping(&mInputField.backspaceButton(), Qt::Key_Backspace); - // create keypad - setGridSize(QSize(DialpadColumnCount, DialpadRowCount)); - setButtonBorderSize(0); - - QList buttons; - - for (int i = 0; i < DialpadRowCount * DialpadColumnCount; ++i) { - DialpadNumericButton *item = new DialpadNumericButton( - DialpadKeyCodeTable[i], - QPoint(i % DialpadColumnCount, i / DialpadColumnCount)); - buttons.append(item); - - item->setType(HbInputButton::ButtonTypeNormal); - } - - setButtons(buttons); - - // connect keypad signals - QObject::connect(this, SIGNAL(buttonPressed(const QKeyEvent&)), - this, SLOT(sendKeyPressEvent(const QKeyEvent&))); - QObject::connect(this, SIGNAL(buttonReleased(const QKeyEvent&)), - this, SLOT(sendKeyReleaseEvent(const QKeyEvent&))); - QObject::connect(this, SIGNAL(buttonLongPressed(const QKeyEvent&)), - this, SLOT(sendLongPressEvent(const QKeyEvent&))); - QObject::connect(this, SIGNAL(pressedButtonChanged(const QKeyEvent&, - const QKeyEvent&)), - this, SLOT(handleKeyChangeEvent(const QKeyEvent&, - const QKeyEvent&))); - - // create call button (parent layouts this) - mCallButton = new DialpadButton(parent); + // create call button + mCallButton = new DialpadButton(this); + mCallButton->setObjectName("callButton"); mCallButton->setButtonType(DialpadButton::CallButton); mCallButton->setIcon(HbIcon(handsetIcon)); - QString buttonName; - buttonName.setNum(Qt::Key_Yes); - mCallButton->setObjectName(buttonName); connect(mCallButton,SIGNAL(clicked()), mKeyClickedSignalMapper,SLOT(map())); connect(mCallButton,SIGNAL(longPress(QPointF)), @@ -120,93 +62,42 @@ mKeyClickedSignalMapper->setMapping(mCallButton, Qt::Key_Yes); - // set button texts - setButtonTexts(); - // set button icons - button(0)->setIcon(HbIcon(vmbxIcon)); - - // update button texts when input language is changed - connect(HbInputSettingProxy::instance(), - SIGNAL(globalInputLanguageChanged(HbInputLanguage)), - this,SLOT(setButtonTexts())); - - updateColorArray(); - - mUnit = HbDeviceProfile::profile(this).unitValue(); + // create numeric button grid + mNumericButtonGrid = new DialpadNumericButtonGrid(mMainWindow,this); + QObject::connect(mNumericButtonGrid, + SIGNAL(buttonPressed(const QKeyEvent&)), + this, SLOT(sendKeyPressEvent(const QKeyEvent&))); + QObject::connect(mNumericButtonGrid, + SIGNAL(buttonReleased(const QKeyEvent&)), + this, SLOT(sendKeyReleaseEvent(const QKeyEvent&))); + QObject::connect(mNumericButtonGrid, + SIGNAL(buttonLongPressed(const QKeyEvent&)), + this, SLOT(sendLongPressEvent(const QKeyEvent&))); + QObject::connect(mNumericButtonGrid, + SIGNAL(pressedButtonChanged(const QKeyEvent&, + const QKeyEvent&)), + this, SLOT(handleKeyChangeEvent(const QKeyEvent&, + const QKeyEvent&))); } DialpadKeypad::~DialpadKeypad() { } -void DialpadKeypad::setButtonTexts() +bool DialpadKeypad::isCallButtonEnabled() const { - HbInputLanguage inputLanguage = - HbInputSettingProxy::instance()->globalInputLanguage(); - const HbKeymap *keymap = - HbKeymapFactory::instance()->keymap(inputLanguage.language()); - - mGeneratedChar.clear(); - - if (keymap) { - int buttonCount = (DialpadRowCount*DialpadColumnCount); - for (int i = 0; i < buttonCount; i++) { - int keyCode = DialpadKeyCodeTable[i]; - - if (keyCode == Qt::Key_Asterisk) { - // asterisk is not localized - QChar asterisk('*'); - button(i)->setText(asterisk); - button(i)->setSecondaryText(QLatin1String("+")); - mGeneratedChar.insert(Qt::Key_Asterisk, asterisk); - continue; - } - - if (keyCode == Qt::Key_NumberSign) { - // number sign is not localized - QChar numberSign('#'); - button(i)->setText(numberSign); - mGeneratedChar.insert(Qt::Key_NumberSign, numberSign); - continue; - } + return mCallButton->isEnabled(); +} - int index = i; - if (keyCode==Qt::Key_0) { - index = i-1; - } - - const HbMappedKey *key = - keymap->keyForIndex(HbKeyboardVirtual12Key, index); - - if (key) { - QChar numberChar = - HbInputUtils::findFirstNumberCharacterBoundToKey( - key, - inputLanguage.language(), - HbInputUtils::inputDigitType(inputLanguage.language())); - - // button text - button(i)->setText(numberChar); - mGeneratedChar.insert(keyCode,numberChar); +void DialpadKeypad::setCallButtonEnabled(bool enabled) +{ + mCallButton->setEnabled(enabled); +} - // additional text (letters) - int numberOfCharacters; - if (keyCode==Qt::Key_7 || keyCode == Qt::Key_9) { - numberOfCharacters = 4; - } else if (keyCode==Qt::Key_0||keyCode==Qt::Key_1) { - numberOfCharacters = 0; - } else { - numberOfCharacters = 3; - } - - QString characters = key->characters(HbModifierNone); - - if (numberOfCharacters!=0 && keyCode!=Qt::Key_1) { - button(i)->setSecondaryText(characters.left(numberOfCharacters)); - } - } - } - } +void DialpadKeypad::resetButtons() +{ + mNumericButtonGrid->resetButtons(); + mCallButton->setDown(false); } void DialpadKeypad::handleKeyClicked(int key) @@ -226,21 +117,19 @@ void DialpadKeypad::sendKeyEventToEditor(QEvent::Type type, int key) { // send key event to editor - QKeyEvent keyEvent(type, key, Qt::NoModifier, mGeneratedChar.value(key)); + QKeyEvent keyEvent(type, key, Qt::NoModifier, + mNumericButtonGrid->inputCharacter(key)); HbApplication::sendEvent(&mInputField.editor(), &keyEvent); } void DialpadKeypad::sendKeyPressEvent(const QKeyEvent& event) { - updateButtonLabels(); mPressedNumericKey = event.key(); postKeyEvent(QEvent::KeyPress, event.key()); } void DialpadKeypad::sendKeyReleaseEvent(const QKeyEvent& event) { - updateButtonLabels(); - if (mPressedNumericKey) { // short press, update editor here sendKeyEventToEditor(QEvent::KeyPress, event.key()); @@ -262,316 +151,21 @@ Q_UNUSED(pressEvent) postKeyEvent(QEvent::KeyRelease, releaseEvent.key()); - cancelButtonPress(); -} - -void DialpadKeypad::setCallButtonEnabled(bool enabled) -{ - mCallButton->setEnabled(enabled); -} - -void DialpadKeypad::resetButtons() -{ - cancelButtonPress(); - mCallButton->setDown(false); -} - -DialpadButton& DialpadKeypad::callButton() const -{ - return *mCallButton; -} - -DialpadNumericButton* DialpadKeypad::button(int i) const -{ - return static_cast(HbInputButtonGroup::button(i)); -} - -void DialpadKeypad::updateButtonLabels() -{ - // update numeric buttons according to button state (pressed/released) - updateIconColor(); - updateTextLayouts(rect().size()); -} - -void DialpadKeypad::paint( - QPainter* painter, - const QStyleOptionGraphicsItem* option, - QWidget* widget) -{ - Q_UNUSED(option); - Q_UNUSED(widget); - - // Paints empty buttons - HbInputButtonGroup::paint(painter,option,widget); - - qreal cellWidth = boundingRect().width() / gridSize().width(); - qreal cellHeight = boundingRect().height() / gridSize().height(); - - // Draw icons - for (int i = 0; i < DialpadRowCount * DialpadColumnCount; i++) { - DialpadNumericButton *item = button(i); - - if (!item->icon().isNull()) { - // icon is centered to button - qreal x = (item->position().x() * cellWidth) + (cellWidth / 2) - - ((DialpadIconSize * mUnit) / 2); - qreal y = (item->position().y() * cellHeight) + (cellHeight / 2) - - ((DialpadIconSize * mUnit) / 2); - - qreal width = DialpadIconSize * mUnit; - qreal height = DialpadIconSize * mUnit; - - Qt::Alignment alignment = - static_cast(Qt::AlignVCenter | Qt::AlignHCenter); - item->icon().paint(painter, - QRectF(x,y,width,height), - Qt::KeepAspectRatio, - alignment); - } - } - - // Draw texts - QPen origPen = painter->pen(); - for (int i = 0; i < mTextLayouts.count(); ++i) { - if (i==SecondaryText) { - // dimmed in normal state - painter->setPen(mColors.at(Pressed+1)); - } else { - // otherwise normal or pressed color - painter->setPen(mColors.at(i/TextTypeCount)); - } - mTextLayouts.at(i)->draw(painter, QPointF(0, 0)); - } - painter->setPen(origPen); -} - -void DialpadKeypad::updateColorArray() -{ - mColors.clear(); - - QColor normalColor = HbColorScheme::color("qtc_input_button_normal"); - mColors.insert(Normal, normalColor); - - QColor pressedColor = HbColorScheme::color("qtc_input_button_pressed"); - mColors.insert(Pressed, pressedColor); - - // this is used for alphabets shown dimmed, use alpha until exact color - // is specified - QColor disabledColor = HbColorScheme::color("qtc_input_button_normal"); - disabledColor.setAlpha(128); - mColors.insert(Pressed+1, disabledColor); -} - -void DialpadKeypad::updateIconColor() -{ - for (int i = 0; i < (DialpadRowCount * DialpadColumnCount); i++) { - DialpadNumericButton *item = button(i); - - if (item->state()==HbInputButton::ButtonStatePressed) { - item->icon().setColor(mColors.at(Pressed)); - } else { - item->icon().setColor(mColors.at(Normal)); - } - } -} - -void DialpadKeypad::cancelButtonPress() -{ - HbInputButtonGroup::cancelButtonPress(); - updateButtonLabels(); + mNumericButtonGrid->resetButtons(); } void DialpadKeypad::setGeometry(const QRectF &rect) { - HbInputButtonGroup::setGeometry(rect); - updateTextLayouts(rect.size()); -} - -void DialpadKeypad::changeEvent(QEvent *event) -{ - HbInputButtonGroup::changeEvent(event); - - if (event->type() == HbEvent::ThemeChanged) { - updateColorArray(); - updateIconColor(); - } -} - -void DialpadKeypad::updateTextLayouts(const QSizeF &size) -{ - if (!size.width() && !size.height()) { - return; - } - - // get normal and pressed state texts - QList textContent; - resolveTextContent(textContent); - - // layout the texts - createTextLayouts(size, textContent); -} - -void DialpadKeypad::resolveTextContent(QList &content) -{ - QString normalState; - QString normalStateSecondary; - QString pressedState; - QString pressedStateSecondary; - - for (int i = 0; i < (DialpadRowCount*DialpadColumnCount); i++) { - DialpadNumericButton *item = button(i); - if (item->state()==HbInputButton::ButtonStatePressed) { - if (item->text().length()) { - pressedState.append(item->text()); - pressedState.append(QChar(QChar::LineSeparator)); - } + HbWidget::setGeometry(rect); - if (item->secondaryText().length()) { - pressedStateSecondary.append(item->secondaryText()); - pressedStateSecondary.append(QChar(QChar::LineSeparator)); - } - } else { // ButtonStateNormal - if (item->text().length()) { - normalState.append(item->text()); - normalState.append(QChar(QChar::LineSeparator)); - } - - if (item->secondaryText().length()) { - normalStateSecondary.append(item->secondaryText()); - normalStateSecondary.append(QChar(QChar::LineSeparator)); - } - } - } - - content.insert(PrimaryText, normalState); - content.insert(SecondaryText, normalStateSecondary); - content.insert(TextTypeCount + Pressed, pressedState); - content.insert(StateCount + SecondaryText, pressedStateSecondary); -} - -void DialpadKeypad::createTextLayouts( - const QSizeF &size, const QList &content) -{ - // clear old layouts - qDeleteAll(mTextLayouts); - mTextLayouts.clear(); - - if (content.count()==2) { - // line width is measured only when all buttons are in normal state - mMaxPrimaryLineWidth = 0; - } - - QFont primaryfFont = HbFontSpec(HbFontSpec::Primary).font(); - primaryfFont.setPixelSize(DialpadPrimaryTextSize * mUnit); - - QFont secondaryFont = HbFontSpec(HbFontSpec::Secondary).font(); - secondaryFont.setPixelSize(DialpadSecondaryTextSize * mUnit); - - for (int i=0; i < (StateCount*TextTypeCount); i++ ) { - QString text = content.at(i); - - if (!text.isNull()) { - QTextLayout* textLayout; - int type; + // make button heights uniform + qreal buttonHeight = rect.height()/DialpadKeypadRowCount; - if (i%TextTypeCount) { - textLayout = new QTextLayout(text,secondaryFont); - type = SecondaryText; - } else { - textLayout = new QTextLayout(text,primaryfFont); - type = PrimaryText; - } - - mTextLayouts.append(textLayout); - - textLayout->beginLayout(); - - int state = (i>=TextTypeCount) ? Pressed : Normal; - - layoutTextLines(size,*textLayout,state,type); - - textLayout->endLayout(); - - textLayout->setCacheEnabled(true); - } - } -} - -void DialpadKeypad::layoutTextLines( - const QSizeF &size, - QTextLayout &textLayout, - int state, - int type) -{ - QFontMetricsF fontMetrics(textLayout.font()); - qreal textHeight = fontMetrics.height(); - - qreal cellWidth = size.width() / gridSize().width(); - qreal cellHeight = size.height() / gridSize().height(); - qreal maxLineWidth = 0; - - for (int j = 0; j < (DialpadRowCount*DialpadColumnCount); j++) { - DialpadNumericButton *item = button(j); - - if ((type==PrimaryText && item->text().isNull()) || - (type==SecondaryText && item->secondaryText().isNull())) { - continue; // no text for this button -> next button - } - - if ( ( state==Normal && - item->state()==HbInputButton::ButtonStateReleased ) || - ( state==Pressed && - item->state()==HbInputButton::ButtonStatePressed ) ) { - - QTextLine line = textLayout.createLine(); + mNumericButtonGrid->setPos(QPointF(0,0)); + QSizeF gridSize(rect.size()); + gridSize.setHeight(gridSize.height()-buttonHeight); + mNumericButtonGrid->resize(gridSize); - qreal textPositionX = 0; - qreal textPositionY = 0; - - if (line.isValid()) { - line.setNumColumns(item->text().length()); - // layout text line - if (type==SecondaryText) { - if (j==9) { - // + is centered to button - qreal lineWidth = fontMetrics.width(item->text()); - textPositionX = (item->position().x() * cellWidth) + - (cellWidth / 2) - - (lineWidth / 2); - textPositionY = (item->position().y() + - (0.5 * item->size().height())) * - cellHeight - (0.5 * textHeight); - - } else { - textPositionX = (item->position().x() * cellWidth) + - (DialpadPrimaryTextLeftMargin * mUnit) + - mMaxPrimaryLineWidth + - (DialpadPrimarySecondaryMargin * mUnit) - + buttonBorderSize(); - textPositionY = (item->position().y() + - (0.5 * item->size().height())) * - cellHeight - (0.5 * textHeight); - } - } else { - textPositionX = (item->position().x() * cellWidth) + - (DialpadPrimaryTextLeftMargin * mUnit) - + buttonBorderSize(); - textPositionY = (item->position().y() + - (0.5 * item->size().height())) * - cellHeight - (0.5 * textHeight); - - // store line width, for drawing secondary text - qreal lineWidth = fontMetrics.width(item->text()); - if (mMaxPrimaryLineWidth == 0 && (j>0 && j<10) && - lineWidth > maxLineWidth) { - maxLineWidth = lineWidth; - } - } - } - - line.setPosition(QPointF(textPositionX, textPositionY)); - } - } - - mMaxPrimaryLineWidth = maxLineWidth; + mCallButton->setPos(QPointF(0,gridSize.height())); + mCallButton->resize(rect.width(),buttonHeight); } diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/src/dialpadnumericbutton.cpp --- a/telutils/dialpad/src/dialpadnumericbutton.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/src/dialpadnumericbutton.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -57,3 +57,13 @@ { return mSecondaryText; } + +void DialpadNumericButton::setSecondary2ndRowText(const QString& text) +{ + mSecondaryTextRow2 = text; +} + +QString DialpadNumericButton::secondary2ndRowText() const +{ + return mSecondaryTextRow2; +} diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/src/dialpadnumericbuttongrid.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/telutils/dialpad/src/dialpadnumericbuttongrid.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -0,0 +1,594 @@ +/*! +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implements grid of numeric buttons +* +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dialpadnumericbutton.h" +#include "dialpadnumericbuttongrid.h" + +static const int DialpadRowCount = 4; +static const int DialpadColumnCount = 3; +// layout values in units +static const qreal DialpadPrimaryTextSizeV = 5.25; +static const qreal DialpadPrimaryTextSizeH = 4.5; +static const qreal DialpadSecondaryTextSizeV = 3.8; +static const qreal DialpadSecondaryTextSizeH = 3.3; +static const qreal DialpadSecondaryTextSize2RowsV = 3.0; +static const qreal DialpadSecondaryTextSize2RowsH = 2.6; +static const qreal DialpadIconSizeV = 5.0; +static const qreal DialpadIconSizeH = 4.25; +static const qreal DialpadPrimaryTextLeftMargin = 1.5; +static const qreal DialpadPrimarySecondaryMargin = 1.0; + +static const QLatin1String vmbxIcon("qtg_mono_voice_mailbox"); + +static const int DialpadKeyCodeTable[DialpadRowCount*DialpadColumnCount] = +{ + Qt::Key_1, Qt::Key_2, Qt::Key_3, + Qt::Key_4, Qt::Key_5, Qt::Key_6, + Qt::Key_7, Qt::Key_8, Qt::Key_9, + Qt::Key_Asterisk, Qt::Key_0, Qt::Key_NumberSign +}; + +DialpadNumericButtonGrid::DialpadNumericButtonGrid( + const HbMainWindow& mainWindow, + QGraphicsItem* parent) : + HbInputButtonGroup(parent), + mMainWindow(mainWindow), + mUnit(.0), + mMaxPrimaryLineWidth(.0), + mPrimaryTextBaseline(.0) +{ + setObjectName("numericButtons"); + + // create buttons + setGridSize(QSize(DialpadColumnCount, DialpadRowCount)); + setButtonBorderSize(0); + + QList buttons; + + for (int i = 0; i < DialpadRowCount * DialpadColumnCount; ++i) { + DialpadNumericButton *item = new DialpadNumericButton( + DialpadKeyCodeTable[i], + QPoint(i % DialpadColumnCount, i / DialpadColumnCount)); + buttons.append(item); + + item->setType(HbInputButton::ButtonTypeNormal); + } + + setButtons(buttons); + + // connect signals from buttons + QObject::connect(this, SIGNAL(buttonPressed(const QKeyEvent&)), + this, SLOT(updateButtonLabels())); + QObject::connect(this, SIGNAL(buttonReleased(const QKeyEvent&)), + this, SLOT(updateButtonLabels())); + QObject::connect(this, SIGNAL(pressedButtonChanged(const QKeyEvent&, + const QKeyEvent&)), + this, SLOT(updateButtonLabels())); + + // update colors + updateColorArray(); + // set button texts + setButtonTexts(); + // set button icons + button(0)->setIcon(HbIcon(vmbxIcon)); + + // update button texts when input language is changed + connect(HbInputSettingProxy::instance(), + SIGNAL(globalInputLanguageChanged(HbInputLanguage)), + this, + SLOT(setButtonTexts())); +} + +DialpadNumericButtonGrid::~DialpadNumericButtonGrid() +{ +} + +void DialpadNumericButtonGrid::resetButtons() +{ + cancelButtonPress(); +} + +QChar DialpadNumericButtonGrid::inputCharacter(int keyCode) const +{ + return mGeneratedChar.value(keyCode); +} + +void DialpadNumericButtonGrid::setButtonTexts() +{ + HbInputLanguage inputLanguage = + HbInputSettingProxy::instance()->globalInputLanguage(); + const HbKeymap *keymap = + HbKeymapFactory::instance()->keymap(inputLanguage.language()); + + mGeneratedChar.clear(); + + if (keymap) { + int buttonCount = (DialpadRowCount*DialpadColumnCount); + for (int i = 0; i < buttonCount; i++) { + int keyCode = DialpadKeyCodeTable[i]; + + if (keyCode == Qt::Key_Asterisk) { + // asterisk is not localized + QChar asterisk('*'); + button(i)->setText(asterisk); + button(i)->setSecondaryText(QLatin1String("+")); + mGeneratedChar.insert(Qt::Key_Asterisk, asterisk); + continue; + } + + if (keyCode == Qt::Key_NumberSign) { + // number sign is not localized + QChar numberSign('#'); + button(i)->setText(numberSign); + mGeneratedChar.insert(Qt::Key_NumberSign, numberSign); + continue; + } + + int index = i; + if (keyCode==Qt::Key_0) { + index = i-1; + } + + const HbMappedKey *keyLabels = + keymap->keyForIndex(HbKeyboardVirtual12KeyLabels, index); + + // + // set digits + // todo: input digit depend on digit type setting + // QChar numberChar(QLocale::system().zeroDigit().unicode()+ + // (keyCode-0x30)); + // + QChar numberChar; + if (keyLabels && keyLabels->chars.count()>=1 && + keyLabels->chars.at(0).length()) { + numberChar = keyLabels->chars.at(0).at(0); + } else { + // fallback to latin + numberChar = QChar(keyCode); + } + + button(i)->setText(numberChar); + mGeneratedChar.insert(keyCode,numberChar); + + // + // set alphabets + // + if (keyLabels && keyLabels->chars.count()>=2) { + button(i)->setSecondaryText(keyLabels->chars.at(1)); + if (keyLabels->chars.count()>=4) { + button(i)->setSecondary2ndRowText(keyLabels->chars.at(3)); + } else { + button(i)->setSecondary2ndRowText(QString()); + } + } + } + + updateButtonLabels(); + } +} + +DialpadNumericButton* DialpadNumericButtonGrid::button(int i) const +{ + return static_cast(HbInputButtonGroup::button(i)); +} + +void DialpadNumericButtonGrid::updateButtonLabels() +{ + // update numeric buttons according to button state (pressed/released) + updateIconColor(); + updateTextLayouts(rect().size()); + update(); +} + +void DialpadNumericButtonGrid::paint( + QPainter* painter, + const QStyleOptionGraphicsItem* option, + QWidget* widget) +{ + Q_UNUSED(option); + Q_UNUSED(widget); + + // Paints empty buttons + HbInputButtonGroup::paint(painter,option,widget); + + qreal cellWidth = boundingRect().width() / gridSize().width(); + qreal cellHeight = boundingRect().height() / gridSize().height(); + + for (int i = 0; i < DialpadRowCount * DialpadColumnCount; i++) { + DialpadNumericButton *item = button(i); + + if (!item->icon().isNull()) { + // same as secondary text + qreal x = (item->position().x() * cellWidth) + + (DialpadPrimaryTextLeftMargin * mUnit) + + (DialpadPrimarySecondaryMargin * mUnit) + + mMaxPrimaryLineWidth; + // top align with some margin + qreal y = item->position().y() * cellHeight + (cellHeight / 20.0); + + qreal width = item->icon().size().width(); + qreal height = item->icon().size().height(); + + Qt::Alignment alignment = + static_cast(Qt::AlignTop | Qt::AlignLeft); + item->icon().paint(painter, + QRectF(x,y,width,height), + Qt::KeepAspectRatio, + alignment); + } + } + + // Draw texts + QPen origPen = painter->pen(); + for (int i = 0; i < mTextLayouts.count(); ++i) { + if (i==SecondaryText) { + // dimmed in normal state + painter->setPen(mColors.at(Pressed+1)); + } else { + // otherwise normal or pressed color + painter->setPen(mColors.at(i/TextTypeCount)); + } + mTextLayouts.at(i)->draw(painter, QPointF(0, 0)); + } + painter->setPen(origPen); +} + +void DialpadNumericButtonGrid::updateColorArray() +{ + mColors.clear(); + + QColor normalColor = HbColorScheme::color("qtc_input_button_normal"); + mColors.insert(Normal, normalColor); + + QColor pressedColor = HbColorScheme::color("qtc_input_button_pressed"); + mColors.insert(Pressed, pressedColor); + + // this is used for alphabets shown dimmed, use alpha until exact color + // is specified + QColor disabledColor = HbColorScheme::color("qtc_input_button_normal"); + disabledColor.setAlpha(128); + mColors.insert(Pressed+1, disabledColor); +} + +void DialpadNumericButtonGrid::updateIconColor() +{ + for (int i = 0; i < (DialpadRowCount * DialpadColumnCount); i++) { + DialpadNumericButton *item = button(i); + + if (item->state()==HbInputButton::ButtonStatePressed) { + item->icon().setColor(mColors.at(Pressed)); + } else { + item->icon().setColor(mColors.at(Normal)); + } + } +} + +void DialpadNumericButtonGrid::cancelButtonPress() +{ + HbInputButtonGroup::cancelButtonPress(); + updateButtonLabels(); +} + + +void DialpadNumericButtonGrid::setGeometry(const QRectF &rect) +{ + HbInputButtonGroup::setGeometry(rect); + + mUnit = HbDeviceProfile::profile(&mMainWindow).unitValue(); + + updateTextLayouts(rect.size()); + + updateIconSizes(); +} + +void DialpadNumericButtonGrid::updateIconSizes() +{ + qreal width = mMainWindow.orientation() == Qt::Vertical ? + DialpadIconSizeV : DialpadIconSizeH; + width *= mUnit; + + for (int i = 0; i < DialpadRowCount * DialpadColumnCount; i++) { + DialpadNumericButton *item = button(i); + + if (!item->icon().isNull()) { + item->icon().setWidth(width); + } + } +} + +void DialpadNumericButtonGrid::changeEvent(QEvent *event) +{ + HbInputButtonGroup::changeEvent(event); + + if (event->type() == HbEvent::ThemeChanged) { + updateColorArray(); + updateIconColor(); + } +} + +void DialpadNumericButtonGrid::updateTextLayouts(const QSizeF &size) +{ + if (!size.width() && !size.height()) { + return; + } + + // get normal and pressed state texts + QList textContent; + bool useTwoRows; + + resolveTextContent(textContent, useTwoRows); + + // layout the texts + createTextLayouts(size, textContent, useTwoRows); +} + +void DialpadNumericButtonGrid::resolveTextContent( + QList &content, bool& useTwoRows) +{ + QString normalState; + QString normalStateSecondary; + QString pressedState; + QString pressedStateSecondary; + + useTwoRows = false; + + for (int i = 0; i < (DialpadRowCount*DialpadColumnCount); i++) { + DialpadNumericButton *item = button(i); + if (item->state()==HbInputButton::ButtonStatePressed) { + if (item->text().length()) { + pressedState.append(item->text()); + pressedState.append(QChar(QChar::LineSeparator)); + } + + if (item->secondaryText().length()) { + pressedStateSecondary.append(item->secondaryText()); + pressedStateSecondary.append(QChar(QChar::LineSeparator)); + if (item->secondary2ndRowText().length()) { + pressedStateSecondary.append(item->secondary2ndRowText()); + pressedStateSecondary.append(QChar(QChar::LineSeparator)); + useTwoRows = true; + } + } + } else { // ButtonStateNormal + if (item->text().length()) { + normalState.append(item->text()); + normalState.append(QChar(QChar::LineSeparator)); + } + + if (item->secondaryText().length()) { + normalStateSecondary.append(item->secondaryText()); + normalStateSecondary.append(QChar(QChar::LineSeparator)); + if (item->secondary2ndRowText().length()) { + normalStateSecondary.append(item->secondary2ndRowText()); + normalStateSecondary.append(QChar(QChar::LineSeparator)); + useTwoRows = true; + } + } + } + } + + content.insert(PrimaryText, normalState); + content.insert(SecondaryText, normalStateSecondary); + content.insert(TextTypeCount + Pressed, pressedState); + content.insert(StateCount + SecondaryText, pressedStateSecondary); +} + +void DialpadNumericButtonGrid::createTextLayouts( + const QSizeF &size, const QList &content, bool useTwoRows) +{ + // clear old layouts + qDeleteAll(mTextLayouts); + mTextLayouts.clear(); + + if(!isButtonPressed()) { + mMaxPrimaryLineWidth = 0; + } + + QFont primaryFont = HbFontSpec(HbFontSpec::Primary).font(); + qreal primarySize = mMainWindow.orientation() == Qt::Vertical ? + DialpadPrimaryTextSizeV : + DialpadPrimaryTextSizeH; + primaryFont.setPixelSize(primarySize * mUnit); + + QFont secondaryFont = HbFontSpec(HbFontSpec::Secondary).font(); + if (useTwoRows) { + qreal secondarySize = mMainWindow.orientation() == Qt::Vertical ? + DialpadSecondaryTextSize2RowsV : + DialpadSecondaryTextSize2RowsH; + secondaryFont.setPixelSize(secondarySize * mUnit); + } else { + qreal secondarySize = mMainWindow.orientation() == Qt::Vertical ? + DialpadSecondaryTextSizeV : + DialpadSecondaryTextSizeH; + secondaryFont.setPixelSize(secondarySize * mUnit); + } + + for (int i=0; i < (StateCount*TextTypeCount); i++ ) { + QString text = content.at(i); + + if (!text.isNull()) { + QTextLayout* textLayout; + int type; + + if (i%TextTypeCount) { + textLayout = new QTextLayout(text,secondaryFont); + type = SecondaryText; + } else { + textLayout = new QTextLayout(text,primaryFont); + type = PrimaryText; + } + + mTextLayouts.append(textLayout); + + textLayout->beginLayout(); + + int state = (i>=TextTypeCount) ? Pressed : Normal; + + layoutTextLines(size,*textLayout,state,type,useTwoRows); + + textLayout->endLayout(); + + textLayout->setCacheEnabled(true); + } + } +} + +void DialpadNumericButtonGrid::layoutTextLines( + const QSizeF &size, + QTextLayout &textLayout, + int state, + int type, + bool useTwoRows) +{ + QFontMetricsF fontMetrics(textLayout.font()); + qreal textHeight = fontMetrics.height(); + qreal textDescent = fontMetrics.descent(); + + qreal cellWidth = size.width() / gridSize().width(); + qreal cellHeight = size.height() / gridSize().height(); + qreal maxLineWidth = 0; + + for (int j = 0; j < (DialpadRowCount*DialpadColumnCount); j++) { + DialpadNumericButton *item = button(j); + + if ((type==PrimaryText && item->text().isNull()) || + (type==SecondaryText && item->secondaryText().isNull())) { + continue; // no text for this button -> next button + } + + if ( ( state==Normal && + item->state()==HbInputButton::ButtonStateReleased ) || + ( state==Pressed && + item->state()==HbInputButton::ButtonStatePressed ) ) { + // layout text line + if (type==SecondaryText) { + layoutSecondaryText(textLayout,*item,cellWidth, + cellHeight,textHeight,textDescent, + useTwoRows); + } else { + layoutPrimaryText(textLayout,*item,cellWidth, + cellHeight,textHeight); + + // store line width, for drawing secondary text + qreal lineWidth = fontMetrics.width(item->text()); + if (mMaxPrimaryLineWidth == 0 && (j>0 && j<10) && + lineWidth > maxLineWidth) { + maxLineWidth = lineWidth; + mPrimaryTextBaseline = textHeight/2 - textDescent; + } + } + } + } + + if (maxLineWidth!=0) { + mMaxPrimaryLineWidth = maxLineWidth; + } +} + +void DialpadNumericButtonGrid::layoutPrimaryText( + QTextLayout& layout, + DialpadNumericButton& button, + qreal cellWidth, + qreal cellHeight, + qreal textHeight) const +{ + QTextLine line = layout.createLine(); + line.setNumColumns(button.text().length()); + qreal textPositionX = (button.position().x() * cellWidth) + + (DialpadPrimaryTextLeftMargin * mUnit) + + buttonBorderSize(); + qreal textPositionY = (button.position().y() + + (0.5 * button.size().height())) * + cellHeight - (0.5 * textHeight); + line.setPosition(QPointF(textPositionX, textPositionY)); +} + +void DialpadNumericButtonGrid::layoutSecondaryText( + QTextLayout& layout, + DialpadNumericButton& button, + qreal cellWidth, + qreal cellHeight, + qreal textHeight, + qreal textDescent, + bool useTwoRows) const +{ + qreal textPositionX; + qreal textPositionY; + + QTextLine line = layout.createLine(); + + if (useTwoRows) { + line.setNumColumns(button.secondaryText().length()); + + textPositionX = (button.position().x() * cellWidth) + + (DialpadPrimaryTextLeftMargin * mUnit) + + mMaxPrimaryLineWidth + + (DialpadPrimarySecondaryMargin * mUnit) + + buttonBorderSize(); + + if (button.secondary2ndRowText().length()) { + textPositionY = (button.position().y() + + (0.5 * button.size().height())) * + cellHeight; + + QTextLine line2 = layout.createLine(); + line2.setNumColumns(button.secondary2ndRowText().length()); + line2.setPosition(QPointF(textPositionX,textPositionY-textHeight)); + } else { + textPositionY = (button.position().y() + + (0.5 * button.size().height())) * + cellHeight - (0.5 * textHeight); + } + } else { + line.setNumColumns(button.secondaryText().length()); + textPositionX = (button.position().x() * cellWidth) + + (DialpadPrimaryTextLeftMargin * mUnit) + + mMaxPrimaryLineWidth + + (DialpadPrimarySecondaryMargin * mUnit) + + buttonBorderSize(); + textPositionY = (button.position().y() + + (0.5 * button.size().height())) * + cellHeight + mPrimaryTextBaseline - + (textHeight - textDescent); + } + line.setPosition(QPointF(textPositionX, textPositionY)); +} + +bool DialpadNumericButtonGrid::isButtonPressed() const +{ + bool pressed = false; + + for (int i = 0; i < (DialpadRowCount*DialpadColumnCount); i++) { + if (button(i)->state()==HbInputButton::ButtonStatePressed) { + pressed = true; + break; + } + } + + return pressed; +} diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp --- a/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -26,13 +26,15 @@ #include #include #include +#include +#include #include "dialpadtestview.h" #include "dialpad.h" #include "dialpadkeyhandler.h" DialpadTestView::DialpadTestView( HbMainWindow& mainWindow ) : - mMainWindow(mainWindow), mTapOutsideDismiss(0) + mMainWindow(mainWindow), mTapOutsideDismiss(0), mArabicMode(0), mArabicDigit(0) { setTitle("DialpadTest"); @@ -55,6 +57,10 @@ menu()->addAction("Tap outside dismiss",this,SLOT(setTapOutsideDismiss())); + menu()->addAction("Arabic mode",this,SLOT(setArabicMode())); + + menu()->addAction("Arabic digit",this,SLOT(setArabicDigit())); + // create view widget (recent calls list mockup) createListWidget(); @@ -70,8 +76,7 @@ mLongPressTimer->setSingleShot(true); connect(mLongPressTimer,SIGNAL(timeout()),this,SLOT(handleLongKeyPress())); - mKeyhandler = new DialpadKeyHandler(mDialpad, mMainWindow, this); - + // mKeyhandler = new DialpadKeyHandler(mDialpad, mMainWindow, this); mMainWindow.installEventFilter(this); } @@ -225,3 +230,28 @@ mTapOutsideDismiss = !mTapOutsideDismiss; mDialpad->setTapOutsideDismiss(mTapOutsideDismiss); } + +void DialpadTestView::setArabicMode() +{ + mArabicMode = !mArabicMode; + + if (mArabicMode) { + HbInputLanguage lang(QLocale::Arabic); + HbInputSettingProxy::instance()->setGlobalInputLanguage(lang); + } else { + HbInputLanguage lang(QLocale::English, QLocale::UnitedKingdom); + HbInputSettingProxy::instance()->setGlobalInputLanguage(lang); + } +} + +void DialpadTestView::setArabicDigit() +{ + mArabicDigit = !mArabicDigit; + + if (mArabicDigit) { + HbExtendedLocale::system().setZeroDigit(ArabicIndicDigit); + } else { + HbExtendedLocale::system().setZeroDigit(WesternDigit); + } +} + diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/tsrc/dialpadtest/dialpadtestview.h --- a/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.h Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.h Fri Sep 17 08:33:29 2010 +0300 @@ -50,6 +50,8 @@ void onEditorContentChanged(); void handleLongKeyPress(); void setTapOutsideDismiss(); + void setArabicMode(); + void setArabicDigit(); private: HbMainWindow& mMainWindow; @@ -59,6 +61,8 @@ QTimer* mLongPressTimer; QString mPressedKey; bool mTapOutsideDismiss; + bool mArabicMode; + bool mArabicDigit; }; #endif // DIALPADTESTVIEW_H diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/tsrc/unit/shared/dialpadtestutil.cpp --- a/telutils/dialpad/tsrc/unit/shared/dialpadtestutil.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/tsrc/unit/shared/dialpadtestutil.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -26,20 +26,20 @@ DialpadTestUtil::DialpadTestUtil(HbMainWindow& mainWindow, QObject* parent) : QObject(parent), mMainWindow(mainWindow) { - mKeyNames.insert(Qt::Key_1,"keypad"); - mKeyNames.insert(Qt::Key_2,"keypad"); - mKeyNames.insert(Qt::Key_3,"keypad"); - mKeyNames.insert(Qt::Key_4,"keypad"); - mKeyNames.insert(Qt::Key_5,"keypad"); - mKeyNames.insert(Qt::Key_6,"keypad"); - mKeyNames.insert(Qt::Key_7,"keypad"); - mKeyNames.insert(Qt::Key_8,"keypad"); - mKeyNames.insert(Qt::Key_9,"keypad"); - mKeyNames.insert(Qt::Key_Asterisk,"keypad"); - mKeyNames.insert(Qt::Key_0,"keypad"); - mKeyNames.insert(Qt::Key_NumberSign,"keypad"); - mKeyNames.insert(Qt::Key_Backspace,"16777219"); - mKeyNames.insert(Qt::Key_Yes,"16842753"); + mKeyNames.insert(Qt::Key_1,"numericButtons"); + mKeyNames.insert(Qt::Key_2,"numericButtons"); + mKeyNames.insert(Qt::Key_3,"numericButtons"); + mKeyNames.insert(Qt::Key_4,"numericButtons"); + mKeyNames.insert(Qt::Key_5,"numericButtons"); + mKeyNames.insert(Qt::Key_6,"numericButtons"); + mKeyNames.insert(Qt::Key_7,"numericButtons"); + mKeyNames.insert(Qt::Key_8,"numericButtons"); + mKeyNames.insert(Qt::Key_9,"numericButtons"); + mKeyNames.insert(Qt::Key_Asterisk,"numericButtons"); + mKeyNames.insert(Qt::Key_0,"numericButtons"); + mKeyNames.insert(Qt::Key_NumberSign,"numericButtons"); + mKeyNames.insert(Qt::Key_Backspace,"backspaceButton"); + mKeyNames.insert(Qt::Key_Yes,"callButton"); } DialpadTestUtil::~DialpadTestUtil() @@ -100,7 +100,7 @@ if ( widget ) { QPointF widgetPos; - if (name=="keypad") { + if (name=="numericButtons") { widgetPos = widget->scenePos() + keyPosition(widget, key); } else { diff -r 61f927bc9441 -r 2313cb430f28 telutils/dialpad/tsrc/unit/ut_dialpadnumericbutton/ut_dialpadnumericbutton.cpp --- a/telutils/dialpad/tsrc/unit/ut_dialpadnumericbutton/ut_dialpadnumericbutton.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/dialpad/tsrc/unit/ut_dialpadnumericbutton/ut_dialpadnumericbutton.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -33,6 +33,7 @@ void testSetText(); void testSetSecondaryText(); + void testSetSecondary2ndRowText(); void testSetIcon(); private: @@ -74,5 +75,12 @@ QVERIFY(mButton->icon().color() == Qt::white); } +void ut_DialpadNumericButton::testSetSecondary2ndRowText() +{ + QVERIFY(mButton->secondary2ndRowText().isNull()); + mButton->setSecondary2ndRowText(QLatin1String("Secondary 2nd row text")); + QVERIFY(mButton->secondary2ndRowText() == QLatin1String("Secondary 2nd row text")); +} + DIALPAD_TEST_MAIN(ut_DialpadNumericButton) #include "ut_dialpadnumericbutton.moc" diff -r 61f927bc9441 -r 2313cb430f28 telutils/keysequencerecognitionservice/src/lifetimerkeysequencehandler.cpp --- a/telutils/keysequencerecognitionservice/src/lifetimerkeysequencehandler.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/keysequencerecognitionservice/src/lifetimerkeysequencehandler.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -137,10 +137,6 @@ lifeTimerText.append(locale.timeSeparator(KMinuteSeparatorInd)); lifeTimerText.append( QString::number(static_cast(lifeTimeData.iMinutes))); - // pad hour field to a length of 6 digits - const int KLifeTimerDataFieldLength = 9; - lifeTimerText = lifeTimerText.rightJustified( - KLifeTimerDataFieldLength, QChar('0')); } return lifeTimerText; diff -r 61f927bc9441 -r 2313cb430f28 telutils/phoneparser/group/phoneparser.mmp --- a/telutils/phoneparser/group/phoneparser.mmp Thu Sep 02 21:00:29 2010 +0300 +++ b/telutils/phoneparser/group/phoneparser.mmp Fri Sep 17 08:33:29 2010 +0300 @@ -54,10 +54,9 @@ USERINCLUDE ../inc -// <-- QT PHONE START--> // Default system include paths for MW layer modules. MW_LAYER_SYSTEMINCLUDE -// <-- QT PHONE END--> + SYSTEMINCLUDE ../../../inc // telephonyservices internal headers LIBRARY euser.lib diff -r 61f927bc9441 -r 2313cb430f28 vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp --- a/vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -163,7 +163,6 @@ if (KErrNone == result) { _DBGLOG2("VmbxCpGroup::queryCsVoiceNumber >, number=", number) mUiEngine->setCsVoiceNumber(number); - UpdateWidgetContent(mCsVoice1Index, number); } mCsVoice1Editor->setEnabled(true); _DBGLOG("VmbxCpGroup::queryCsVoiceNumber <") @@ -182,7 +181,6 @@ if (KErrNone == result) { _DBGLOG2("VmbxCpGroup::queryCsVideoNumber >, number=", number) mUiEngine->setCsVideoNumber(number); - UpdateWidgetContent(mCsVideo1Index, number); } mCsVideo1Editor->setEnabled(true); _DBGLOG("VmbxCpGroup::queryCsVideoNumber <") diff -r 61f927bc9441 -r 2313cb430f28 vmbx/vmbxengine/src/voicemailboximpl.cpp --- a/vmbx/vmbxengine/src/voicemailboximpl.cpp Thu Sep 02 21:00:29 2010 +0300 +++ b/vmbx/vmbxengine/src/voicemailboximpl.cpp Fri Sep 17 08:33:29 2010 +0300 @@ -828,7 +828,22 @@ iVmbxFactory->CreateEngineL( vmbxEngine, aType ); CleanupStack::PushL( vmbxEngine ); CVoiceMailboxEntry* entry( NULL ); - vmbxEngine->GetL( entry ); + TRAPD(err,vmbxEngine->GetL( entry )); + VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::NotifyChangedL err=%d",err ); + if(err == KErrNotFound) + { + delete entry; + entry = NULL; + entry = CVoiceMailboxEntry::NewL(); + // get als line info + entry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() ); + entry->SetVoiceMailboxType( aType ); + entry->SetVmbxNumber( KNullDesC()); + } + else + { + User::LeaveIfError(err); + } CleanupStack::PushL( entry ); iNotifyCallBack->HandleNotifyL( *entry ); CleanupStack::PopAndDestroy( entry );