--- a/extras/about/loc/about.loc Wed Apr 14 15:58:57 2010 +0300
+++ b/extras/about/loc/about.loc Tue May 11 16:14:55 2010 +0300
@@ -49,7 +49,7 @@
// d: Starts from a new line.
// l: none
//
-#define qtn_about_legal_text_3 "This product is based on Symbian OS S60 5th Edition software."
+#define qtn_about_legal_text_3 "This product is based on Symbian^3 Edition software."
// d: Nokia legal text
// d: Starts from a new line.
--- a/extras/calcsoft/src/CalcEdit.cpp Wed Apr 14 15:58:57 2010 +0300
+++ b/extras/calcsoft/src/CalcEdit.cpp Tue May 11 16:14:55 2010 +0300
@@ -27,7 +27,7 @@
#include <AknIconUtils.h>
#include <AknsDrawUtils.h>
#include <aknlayoutscalable_avkon.cdl.h>
-#include <aknLayoutscalable_avkon.cdl.common.h>
+
#include <AknLayout2ScalableDef.h>
#include <AvkonInternalCRKeys.h>
#include <aknlayoutscalable_apps.cdl.h>
--- a/extras/converter/BMARM/CONVERTERENGINEu.def Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-EXPORTS
- __12TCnvCategory @ 1 NONAME R3UNUSED ; TCnvCategory::TCnvCategory(void)
- BaseUnit__C12TCnvCategory @ 2 NONAME R3UNUSED ; TCnvCategory::BaseUnit(void) const
- Convert__C12TCnvCategoryUiUiRCdUi @ 3 NONAME ; TCnvCategory::Convert(unsigned int, unsigned int, double const &, unsigned int) const
- CurrencyCategoryId__C13CCnvConverter @ 4 NONAME R3UNUSED ; CCnvConverter::CurrencyCategoryId(void) const
- CurrentValueIndex__C12TCnvCategory @ 5 NONAME R3UNUSED ; TCnvCategory::CurrentValueIndex(void) const
- CurrentValueTextLC__12TCnvCategory @ 6 NONAME R3UNUSED ; TCnvCategory::CurrentValueTextLC(void)
- DeleteCurrencyL__12TCnvCategoryi @ 7 NONAME R3UNUSED ; TCnvCategory::DeleteCurrencyL(int)
- ExternalizeL__C13CCnvConverterR12RWriteStream @ 8 NONAME R3UNUSED ; CCnvConverter::ExternalizeL(RWriteStream &) const
- GetCategoryAccessor__13CCnvConverterR12TCnvCategoryUi @ 9 NONAME R3UNUSED ; CCnvConverter::GetCategoryAccessor(TCnvCategory &, unsigned int)
- GetCategorylistAccessor__13CCnvConverterR12TCnvCategory @ 10 NONAME R3UNUSED ; CCnvConverter::GetCategorylistAccessor(TCnvCategory &)
- GetDefaultUnits__C12TCnvCategoryRUiT1 @ 11 NONAME R3UNUSED ; TCnvCategory::GetDefaultUnits(unsigned int &, unsigned int &) const
- InternalizeL__13CCnvConverterR11RReadStream @ 12 NONAME R3UNUSED ; CCnvConverter::InternalizeL(RReadStream &)
- MdcArray__C12TCnvCategory @ 13 NONAME R3UNUSED ; TCnvCategory::MdcArray(void) const
- NewL__13CCnvConverterR15TResourceReader @ 14 NONAME R3UNUSED ; CCnvConverter::NewL(TResourceReader &)
- SetBaseUnit__12TCnvCategoryUi @ 15 NONAME R3UNUSED ; TCnvCategory::SetBaseUnit(unsigned int)
- SetCurrentValueIndex__12TCnvCategoryi @ 16 NONAME R3UNUSED ; TCnvCategory::SetCurrentValueIndex(int)
- SetDefaultUnits__12TCnvCategoryUiUi @ 17 NONAME R3UNUSED ; TCnvCategory::SetDefaultUnits(unsigned int, unsigned int)
- SetUnitFactor__12TCnvCategoryUiRCd @ 18 NONAME R3UNUSED ; TCnvCategory::SetUnitFactor(unsigned int, double const &)
- SetUnitName__12TCnvCategoryUiRC7TDesC16 @ 19 NONAME R3UNUSED ; TCnvCategory::SetUnitName(unsigned int, TDesC16 const &)
- UnitFactor__C12TCnvCategoryUi @ 20 NONAME R3UNUSED ; TCnvCategory::UnitFactor(unsigned int) const
- UnitMinimum__C12TCnvCategoryUi @ 21 NONAME R3UNUSED ; TCnvCategory::UnitMinimum(unsigned int) const
- "_._13CCnvConverter" @ 22 NONAME R3UNUSED ; CCnvConverter::~CCnvConverter(void)
- AddNewCurrencyL__12TCnvCategoryiR7TDesC16Rd @ 23 NONAME ; TCnvCategory::AddNewCurrencyL(int, TDesC16 &, double &)
-
--- a/extras/converter/BWINS/CONVERTERENGINEu.def Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-EXPORTS
- ??0TCnvCategory@@QAE@XZ @ 1 NONAME ; public: __thiscall TCnvCategory::TCnvCategory(void)
- ??1CCnvConverter@@UAE@XZ @ 2 NONAME ; public: virtual __thiscall CCnvConverter::~CCnvConverter(void)
- ?AddNewCurrencyL@TCnvCategory@@QAEXHAAVTDesC16@@AAN@Z @ 3 NONAME ; public: void __thiscall TCnvCategory::AddNewCurrencyL(int,class TDesC16 &,double &)
- ?BaseUnit@TCnvCategory@@QBEIXZ @ 4 NONAME ; public: unsigned int __thiscall TCnvCategory::BaseUnit(void)const
- ?Convert@TCnvCategory@@QBENIIABNI@Z @ 5 NONAME ; public: double __thiscall TCnvCategory::Convert(unsigned int,unsigned int,double const &,unsigned int)const
- ?CurrencyCategoryId@CCnvConverter@@QBEIXZ @ 6 NONAME ; public: unsigned int __thiscall CCnvConverter::CurrencyCategoryId(void)const
- ?CurrentValueIndex@TCnvCategory@@UBEHXZ @ 7 NONAME ; public: virtual int __thiscall TCnvCategory::CurrentValueIndex(void)const
- ?CurrentValueTextLC@TCnvCategory@@UAEPAVHBufC16@@XZ @ 8 NONAME ; public: virtual class HBufC16 * __thiscall TCnvCategory::CurrentValueTextLC(void)
- ?DeleteCurrencyL@TCnvCategory@@QAEXH@Z @ 9 NONAME ; public: void __thiscall TCnvCategory::DeleteCurrencyL(int)
- ?ExternalizeL@CCnvConverter@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; public: void __thiscall CCnvConverter::ExternalizeL(class RWriteStream &)const
- ?GetCategoryAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@I@Z @ 11 NONAME ; public: void __thiscall CCnvConverter::GetCategoryAccessor(class TCnvCategory &,unsigned int)
- ?GetCategorylistAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@@Z @ 12 NONAME ; public: void __thiscall CCnvConverter::GetCategorylistAccessor(class TCnvCategory &)
- ?GetDefaultUnits@TCnvCategory@@QBEXAAI0@Z @ 13 NONAME ; public: void __thiscall TCnvCategory::GetDefaultUnits(unsigned int &,unsigned int &)const
- ?InternalizeL@CCnvConverter@@QAEXAAVRReadStream@@@Z @ 14 NONAME ; public: void __thiscall CCnvConverter::InternalizeL(class RReadStream &)
- ?MdcArray@TCnvCategory@@UBEPBVMDesC16Array@@XZ @ 15 NONAME ; public: virtual class MDesC16Array const * __thiscall TCnvCategory::MdcArray(void)const
- ?NewL@CCnvConverter@@SAPAV1@AAVTResourceReader@@@Z @ 16 NONAME ; public: static class CCnvConverter * __cdecl CCnvConverter::NewL(class TResourceReader &)
- ?SetBaseUnit@TCnvCategory@@QAEXI@Z @ 17 NONAME ; public: void __thiscall TCnvCategory::SetBaseUnit(unsigned int)
- ?SetCurrentValueIndex@TCnvCategory@@UAEXH@Z @ 18 NONAME ; public: virtual void __thiscall TCnvCategory::SetCurrentValueIndex(int)
- ?SetDefaultUnits@TCnvCategory@@QAEXII@Z @ 19 NONAME ; public: void __thiscall TCnvCategory::SetDefaultUnits(unsigned int,unsigned int)
- ?SetUnitFactor@TCnvCategory@@QAEXIABN@Z @ 20 NONAME ; public: void __thiscall TCnvCategory::SetUnitFactor(unsigned int,double const &)
- ?SetUnitName@TCnvCategory@@QAEXIABVTDesC16@@@Z @ 21 NONAME ; public: void __thiscall TCnvCategory::SetUnitName(unsigned int,class TDesC16 const &)
- ?UnitFactor@TCnvCategory@@QBENI@Z @ 22 NONAME ; public: double __thiscall TCnvCategory::UnitFactor(unsigned int)const
- ?UnitMinimum@TCnvCategory@@QBENI@Z @ 23 NONAME ; public: double __thiscall TCnvCategory::UnitMinimum(unsigned int)const
-
--- a/extras/converter/BWinsCw/CONVERTERENGINEu.def Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-EXPORTS
- ??0TCnvCategory@@QAE@XZ @ 1 NONAME ; TCnvCategory::TCnvCategory(void)
- ??1CCnvConverter@@UAE@XZ @ 2 NONAME ; CCnvConverter::~CCnvConverter(void)
- ?AddNewCurrencyL@TCnvCategory@@QAEXHAAVTDesC16@@AAN@Z @ 3 NONAME ; void TCnvCategory::AddNewCurrencyL(int, class TDesC16 &, double &)
- ?BaseUnit@TCnvCategory@@QBEIXZ @ 4 NONAME ; unsigned int TCnvCategory::BaseUnit(void) const
- ?Convert@TCnvCategory@@QBENIIABNI@Z @ 5 NONAME ; double TCnvCategory::Convert(unsigned int, unsigned int, double const &, unsigned int) const
- ?CurrencyCategoryId@CCnvConverter@@QBEIXZ @ 6 NONAME ; unsigned int CCnvConverter::CurrencyCategoryId(void) const
- ?CurrentValueIndex@TCnvCategory@@UBEHXZ @ 7 NONAME ; int TCnvCategory::CurrentValueIndex(void) const
- ?CurrentValueTextLC@TCnvCategory@@UAEPAVHBufC16@@XZ @ 8 NONAME ; class HBufC16 * TCnvCategory::CurrentValueTextLC(void)
- ?DeleteCurrencyL@TCnvCategory@@QAEXH@Z @ 9 NONAME ; void TCnvCategory::DeleteCurrencyL(int)
- ?ExternalizeL@CCnvConverter@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; void CCnvConverter::ExternalizeL(class RWriteStream &) const
- ?GetCategoryAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@I@Z @ 11 NONAME ; void CCnvConverter::GetCategoryAccessor(class TCnvCategory &, unsigned int)
- ?GetCategorylistAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@@Z @ 12 NONAME ; void CCnvConverter::GetCategorylistAccessor(class TCnvCategory &)
- ?GetDefaultUnits@TCnvCategory@@QBEXAAI0@Z @ 13 NONAME ; void TCnvCategory::GetDefaultUnits(unsigned int &, unsigned int &) const
- ?InternalizeL@CCnvConverter@@QAEXAAVRReadStream@@@Z @ 14 NONAME ; void CCnvConverter::InternalizeL(class RReadStream &)
- ?MdcArray@TCnvCategory@@UBEPBVMDesC16Array@@XZ @ 15 NONAME ; class MDesC16Array const * TCnvCategory::MdcArray(void) const
- ?NewL@CCnvConverter@@SAPAV1@AAVTResourceReader@@@Z @ 16 NONAME ; class CCnvConverter * CCnvConverter::NewL(class TResourceReader &)
- ?SetBaseUnit@TCnvCategory@@QAEXI@Z @ 17 NONAME ; void TCnvCategory::SetBaseUnit(unsigned int)
- ?SetCurrentValueIndex@TCnvCategory@@UAEXH@Z @ 18 NONAME ; void TCnvCategory::SetCurrentValueIndex(int)
- ?SetDefaultUnits@TCnvCategory@@QAEXII@Z @ 19 NONAME ; void TCnvCategory::SetDefaultUnits(unsigned int, unsigned int)
- ?SetUnitFactor@TCnvCategory@@QAEXIABN@Z @ 20 NONAME ; void TCnvCategory::SetUnitFactor(unsigned int, double const &)
- ?SetUnitName@TCnvCategory@@QAEXIABVTDesC16@@@Z @ 21 NONAME ; void TCnvCategory::SetUnitName(unsigned int, class TDesC16 const &)
- ?UnitFactor@TCnvCategory@@QBENI@Z @ 22 NONAME ; double TCnvCategory::UnitFactor(unsigned int) const
- ?UnitMinimum@TCnvCategory@@QBENI@Z @ 23 NONAME ; double TCnvCategory::UnitMinimum(unsigned int) const
-
--- a/extras/converter/BWinsCw/ConverterEngine_EKA2u.def Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-EXPORTS
- ??0TCnvCategory@@QAE@XZ @ 1 NONAME ; TCnvCategory::TCnvCategory(void)
- ??1CCnvConverter@@UAE@XZ @ 2 NONAME ; CCnvConverter::~CCnvConverter(void)
- ?AddNewCurrencyL@TCnvCategory@@QAEXHAAVTDesC16@@AANW4TCurrencyType@@@Z @ 3 NONAME ; void TCnvCategory::AddNewCurrencyL(int, class TDesC16 &, double &, enum TCurrencyType)
- ?BaseUnit@TCnvCategory@@QBEIXZ @ 4 NONAME ; unsigned int TCnvCategory::BaseUnit(void) const
- ?Convert@TCnvCategory@@QBENIIABNI@Z @ 5 NONAME ; double TCnvCategory::Convert(unsigned int, unsigned int, double const &, unsigned int) const
- ?CurrencyCategoryId@CCnvConverter@@QBEIXZ @ 6 NONAME ; unsigned int CCnvConverter::CurrencyCategoryId(void) const
- ?CurrentValueIndex@TCnvCategory@@UBEHXZ @ 7 NONAME ; int TCnvCategory::CurrentValueIndex(void) const
- ?CurrentValueTextLC@TCnvCategory@@UAEPAVHBufC16@@XZ @ 8 NONAME ; class HBufC16 * TCnvCategory::CurrentValueTextLC(void)
- ?DeleteCurrencyL@TCnvCategory@@QAEXH@Z @ 9 NONAME ; void TCnvCategory::DeleteCurrencyL(int)
- ?ExternalizeL@CCnvConverter@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; void CCnvConverter::ExternalizeL(class RWriteStream &) const
- ?GetCategoryAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@I@Z @ 11 NONAME ; void CCnvConverter::GetCategoryAccessor(class TCnvCategory &, unsigned int)
- ?GetCategorylistAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@@Z @ 12 NONAME ; void CCnvConverter::GetCategorylistAccessor(class TCnvCategory &)
- ?GetDefaultUnits@TCnvCategory@@QBEXAAI0@Z @ 13 NONAME ; void TCnvCategory::GetDefaultUnits(unsigned int &, unsigned int &) const
- ?InternalizeL@CCnvConverter@@QAEXAAVRReadStream@@@Z @ 14 NONAME ; void CCnvConverter::InternalizeL(class RReadStream &)
- ?MdcArray@TCnvCategory@@UBEPBVMDesC16Array@@XZ @ 15 NONAME ; class MDesC16Array const * TCnvCategory::MdcArray(void) const
- ?NewL@CCnvConverter@@SAPAV1@AAVTResourceReader@@@Z @ 16 NONAME ; class CCnvConverter * CCnvConverter::NewL(class TResourceReader &)
- ?SetBaseUnit@TCnvCategory@@QAEXI@Z @ 17 NONAME ; void TCnvCategory::SetBaseUnit(unsigned int)
- ?SetCurrentValueIndex@TCnvCategory@@UAEXH@Z @ 18 NONAME ; void TCnvCategory::SetCurrentValueIndex(int)
- ?SetDefaultUnits@TCnvCategory@@QAEXII@Z @ 19 NONAME ; void TCnvCategory::SetDefaultUnits(unsigned int, unsigned int)
- ?SetUnitFactor@TCnvCategory@@QAEXIABN@Z @ 20 NONAME ; void TCnvCategory::SetUnitFactor(unsigned int, double const &)
- ?SetUnitName@TCnvCategory@@QAEXIABVTDesC16@@W4TCurrencyType@@@Z @ 21 NONAME ; void TCnvCategory::SetUnitName(unsigned int, class TDesC16 const &, enum TCurrencyType)
- ?UnitFactor@TCnvCategory@@QBENI@Z @ 22 NONAME ; double TCnvCategory::UnitFactor(unsigned int) const
- ?UnitMinimum@TCnvCategory@@QBENI@Z @ 23 NONAME ; double TCnvCategory::UnitMinimum(unsigned int) const
- ?CreateTempUnitArrayForRestore@TCnvCategory@@QAEXXZ @ 24 NONAME ; void TCnvCategory::CreateTempUnitArrayForRestore(void)
- ?RestoreUnitArray@TCnvCategory@@QAEXXZ @ 25 NONAME ; void TCnvCategory::RestoreUnitArray(void)
-
--- a/extras/converter/Ui/Src/CCnvAppUi.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in CCnvAppUi.h
-*
-*/
-
-
-#include <avkon.hrh>
-#include <hlplch.h>
-#include <featmgr.h>
-
-#include <Converter.rsg>
-
-#include "CCnvApplication.h"
-#include "CCnvAppUi.h"
-#include "CCnvMainForm.h"
-
-CCnvAppUi::CCnvAppUi()
- : iFormDeleted( EFalse )
- {
- }
-
-CCnvAppUi::~CCnvAppUi()
- {
- // This can be done safely because the form never "self-destructs"
- // (exit is done via HandleCommandL( EEikCmdExit) below)
- if( !iFormDeleted )
- {
- delete iMainForm;
- }
- FeatureManager::UnInitializeLib();
- }
-
-void CCnvAppUi::ConstructL()
- {
- // Construct softkeys and menubar using the base class
- BaseConstructL( CAknAppUi::EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible);
-
- // Construct and show our main form
- iMainForm = new( ELeave ) CCnvMainForm( iFormDeleted );
- iMainForm->ConstructL();
- iMainForm->ExecuteLD( R_CNV_MAINFORM );
-
- iMainForm->SetMopParent( this );
-
- CAknAppUi::SetKeyBlockMode(ENoKeyBlock);
-
- FeatureManager::InitializeLibL();
- }
-
-void CCnvAppUi::HandleCommandL( TInt aCommand )
- {
- switch( aCommand )
- {
- case EAknCmdHelp:
- {
- HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
- AppHelpContextL() );
- break;
- }
- case EEikCmdExit:
- case EAknCmdExit:
- {
- Exit();
- break;
- }
- default:
- {
- break;
- }
- }
- }
--- a/extras/converter/Ui/Src/CCnvAppUi.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This class is a part of the standard application framework.
-* It Owns the application main form.
-* It Acts as a default command handler for the application forms.
-*
-*/
-
-
-
-#ifndef __CCNVAPPUI_H__
-#define __CCNVAPPUI_H__
-
-// INCLUDES
-#include <aknappui.h>
-
-// FORWARD DECLARATIONS
-class CCnvMainForm;
-
-// CLASS DEFINITION
-/**
-* This class is a part of the standard application framework.
-* It Owns the application main form.
-* It Acts as a default command handler for the application forms.
-*/
-class CCnvAppUi : public CAknAppUi
- {
-
- public: // Constructors and destructor
-
- /**
- * Default constructor.
- */
- CCnvAppUi();
-
- /**
- * Destructor.
- */
- ~CCnvAppUi();
-
- /**
- * 2nd phase constructor.
- */
- void ConstructL();
-
- public: // from CEikAppUi
-
- /**
- * Handles menu commands.
- * @param aCommand Command identifier.
- */
- void HandleCommandL( TInt aCommand );
-
- private: // Data
-
- /**
- * Pointer to the main form. Owned.
- */
- CCnvMainForm* iMainForm;
-
- /**
- * Set to ETrue by CMainForm at destruction.
- * Used to make sure that we don't double delete
- * the form after an automatic kill by the framework (appshutter).
- */
- TBool iFormDeleted;
-
- };
-
-#endif // __CCNVAPPUI_H__
--- a/extras/converter/Ui/Src/CCnvApplication.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in CCnvApplication.h
-*
-*/
-
-
-
-#include "CCnvApplication.h"
-#include "CCnvDocument.h"
-
-TUid CCnvApplication::AppDllUid() const
- {
- return KUidCnv;
- }
-
-CApaDocument* CCnvApplication::CreateDocumentL()
- {
- return CCnvDocument::NewL( *this );
- }
-
-
-#include <eikstart.h>
-
-LOCAL_C CApaApplication* NewApplication()
- {
- return new CCnvApplication;
- }
-
-GLDEF_C TInt E32Main()
- {
- return EikStart::RunApplication(NewApplication);
- }
-
-
-
-
-
-
-// End of File
--- a/extras/converter/Ui/Src/CCnvApplication.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This class is a part of the standard application framework.
-* The application gets instantiated starting from this class.
-* Provides a factory method for instantiating the document object.
-*
-*/
-
-
-
-#ifndef __CCNVAPPLICATION_H__
-#define __CCNVAPPLICATION_H__
-
-// INCLUDES
-//#include <eikapp.h>
-#include <aknapp.h>
-
-// CONSTANTS
-const TUid KUidCnv = { 0x101f4668 }; // UID of the application
-
-// CLASS DEFINITION
-/**
-* This class is a part of the standard application framework.
-* The application gets instantiated starting from this class.
-* Provides a factory method for instantiating the document object.
-*/
-class CCnvApplication : public CAknApplication
- {
-
- private: // from CApaApplication
-
- /**
- * Creates a CCnvDocument instance.
- * @return A pointer to the created document object.
- */
- CApaDocument* CreateDocumentL();
-
- /**
- * Returns application's UID value.
- * @return KUidCnv.
- */
- TUid AppDllUid() const;
-
- };
-
-#endif // __CCNVAPPLICATION_H__
--- a/extras/converter/Ui/Src/CCnvDocument.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in CCnvDocument.h
-*
-*/
-
-
-
-#include "CCnvAppUi.h"
-#include "CCnvDocument.h"
-
-CCnvDocument::CCnvDocument( CAknApplication& aApp )
-: CAknDocument( aApp )
- {
- }
-
-CCnvDocument* CCnvDocument::NewL( CAknApplication& aApp )
- {
- return new( ELeave ) CCnvDocument( aApp );
- }
-
-CCnvDocument::~CCnvDocument()
- {
- }
-
-CEikAppUi* CCnvDocument::CreateAppUiL()
- {
- return new( ELeave ) CCnvAppUi;
- }
--- a/extras/converter/Ui/Src/CCnvDocument.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This class is a part of the standard application framework.
-* Declares the document class for this application.
-*
-*/
-
-
-
-#ifndef __CCNVDOCUMENT_H__
-#define __CCNVDOCUMENT_H__
-
-// INCLUDES
-//#include <eikdoc.h>
-#include <AknDoc.h>
-#include <aknapp.h>
-
-// CLASS DEFINITION
-/**
-* This class is a part of the standard application framework.
-* Declares the document class for this application.
-*/
-class CCnvDocument : public CAknDocument
- {
-
- public: // Constructors and destructor.
-
- /**
- * Static two-phase constructor.
- * @param aApp Reference to the application object.
- */
- static CCnvDocument* NewL( CAknApplication& aApp );
-
- /**
- * Destructor.
- */
- ~CCnvDocument();
-
- public: // from CEikDocument
-
- /**
- * Instantiates the application UI class.
- * @return CCnvAppUi object instance.
- */
- CEikAppUi* CreateAppUiL();
-
- private: // Private constructors
-
- /**
- * Constructor.
- * @param aApp Reference to the application object.
- */
- CCnvDocument( CAknApplication& aApp );
-
- };
-
-#endif // __CCNVDOCUMENT_H__
--- a/extras/converter/Ui/Src/CCnvMainForm.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1286 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in CCnvMainForm.h
-*
-*/
-
-
-
-#include <barsread.h>
-#include <eikenv.h>
-#include <eikappui.h>
-#include <eikfpne.h>
-#include <avkon.hrh>
-#include <AknPopupField.h>
-#include <aknnotewrappers.h>
-#include <eikmenup.h>
-#include <s32file.h>
-#include <ErrorUI.h>
-#include <featmgr.h>
-
-#include <hlplch.h>
-#include <csxhelp/cnv.hlp.hrh>
-
-#include <CCnvConverter.h>
-#include <TCnvCategory.h>
-#include <Converter.rsg>
-#include "Converter.hrh"
-#include "CCnvApplication.h"
-#include "CCnvMainForm.h"
-#include "CCnvRatesForm.h"
-
-#include <aknnumed.h>
-#include <f32file.h>
-#include <e32std.h>
-
-_LIT( KCnvPlusSign, "+" );
-_LIT( KCnvMinusSign, "-" );
-_LIT( KCnvExponentSign, "E" );
-_LIT( KCnvDotSign, "." );
-
-_LIT( KCnvMinusInTheMiddle, "?*-?*" );
-_LIT( KCnvPlusInTheMiddle, "?*+?*" );
-_LIT( KCnvExponentInTheMiddle, "?*E?*" );
-_LIT( KCnvExponentInTheMiddleAndEnd, "?*E?*E?" );
-
- _LIT( KConverterFilename,"UnitConverter.ini");
- _LIT(KDelimiter, ":");
-
-CCnvMainForm::CCnvMainForm( TBool &aAlreadyDead )
-: iIsFullyConstructed( EFalse ),
-iHasNotifiedDiscFull( EFalse ),
-iLastUsedEditorId( EConverterEditor1 ),
-iHistoryTypeCategory( -1 ),
-iHistoryUnit1Category( -1 ),
-iHistoryUnit2Category( -1 ),
-iAlreadyDead( aAlreadyDead )
- {
- }
-
-CCnvMainForm::~CCnvMainForm()
- {
- if( iIsFullyConstructed )
- {
- SaveState();
- }
- delete iModel;
- delete iConversionTimer;
- delete iErrorUI;
- iAlreadyDead = ETrue;
-
- //remove the edwin observers
- CEikFloatingPointEditor* editor1 =
- static_cast< CEikFloatingPointEditor* >( Control( EConverterEditor1 ) );
- editor1->RemoveEdwinObserver(this);
-
- CEikFloatingPointEditor* editor2 =
- static_cast< CEikFloatingPointEditor* >( Control( EConverterEditor2 ) );
- editor2->RemoveEdwinObserver(this);
-
- }
-
-void CCnvMainForm::ConstructL()
- {
- CAknDialog::ConstructL( R_CNV_MAINFORM_MENUBAR );
-
- iErrorUI = CErrorUI::NewL( *iCoeEnv );
-
- TResourceReader reader;
- iEikonEnv->CreateResourceReaderLC( reader, R_CNV_MODEL );
- iModel = CCnvConverter::NewL( reader );
- CleanupStack::PopAndDestroy(); // reader
-
- iConversionTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-
- iCurrencyCategoryId = iModel->CurrencyCategoryId();
- iIsFullyConstructed = ETrue;
- isEdwinUpdateText = EFalse;
-
- TFileName path;
- iEikonEnv->FsSession().PrivatePath(path);
- iEikonEnv->FsSession().MkDirAll(path);
-
- }
-
-void CCnvMainForm::GetHelpContext( TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KUidCnv;
- aContext.iContext = KCNV_HLP_MAIN_STATE;
- }
-
-// Handle commands from Options menu
-void CCnvMainForm::ProcessCommandL( TInt aCommandId )
- {
- // this hides the options menu etc.
- CAknForm::ProcessCommandL( aCommandId );
-
- switch( aCommandId )
- {
- case ECmdSetType:
- {
- CmdSetTypeL();
- break;
- }
-
- case ECmdSetUnit: // FLOWTHROUGH
- case ECmdSetCurrency:
- {
- CmdSetUnitL();
- break;
- }
-
- case ECmdRates:
- {
- CmdRatesL();
- break;
- }
- case EAknCmdHelp:
- {
- iEikonEnv->EikAppUi()->HandleCommandL( EAknCmdHelp );
- break;
- }
- case EEikCmdExit:
- {
- OkToExitL( EAknSoftkeyExit );
- break;
- }
-
- default:
- {
- break;
- }
- }
- }
-
-// Takes any action required when the current line is changed to aControlId.
-void CCnvMainForm::LineChangedL( TInt aControlId )
- {
-
- CEikButtonGroupContainer& cba = ButtonGroupContainer();
- cba.SetCommandSetL(R_CNV_MAINFORM_SOFTKEYS);
-
- if( ( aControlId == EConverterEditor1 ) ||
- ( aControlId == EConverterEditor2 ) )
- {
- CEikFloatingPointEditor* editor =
- static_cast< CEikFloatingPointEditor* >( Control( aControlId ) );
-
- // don't clear the selection if there is only '0' in the editor
- TBuf<KEditorTextMaxLength> editorText;
- editor->GetText(editorText);
-
- SynchronousConversionL();
- // iActiveEditorChanged = EFalse;
- }
- else if(aControlId == EConverterUnit1Popup ||
- aControlId == EConverterUnit2Popup)
- {
-
-
- // if focus is moved to unit popup from amount field
- // then try to do the conversion.
- // IsEditorValueValidL shows invalid value note if value is not valid
- TBool editorValueValid = IsEditorValueValidL(iLastUsedEditorId);
- if (editorValueValid && AreRatesValidL(ETrue))
- {
- SynchronousConversionL();
- }
- }
- if(aControlId == EConverterUnit1Popup ||
- aControlId == EConverterUnit2Popup ||
- aControlId == EConverterTypePopup)
- {
- //Makes the MSK visible
-
- cba.MakeCommandVisible(EAknSoftkeyChange,ETrue);
-
-
- }
- else if(aControlId ==EConverterEditor1 ||
- aControlId ==EConverterEditor2)
- {
-
-
- //makes the MSK invisible
-
- cba.MakeCommandVisible(EAknSoftkeyChange,EFalse);
-
- }
- cba.DrawNow();
- }
-
-void CCnvMainForm::DynInitMenuPaneL( TInt aResourceId,
- CEikMenuPane* aMenuPane )
- {
- // When click on LSK(option), the invalid value should be set to 0.
- TInt controlId( IdOfFocusControl() );
- if ( ( controlId == EConverterEditor1 ) || ( controlId == EConverterEditor2 ) )
- {
- if ( EditorValueCausesHold( controlId ) || !IsVaildNumberEntered( controlId ) )
- {
- SetFloatEditorValueL( controlId, 0.0 );
- }
- SynchronousConversionL( EFalse );
- }
-
- TUint currentType( iTypeCategory.CurrentValueIndex() );
-
- if( aResourceId == R_CNV_MAINFORM_MENUPANE )
- {
- if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
- {
- aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
- }
-
- switch( IdOfFocusControl() )
- {
- case EConverterUnit1Popup:
- case EConverterUnit2Popup:
- case EConverterTypePopup:
- {
- if( currentType == iCurrencyCategoryId )
- {
- aMenuPane->SetItemDimmed( ECmdRates, EFalse ) ;
- aMenuPane->SetItemDimmed( ECmdSetType, ETrue ) ;
- aMenuPane->SetItemDimmed( ECmdSetUnit, ETrue ) ;
- }
- else
- {
- aMenuPane->SetItemDimmed( ECmdSetCurrency, ETrue ) ;
- aMenuPane->SetItemDimmed( ECmdSetType, ETrue ) ;
- aMenuPane->SetItemDimmed( ECmdSetUnit, ETrue ) ;
- aMenuPane->SetItemDimmed( ECmdRates, ETrue ) ;
- }
- break;
- }
- case EConverterEditor1:
- case EConverterEditor2:
- {
- if( currentType == iCurrencyCategoryId )
- {
- aMenuPane->SetItemDimmed( ECmdSetType, ETrue ) ;
- aMenuPane->SetItemDimmed( ECmdSetUnit, ETrue ) ;
- aMenuPane->SetItemDimmed( ECmdRates, EFalse );
- }
- else
- {
- aMenuPane->SetItemDimmed( ECmdSetType, ETrue );
- aMenuPane->SetItemDimmed( ECmdRates, ETrue );
- }
- break;
- }
- default:
- {
- break;
- }
- }
-
- if ( iTypePopupCtrl->SelectionMode() == CAknPopupField::EAknPopupFieldSelectionListMode ||
- iUnit1PopupCtrl->SelectionMode() == CAknPopupField::EAknPopupFieldSelectionListMode ||
- iUnit2PopupCtrl->SelectionMode() == CAknPopupField::EAknPopupFieldSelectionListMode)
- {
- aMenuPane->SetItemDimmed( ECmdSetCurrency, ETrue );
- aMenuPane->SetItemDimmed( ECmdSetType, ETrue );
- aMenuPane->SetItemDimmed( ECmdSetUnit, ETrue );
- aMenuPane->SetItemDimmed( ECmdRates, ETrue );
- }
- }
- }
-
-// Handles events to the three pop lists
-void CCnvMainForm::HandleControlEventL( CCoeControl* /*aControl*/,
- TCoeEvent aEventType )
- {
- // We are interested only about EEventStateChanged events
- if( aEventType != EEventStateChanged )
- {
- return;
- }
-
- TInt controlId( IdOfFocusControl() );
-
- if( !HasReallyChanged( controlId ) )
- {
- return;
- }
-
- switch( controlId )
- {
- case EConverterTypePopup:
- {
- HandleCategoryChangedL();
- break;
- }
- case EConverterUnit1Popup:
- case EConverterUnit2Popup:
- {
- HandleUnitChangedL();
- break;
- }
- //These have been moved to OfferKeyEventL
- case EConverterEditor1:
- case EConverterEditor2:
- {
- iLastUsedEditorId = controlId;
- if( (iActiveEditorChanged)&&
- ( isEdwinNavigated == EFalse || isEdwinUpdateText ) ) // Is there any navigation (or selection)
- //happening on the editor
- {
- AsynchronousConversion();
- }
- isEdwinNavigated = EFalse; //make the boolean false
- iActiveEditorChanged = ETrue;
- break;
- }
-
- default:
- {
- break;
- }
- }
- }
-
-TBool CCnvMainForm::SaveFormData()
- {
- // Always allow exit (data is saved in the destructor)
- return ETrue;
- }
-
-TBool CCnvMainForm::OkToExitL( TInt aButtonId )
- {
- TBool status( CAknDialog::OkToExitL( aButtonId ) );
- TInt controlId( IdOfFocusControl() );
- if( status && ( aButtonId == EAknSoftkeyExit ) )
- {
- iEikonEnv->EikAppUi()->HandleCommandL( EAknCmdExit );
- }
- else if(aButtonId == EAknSoftkeyChange)
- {
- if (controlId == EConverterTypePopup)
- {
- CmdSetTypeL();
- status = EFalse;
- }
- else if ((controlId == EConverterUnit1Popup) ||(controlId == EConverterUnit2Popup))
- {
- CmdSetUnitL();
- status = EFalse;
- }
- }
- else
- {
- status = EFalse;
- }
- return status;
- }
-
-void CCnvMainForm::PreLayoutDynInitL()
- {
- // Store pointers to the popup list controls
- // (makes further access easier/faster)
- iTypePopupCtrl =
- static_cast< CAknPopupField* >( Control( EConverterTypePopup ) );
- iUnit1PopupCtrl =
- static_cast< CAknPopupField* >( Control( EConverterUnit1Popup ) );
- iUnit2PopupCtrl =
- static_cast< CAknPopupField* >( Control( EConverterUnit2Popup ) );
-
-
- // Set values for the unit category popup control
- iModel->GetCategorylistAccessor( iTypeCategory );
- iTypePopupCtrl->SetQueryValueL( &iTypeCategory );
-
- // Load user selections from file (if any)
- LoadStateL();
-
- // Set initial values for the popup lists
- HandleCategoryChangedL();
-
- InitialiseChangeHistory();
-
- if (iUnit1Category.UnitFactor(iUnit1Category.CurrentValueIndex()) != 0.0 &&
- iUnit2Category.UnitFactor(iUnit2Category.CurrentValueIndex()) != 0.0)
- {
- SynchronousConversionL();
- }
-
- //Add wdwin observers for the two editors so that they can capture the Navigation
- //events and not do asynchronous conversion
- CEikFloatingPointEditor* editor1 =
- static_cast< CEikFloatingPointEditor* >( Control( EConverterEditor1 ) );
-
- CEikFloatingPointEditor* editor2 =
- static_cast< CEikFloatingPointEditor* >( Control( EConverterEditor2 ) );
-
- editor1->AddEdwinObserverL(this);
- editor2->AddEdwinObserverL(this);
-
-
- }
-
-TBool CCnvMainForm::HasReallyChanged( TInt controlId )
- {
- TBool changed( EFalse );
-
- switch( controlId )
- {
- case EConverterTypePopup:
- {
- if( iTypeCategory.CurrentValueIndex() != iHistoryTypeCategory )
- {
- changed = ETrue;
- iHistoryTypeCategory = iTypeCategory.CurrentValueIndex();
-
- // renew iHistoryUnit1Category and iHistoryUnit2Category
- iModel->GetCategoryAccessor( iUnit1Category, iHistoryTypeCategory );
- TUint HistoryUnit1Category;
- TUint HistoryUnit2Category;
- iUnit1Category.GetDefaultUnits( HistoryUnit1Category , HistoryUnit2Category );
- iHistoryUnit1Category = HistoryUnit1Category;
- iHistoryUnit2Category = HistoryUnit2Category;
- }
- break;
- }
- case EConverterUnit1Popup:
- {
- if( iUnit1Category.CurrentValueIndex() != iHistoryUnit1Category )
- {
- changed = ETrue;
- iHistoryUnit1Category = iUnit1Category.CurrentValueIndex();
- }
- break;
- }
- case EConverterUnit2Popup:
- {
- if( iUnit2Category.CurrentValueIndex() != iHistoryUnit2Category )
- {
- changed = ETrue;
- iHistoryUnit2Category = iUnit2Category.CurrentValueIndex();
- }
- break;
- }
-
- case EConverterEditor1:
- case EConverterEditor2:
- {
- changed = ETrue;
- break;
- }
-
- default:
- {
- break;
- }
- }
-
- return changed;
- }
-
-void CCnvMainForm::InitialiseChangeHistory()
- {
- iHistoryTypeCategory = iTypeCategory.CurrentValueIndex();
- iHistoryUnit1Category = iUnit1Category.CurrentValueIndex();
- iHistoryUnit2Category = iUnit2Category.CurrentValueIndex();
- }
-
-void CCnvMainForm::HandleCategoryChangedL()
- {
- TInt categoryId = iTypeCategory.CurrentValueIndex();
- iModel->GetCategoryAccessor( iUnit1Category, categoryId );
- iModel->GetCategoryAccessor( iUnit2Category, categoryId );
-
- TUint srcUnit, dstUnit;
- iUnit1Category.GetDefaultUnits( srcUnit, dstUnit );
- iUnit1Category.SetCurrentValueIndex( srcUnit );
- iUnit2Category.SetCurrentValueIndex( dstUnit );
-
- // Set arrays to popup lists and redraw them
- iUnit1PopupCtrl->SetQueryValueL( &iUnit1Category );
- iUnit2PopupCtrl->SetQueryValueL( &iUnit2Category );
- iUnit1PopupCtrl->DrawNow();
- iUnit2PopupCtrl->DrawNow();
-
- // Reset amount fields
- TReal zero( 0.0 );
- SetFloatingPointEditorValueL( EConverterEditor1, &zero );
- SetFloatingPointEditorValueL( EConverterEditor2, &zero );
-
- // when category's type is temperature the editor's value can't simply set to zero
- AsynchronousConversion();
-
- iLastUsedEditorId = EConverterEditor1;
- }
-
-void CCnvMainForm::HandleUnitChangedL()
- {
- iUnit1Category.SetDefaultUnits( iUnit1Category.CurrentValueIndex(),
- iUnit2Category.CurrentValueIndex() );
- SynchronousConversionL();
- }
-
-TBool CCnvMainForm::AreRatesValidL(TBool aShowNote)
- {
- TInt numInvalid( 0 );
- if( iUnit1Category.UnitFactor( iUnit1Category.CurrentValueIndex() )
- == 0.0 )
- {
- numInvalid++;
- SetFloatEditorValueL( EConverterEditor1, 0.0 );
- }
- if( iUnit2Category.UnitFactor( iUnit2Category.CurrentValueIndex() )
- == 0.0 )
- {
- numInvalid++;
- SetFloatEditorValueL( EConverterEditor2, 0.0 );
- }
-
- if(numInvalid)
- {
- CancelConversion();
-
- if (aShowNote)
- {
- TBool isPlural( EFalse );
- if( numInvalid > 1 )
- {
- isPlural = ETrue;
- }
-
- TInt resourceId(R_CNV_MAINFORM_NORATE );
- if( isPlural )
- {
- resourceId = R_CNV_MAINFORM_NORATE_PLURAL;
- }
- HBufC* label = iCoeEnv->AllocReadResourceLC( resourceId );
- CAknErrorNote* note = new( ELeave ) CAknErrorNote;
- note->ExecuteLD( *label );
- CleanupStack::PopAndDestroy(); // label;
- }
- return EFalse;
- }
- else
- {
- return ETrue;
- }
- }
-
-void CCnvMainForm::ShowInvalidValueNoteL(TInt aEditorId)
- {
- CancelConversion();
-
- SetFloatEditorValueL( aEditorId, 0.0 );
-
- HBufC* label = iCoeEnv->AllocReadResourceLC(
- R_CNV_MAINFORM_INVALIDVALUE );
- CAknErrorNote* note = new( ELeave ) CAknErrorNote;
- note->ExecuteLD( *label );
- CleanupStack::PopAndDestroy(); // label;
-
- SynchronousConversionL();
- }
-
-TBool CCnvMainForm::IsEditorValueValidL( TUint aEditorId )
- {
- TReal amount( FloatingPointEditorValue( aEditorId ) );
-
- TReal minimum;
- if( aEditorId == EConverterEditor1 )
- {
- minimum = iUnit1Category.UnitMinimum(
- iUnit1Category.CurrentValueIndex() );
- }
- else
- {
- minimum = iUnit2Category.UnitMinimum(
- iUnit2Category.CurrentValueIndex() );
- }
-
- if( amount < minimum )
- {
- ShowInvalidValueNoteL(aEditorId);
- return EFalse;
- }
- else
- {
- return ETrue;
- }
- }
-
-TBool CCnvMainForm::EditorValueCausesHold( TUint aEditorId )
- {
- CEikFloatingPointEditor* editor =
- static_cast< CEikFloatingPointEditor* >( Control( aEditorId ) );
-
- if( editor->TextLength() == 0 )
- {
- return ETrue;
- }
-
- TBuf< 12 > content;
- TLocale locale;
-
- // Not all the countries use '.' to express radix point, some use ','.
- // So use locale.DecimalSeparator() to get local symbol.
- TBuf<1> decimal;
- decimal.Append( locale.DecimalSeparator() );
- editor->Text()->Extract( content, 0, 12 );
- TInt contentLength( content.Length() );
- if ( !content.Compare( KCnvPlusSign ) )
- {
- return ETrue;
- }
- else if ( !content.Compare( KCnvMinusSign ) )
- {
- return ETrue;
- }
-
- else if ( !content.Compare( decimal ) )
- {
- return ETrue;
- }
- else if( contentLength > 1 &&
- content[ contentLength - 1 ] == KCnvExponentSign()[ 0 ] &&
- IsDigit( content[ contentLength - 2 ] ) &&
- content.Match( KCnvExponentInTheMiddle ) == KErrNotFound &&
- content.Match( KCnvMinusInTheMiddle ) == KErrNotFound &&
- content.Match( KCnvPlusInTheMiddle ) == KErrNotFound)
- {
- // If content ends with <digit>E with no minus, plus or exponent
- // sign in the middle
- return ETrue;
- }
- else if( contentLength > 2 &&
- ( content[ contentLength - 1 ] == KCnvMinusSign()[ 0 ] ||
- content[ contentLength - 1 ] == KCnvPlusSign()[ 0 ] ) &&
- content[ contentLength - 2 ] == KCnvExponentSign()[ 0 ] &&
- IsDigit( content[ contentLength - 3 ] ) &&
- content.Match( KCnvExponentInTheMiddleAndEnd ) == KErrNotFound &&
- content.Match( KCnvMinusInTheMiddle ) == KErrNotFound &&
- content.Match( KCnvPlusInTheMiddle ) == KErrNotFound )
- {
- // If content ends with <digit>E[+|-] with no minus, plus or exponent
- // sign in the middle
- return ETrue;
- }
- else if(contentLength > 12 &&
- content.Locate(locale.DecimalSeparator()) == contentLength - 1)
- {
- // content ends with decimal separator and there is no other
- // decimal separator
- return ETrue;
- }
-
-
- return EFalse;
- }
-
-void CCnvMainForm::CmdRatesL()
- {
- TBool wantsRelaunch;
- TBool shouldExit( EFalse );
- TBool needsSave( EFalse );
- do
- {
- wantsRelaunch = EFalse;
- TCnvCategory currencies;
- iModel->GetCategoryAccessor( currencies, iCurrencyCategoryId );
-
- CCnvRatesForm* rates = new( ELeave ) CCnvRatesForm( &wantsRelaunch,
- &shouldExit, &needsSave, currencies);
-
- CleanupStack::PushL( rates );
- rates->ConstructL();
- CleanupStack::Pop(); // rates
- rates->ExecuteLD( R_CNV_RATESFORM );
- }
- while( wantsRelaunch );
-
- if( needsSave )
- {
- SaveState();
- }
-
- if( !shouldExit )
- {
- // Reset the form (there might be changes in unit names..)
- HandleCategoryChangedL();
-
- DrawNow();
- }
- else
- {
- TryExitL( EAknSoftkeyExit );
- }
- }
-
-void CCnvMainForm::CmdSetTypeL()
- {
- TryChangeFocusToL( EConverterTypePopup );
- iTypePopupCtrl->ActivateSelectionListL();
- }
-
-void CCnvMainForm::CmdSetUnitL()
- {
- switch ( IdOfFocusControl() )
- {
- case EConverterUnit1Popup:
- {
- iUnit1PopupCtrl->ActivateSelectionListL();
- break;
- }
-
- case EConverterUnit2Popup:
- {
- iUnit2PopupCtrl->ActivateSelectionListL();
- break;
- }
-
- default:
- {
- break;
- }
- }
- }
-
-void CCnvMainForm::LoadStateL()
- {
- RFileReadStream in;
-
- TFileName filePath;
- TBuf<1> tempDes;
- TChar driveChar;
- User::LeaveIfError(iEikonEnv->FsSession().PrivatePath(filePath));
- iEikonEnv->FsSession().DriveToChar(KDefaultDrive, driveChar);
- tempDes.Append(driveChar);
- filePath.Insert(0,KDelimiter);
- filePath.Insert(0,tempDes);
- filePath.Append(KConverterFilename);
-
- TInt err( in.Open( iEikonEnv->FsSession(), filePath,
- EFileRead ) );
-
- if( !err )
- {
- TRAP( err, iModel->InternalizeL( in ) );
- if( !err )
- {
- TRAP( err, iTypeCategory.SetCurrentValueIndex( in.ReadInt8L() ) );
- }
- in.Close();
- }
- }
-
-void CCnvMainForm::SaveState()
- {
- RFileWriteStream out;
-
- TFileName filePath;
- TBuf<1> tempDes;
- TChar driveChar;
- TRAPD(errd, iEikonEnv->FsSession().PrivatePath(filePath));
- iEikonEnv->FsSession().DriveToChar(KDefaultDrive, driveChar);
- tempDes.Append(driveChar);
- if(!errd)
- {
-
- filePath.Insert(0,KDelimiter);
- filePath.Insert(0,tempDes);
- filePath.Append(KConverterFilename);
- }
-
- TInt err( out.Replace( iEikonEnv->FsSession(), filePath,
- EFileWrite ) );
-
- if( !err )
- {
- TRAP( err, iModel->ExternalizeL( out ) );
- if( !err )
- {
- TRAP( err, out.WriteInt8L( iTypeCategory.CurrentValueIndex() ) );
- }
- out.Close();
- }
-
- if( err && !iHasNotifiedDiscFull )
- {
- TRAP_IGNORE(iErrorUI->ShowGlobalErrorNoteL( err ) );
- iHasNotifiedDiscFull = ETrue;
- }
- }
-
-void CCnvMainForm::SynchronousConversionL( TBool aShowRateInvalideNote )
- {
- // Don't report an "invalid value" error. Cancel conversion.
- // if the field is empty (i.e. the user has used delete/backspace) etc.
- if( EditorValueCausesHold( iLastUsedEditorId ) )
- {
- // if one Editor is blank, set the other to 0.
- CEikFloatingPointEditor* editor =
- static_cast< CEikFloatingPointEditor* >( Control( iLastUsedEditorId ) );
- if( editor->TextLength() == 0 )
- {
- if( iLastUsedEditorId == EConverterEditor1)
- {
- SetFloatEditorValueL( EConverterEditor2, 0.0 );
- }
- if( iLastUsedEditorId == EConverterEditor2)
- {
- SetFloatEditorValueL( EConverterEditor1, 0.0 );
- }
- }
- return;
- }
-
- if ( !IsVaildNumberEntered( iLastUsedEditorId ) )
- {
- ShowInvalidValueNoteL( iLastUsedEditorId );
- }
-
-
- // PrepareForFocusLossL leaves if the component is not able to
- // parse the content. We trap it so that IsEditorValueValidL()
- // can check and report the situation correctly.
- TRAP_IGNORE( Control( iLastUsedEditorId )->PrepareForFocusLossL() );
- TInt CurrentControlId( IdOfFocusControl() );
- if( CurrentControlId == EConverterUnit1Popup )
- {
- IsEditorValueValidL( EConverterEditor1 );
- }
- else if (CurrentControlId == EConverterUnit2Popup)
- {
- IsEditorValueValidL( EConverterEditor2 );
- }
- else if (CurrentControlId == EConverterEditor2 )
- {
- if ( !IsVaildNumberEntered( EConverterEditor2 ) )
- {
- iLastUsedEditorId = CurrentControlId;
- ShowInvalidValueNoteL( EConverterEditor2 );
- }
- }
- else if (CurrentControlId == EConverterEditor1 )
- {
- if ( !IsVaildNumberEntered( EConverterEditor1 ) )
- {
- iLastUsedEditorId = CurrentControlId;
- ShowInvalidValueNoteL( EConverterEditor1 );
- }
- }
- TReal result( 0.0 );
-
- // send an argument to notify the AreRatesValidL() display a note dialog or not
- if (IsEditorValueValidL(iLastUsedEditorId))
- {
- if (AreRatesValidL(aShowRateInvalideNote))
- {
- TReal amount(FloatingPointEditorValue(iLastUsedEditorId));
- TUint unit1(iUnit1Category.CurrentValueIndex());
- TUint unit2(iUnit2Category.CurrentValueIndex());
-
- // RAPD( ignored, Control( iLastUsedEditorId )->PrepareForFocusLossL() );
-
-
- // do not reset the touch UI to standby state
- // CCoeEnv::Static()->SyncNotifyFocusObserversOfChangeInFocus();
-
-
- // Do the calculation and change the value for the related edit field
- ValueCalculationL(unit1, unit2, amount);
-
- CEikFloatingPointEditor* editor =
- static_cast<CEikFloatingPointEditor*> (Control(
- iLastUsedEditorId));
- TBuf<KEditorTextMaxLength> editorText;
- editor->GetText(editorText);
-
- // Use local value for different area
- TBuf<1> localeZero;
- localeZero.AppendNum(0);
- AknTextUtils::LanguageSpecificNumberConversion(localeZero);
- if (editorText.Length() > 1 && editorText[0] == localeZero[0])
- {
- TCursorSelection sel = editor->Selection();
- TInt removedZeroes = 0;
- // remove all leading zeroes
- while (editorText.Length() > 0 && editorText[0]
- == localeZero[0])
- {
- editorText.Delete(0, 1);
- ++removedZeroes;
- }
- // if too many zeroes removed, insert one.
- TLocale locale;
- if (editorText.Length() == 0 || TChar(editorText[0])
- == locale.DecimalSeparator())
- {
- editorText.Insert(0, localeZero);
- --removedZeroes;
- }
- editor->SetTextL(&editorText);
-
- // adjust the selection accroding to removed zeroes
- TInt anchor =
- (sel.iAnchorPos - removedZeroes > 0) ? sel.iAnchorPos
- - removedZeroes : 0;
- TInt cursor =
- (sel.iCursorPos - removedZeroes > 0) ? sel.iCursorPos
- - removedZeroes : 0;
- editor->SetSelectionL(cursor, anchor);
-
- if ( !IsVaildNumberEntered( iLastUsedEditorId ) )
- {
- ShowInvalidValueNoteL( iLastUsedEditorId );
- }
- // notify the touch window
- editor->SetCursorPosL(cursor, ETrue);
- editor->DrawNow();
- }
- }
- }
- }
-
-void CCnvMainForm::AsynchronousConversion()
- {
- CancelConversion();
- TCallBack cb( TimerCallback, this );
- iConversionTimer->Start( 750000, 0, cb );
- }
-
-void CCnvMainForm::CancelConversion()
- {
- iConversionTimer->Cancel();
- }
-
-TInt CCnvMainForm::TimerCallback( TAny* aMainForm )
- {
-
- CCnvMainForm* form = reinterpret_cast< CCnvMainForm* >( aMainForm );
-
- TRAP_IGNORE(form->SynchronousConversionL() );
-
- form->CancelConversion();
-
- return KErrNone;
- }
-
-
-
-// ----------------------------------------------------
-// CCnvMainForm::OfferKeyEventL
-// Keyevent process.
-// ----------------------------------------------------
-//
-TKeyResponse CCnvMainForm::OfferKeyEventL(const TKeyEvent& aKeyEvent,
- TEventCode aType)
- {
-
- if ( !IsFocused() )
- {
- if (aKeyEvent.iCode == EKeyEscape)
- {
- return CAknForm::OfferKeyEventL( aKeyEvent, aType );
- }
- return EKeyWasNotConsumed;
- }
-
- TInt controlId( IdOfFocusControl() );
-
- TBool hashKeyPressed = EFalse;
-
- // Use decimalChar instead of 46
- TLocale locale;
- TChar decimalChar = locale.DecimalSeparator();
- if ( aKeyEvent.iScanCode == EStdKeyHash || decimalChar == TChar( aKeyEvent.iCode ) )
- {
- hashKeyPressed = ETrue;
- }
-
- if( hashKeyPressed )
- {
- // If inputting through VKB or HWR, the event can be done only when aType is equal to EEventKey.
- // Besides, only when inputting the dot in VKB or HWR, aKeyEvent.iScanCode is equal to decimalChar.
- TBool VKBdotKeyPressed = EFalse;
- if ( ( aKeyEvent.iScanCode == decimalChar ) )
- {
- VKBdotKeyPressed = ETrue;
- }
- if ( ( aType == EEventKey) && ( !VKBdotKeyPressed ) )
- {
- return EKeyWasConsumed;
- }
- else if( aType == EEventKeyUp)
- {
- TKeyEvent keyevent( aKeyEvent );
- aType = EEventKey;
- keyevent.iCode = decimalChar;
- keyevent.iModifiers = 0;
- keyevent.iScanCode = 0;
- keyevent.iRepeats = 0;
- return static_cast< CEikFloatingPointEditor* >( Control( controlId ) )
- ->OfferKeyEventL(keyevent,aType);
- }
- else
- {//
- }
- }
-
- //Not a key event this case handles the menu and exit keys
- //when an invalid value is entered in the amount field
- if(aType == EEventKeyDown)
- {
- if( ( EConverterEditor1 == controlId )||
- ( EConverterEditor2 == controlId ) )
- {
-
- if( (aKeyEvent.iScanCode == EStdKeyDevice0) ||//menu Key
- (aKeyEvent.iScanCode == EStdKeyDevice1) )//Exit key
- {
- if( EditorValueCausesHold( controlId ) ||
- !IsVaildNumberEntered( controlId ) )
- {
- SetFloatEditorValueL( controlId, 0.0);
- }
- //return EKeyWasNotConsumed;
- }
- }
- }
-
- if ( aType != EEventKey )
- {
- // Return EKeyWasNotConsumed if OfferKeyEventL() does not handle any event.
- return EKeyWasNotConsumed;
- }
-
- if( ( EConverterEditor1 == controlId )||
- ( EConverterEditor2 == controlId ) )
- {
- //Just to see that -9E-99 doesnt appear when an invalid number is editor is
- //entered in the editor
-
- if(aKeyEvent.iScanCode == EStdKeyUpArrow ||
- aKeyEvent.iScanCode == EStdKeyDownArrow )
- {
- CancelConversion();
- if( EditorValueCausesHold( controlId ) )
- {
- SetFloatEditorValueL( controlId, 0.0);
- }
- if( !IsVaildNumberEntered( controlId ) )
- {
- ShowInvalidValueNoteL( controlId );
- }
- }
-
- iLastUsedEditorId = controlId;
-
- //For arrow keys asynchronous conversion not required
- // if (iActiveEditorChanged)
- // {
- /*if( ( aKeyEvent.iScanCode != EStdKeyRightArrow )&&
- ( aKeyEvent.iScanCode != EStdKeyLeftArrow )&&
- ( aKeyEvent.iScanCode != EStdKeyUpArrow )&&
- ( aKeyEvent.iScanCode != EStdKeyDownArrow )&&
- ( isEditKey == EFalse ) )
- {
- AsynchronousConversion();
- }*/
- //}
-
- //iActiveEditorChanged = ETrue;
-
- }
- return CAknForm::OfferKeyEventL(aKeyEvent, aType);
-
- }
-
-
-// ----------------------------------------------------
-// CCnvMainForm::IsVaildNumberEntered
-// Checks if a valid number is entered in the editor field and returns
-// ETrue if a vaild number is entered and
-// EFalse if an invalid number is entered
-// ----------------------------------------------------
-//
-
-TBool CCnvMainForm::IsVaildNumberEntered( TInt aEditorId )
- {
- CEikFloatingPointEditor* editor =
- static_cast< CEikFloatingPointEditor* >( Control( aEditorId ) );
-
- if ( editor->TextLength() == 0 )
- {
- return EFalse;
- }
-
- TReal real;
- CAknNumericEdwin::TValidationStatus validationStatus = editor->GetValueAsReal( real );
-
- // The enter number is not valid if GetValueAsReal function's return value is not EValueValid
- if ( validationStatus != CAknNumericEdwin::EValueValid /*&& validationStatus != CAknNumericEdwin::EValueTooLarge*/ )
- {
- return EFalse;
- }
- return ETrue;
- }
-
-
-
-// ----------------------------------------------------
-// CCnvMainForm::HandleEdwinEventL
-// Checks the Navigation events on the editor
-// ----------------------------------------------------
-//
-
-void CCnvMainForm::HandleEdwinEventL(CEikEdwin* /*aEdwin*/,TEdwinEvent aEventType)
- {
- if(EEventNavigation == aEventType)
- {
- isEdwinNavigated = ETrue;
- }
- if( aEventType == EEventTextUpdate )
- {
- isEdwinUpdateText = ETrue;
- }
-
- }
-
-// ----------------------------------------------------
-// CCnvMainForm::IsDigit
-// Converts the digit from any digit mode (devangiri or arabic)
-// to western digit and checks whether it is a valid digit or not.
-// ----------------------------------------------------
-//
-TBool CCnvMainForm::IsDigit(TUint aChar)
- {
- TBuf<1> digit;
- digit.Append(aChar);
-
- AknTextUtils::ConvertDigitsTo(digit , EDigitTypeWestern);
-
- TChar ch = digit[0];
- return ch.IsDigit();
- }
-
-// ----------------------------------------------------
-// CCnvMainForm::PrepareForFocusTransitionL
-// The Uikon framework calls this function immediately before focus move.
-// ----------------------------------------------------
-//
-void CCnvMainForm::PrepareForFocusTransitionL()
- {
- TInt controlId( IdOfFocusControl() );
- if ( ( EConverterEditor1 == controlId ) || ( EConverterEditor2 == controlId ) )
- {
-
- // record the last use editor id
- iLastUsedEditorId = controlId;
- CancelConversion();
- if ( EditorValueCausesHold( controlId ) )
- {
- SetFloatEditorValueL( controlId, 0.0 );
- }
-
- // Delete the radix point when there is no number behind it.
- else if ( IsVaildNumberEntered( controlId ) )
- {
- CEikFloatingPointEditor* editor =
- static_cast<CEikFloatingPointEditor*> ( Control( controlId ) );
- TBuf<KEditorTextMaxLength> editorText;
- editor->GetText( editorText );
- TLocale locale;
- TInt editorLength = editorText.Length();
-
- // Check if the last character is radix point.
- if ( editorText[ editorLength - 1 ] == locale.DecimalSeparator() )
- {
- editorText.Delete( editorLength - 1, 1 );
- editor->SetTextL( &editorText );
- }
- }
- }
- }
-
-// ----------------------------------------------------
-// CCnvMainForm::ValueCalculation
-// Do the calculation and change the value for the related edit field
-// ----------------------------------------------------
-//
-void CCnvMainForm::ValueCalculationL( TUint aUnit1Popup, TUint aUnit2Popup, TReal aMount )
- {
- TReal result( 0.0 );
- // Use "LastUnit1" and "LastUnit2" to insure that the second amount don't change if the last used editor
- // is the second and the category's units do not change.
- static TInt LastUnit1 = -1;
- static TInt LastUnit2 = -1;
-
- // According to the UI Spec:
- // 1. If the first conversion unit field is changed, a new conversion is calculated to the
- // second amount field of units, or vice versa.
- // 2. If the first edit field is changed, a new conversion is calculated to the second
- // edit field, or vice versa.
- if ( iLastUsedEditorId == EConverterEditor1 )
- {
- //the first unit is changed
- if ( ( ( IdOfFocusControl() != EConverterEditor1 ) && ( LastUnit1 != aUnit1Popup ) )
- || ( IdOfFocusControl() == EConverterTypePopup ) )
- {
- aMount = FloatingPointEditorValue( EConverterEditor1 );
- result = iUnit1Category.Convert( aUnit1Popup, aUnit2Popup, aMount );
- SetFloatEditorValueL( EConverterEditor2, result );
- }
- //the second unit is changed
- else if ( ( IdOfFocusControl() != EConverterEditor1 ) && ( LastUnit2 != aUnit2Popup ) )
- {
- aMount = FloatingPointEditorValue( EConverterEditor2 );
- result = iUnit1Category.Convert( aUnit2Popup, aUnit1Popup, aMount );
- SetFloatEditorValueL( EConverterEditor1, result );
- }
- //the first amount field is changed
- else
- {
- result = iUnit1Category.Convert( aUnit1Popup, aUnit2Popup, aMount );
- SetFloatEditorValueL( EConverterEditor2, result );
- }
- }
- else
- {
- //the first unit is changed
- if ( ( ( IdOfFocusControl() != EConverterEditor2 ) && ( LastUnit1 != aUnit1Popup ) )
- || ( IdOfFocusControl() == EConverterTypePopup ))
- {
- aMount = FloatingPointEditorValue( EConverterEditor1 );
- result = iUnit1Category.Convert( aUnit1Popup, aUnit2Popup, aMount );
- SetFloatEditorValueL( EConverterEditor2, result );
- }
- //the second unit is changed
- else if ( ( IdOfFocusControl() != EConverterEditor2 ) && ( LastUnit2 != aUnit2Popup ) )
- {
- aMount = FloatingPointEditorValue( EConverterEditor2 );
- result = iUnit1Category.Convert( aUnit2Popup, aUnit1Popup, aMount );
- SetFloatEditorValueL( EConverterEditor1, result );
- }
- //the second amount field is changed
- else
- {
- result = iUnit1Category.Convert( aUnit2Popup, aUnit1Popup, aMount );
- SetFloatEditorValueL( EConverterEditor1, result );
- }
- }
-
- // record units of the category at this time.
- LastUnit1 = aUnit1Popup;
- LastUnit2 = aUnit2Popup;
- }
-//End of file
--- a/extras/converter/Ui/Src/CCnvMainForm.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,395 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* An AVKON form class containing popup fields and floating point editors.
-* Implements the 'Main State' of the application.
-*
-*/
-
-
-
-#ifndef __CCNVMAINFORM_H__
-#define __CCNVMAINFORM_H__
-
-// INCLUDES
-#include <AknForm.h>
-#include <TCnvCategory.h>
-
-//Select Edwin
-#include <eikedwob.h>
-
-
-// FORWARD DECLARATIONS
-class CCnvConverter;
-class CAknPopupField;
-class CErrorUI;
-
-// CLASS DEFINITION
-/**
-* An AVKON form class containing popup fields and floating point editors.
-* Implements the 'Main State' of the application.
-*/
-class CCnvMainForm : public CAknForm , public MEikEdwinObserver
- {
-
- public: // constructors and destructor
-
- /**
- * Default constructor.
- */
- CCnvMainForm( TBool &aAlreadyDead );
-
- /**
- * Destructor.
- */
- ~CCnvMainForm();
-
- /**
- * 2nd phase constructor.
- */
- void ConstructL();
-
- private: // constructors
-
- /**
- * Default constructor. Not implemented.
- */
- CCnvMainForm();
-
- public: // from CCoeControl
-
- /**
- * Specifies the help context for this form.
- * @param aContext the context IDs are placed here
- */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- public: // from MEikCommandObserver
-
- /**
- * Handles menu commands.
- * @param aCommandId Command identifier.
- */
- void ProcessCommandL( TInt aCommandId );
-
- public: // from MEikDialogPageObserver
-
- /**
- * Takes any action required when the current line is
- * changed to aControlId.
- * @param aControlId Control identifier.
- */
- void LineChangedL( TInt aControlId );
-
- public: // from MEikMenuObserver
-
- /**
- * Dynamically initialises a menu pane. The Uikon framework calls this
- * function, immediately before the menu pane is activated.
- * @param aResourceId Resource ID identifying a menu pane to initialise
- * @param aMenuPane The in-memory representation of the menu pane.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- protected: // from MCoeControlObserver
-
- /**
- * Handles an event originating from one of the form's controls.
- * @param aControl The control that reported the event.
- * @param aEventType The type of the reported event.
- */
- void HandleControlEventL( CCoeControl* aControl,
- TCoeEvent aEventType );
-
- protected: // from CAknForm
-
- /**
- * Saves form popup field states to a file (not implemented, yet).
- * @return ETrue if the editable state can be left
- * (always in this case).
- */
- TBool SaveFormData();
-
- /**
- * Deal with that the field is empty,when move focus to other field.
- * The Uikon framework calls this function,immediately before focus move.
- */
- void PrepareForFocusTransitionL();
- protected: // from CEikDialog
-
- /**
- * Tests if it is OK to exit the dialog.
- * @param aButtonId The ID of the button that was activated.
- * @return ETrue to validate and exit the dialog,
- * EFalse to keep the dialog active.
- */
- TBool OkToExitL( TInt aButtonId );
-
- /**
- * Pre-layout dialog initialisation.
- */
- void PreLayoutDynInitL();
-
- private: // new methods
- /**
- * returns ETrue if the the character is an integer
- */
- TBool IsDigit(TUint aChar);
-
- /**
- * Checks if a form control has REALLY changed (uses history knowledge)
- * Form controls report bogus state changed events, this is used to
- * filter them out.
- * @param controlId Form ID of the control to be checked
- * @return ETrue if the specified control's state has changed
- */
- TBool HasReallyChanged( TInt controlId );
-
- /**
- * Initialised change history (for HasReallyChanged)
- */
- void InitialiseChangeHistory();
-
- /**
- * Called when the user has changed
- * the unit type popup field selection.
- */
- void HandleCategoryChangedL();
-
- /**
- * Called when the user has changed
- * either of the unit popup field selections.
- */
- void HandleUnitChangedL();
-
- /**
- * Checks if the unit rates (factors) are defined in the model
- * for the currently selected unit type.
- * @param aShowNote If ETrue "rates missing note" is shown, if
- * rates are not valid.
- * @return ETrue if rates are valid, EFalse otherwise.
- */
- TBool AreRatesValidL(TBool aShowNote);
-
- /**
- * Checks if a floating point editor's value is within allowable range.
- * @param aEditorId Resource ID of the editor control to be checked.
- * @return ETrue If value is in range, EFalse otherwise.
- */
- TBool IsEditorValueValidL( TUint aEditorId );
-
- /**
- * Checks if a floating point editor's value is such that no conversion
- * should be made and no "invalid value" error should be reported.
- * @param aEditorId Resource ID of the editor control to be checked.
- * @return ETrue Indicates that conversion should not proceed.
- */
- TBool EditorValueCausesHold( TUint aEditorId );
-
- /**
- * Handles the ECmdRates command. Launches the Rates Form.
- */
- void CmdRatesL();
-
- /**
- * Handles the ECmdSetType command.
- */
- void CmdSetTypeL();
-
- /**
- * Handles the ECmdSetUnit command.
- */
- void CmdSetUnitL();
-
- /**
- * Tells the model to load its state from a file.
- */
- void LoadStateL();
-
- /**
- * Tells the model to save its state to a file.
- * Displays an error note if there is not enough space in permanent
- * storage.
- */
- void SaveState();
-
- /**
- * Calculates and displays the unit conversion immediately.
- */
- void SynchronousConversionL( TBool aShowRateInvalidNote = ETrue );
-
- /**
- * Calculates and displays the unit conversion after 0.75 seconds.
- */
- void AsynchronousConversion();
-
- /**
- * Cancels a queued asynchronous conversion request, if any.
- */
- void CancelConversion();
-
- /**
- * Called by the conversion timer after the 0.75 second timeout
- * has exipred. Calls SynchronousConversion() to do
- * the actual conversion.
- * @param aMainForm Pointer to the CCnvMainForm instance.
- */
- static TInt TimerCallback( TAny* aMainForm );
-
- /**
- * Shows an error note for invalid value situation
- * @param aEditorId Id of the editor that holds the invalid value
- */
- void ShowInvalidValueNoteL(TInt aEditorId);
-
- /**
- * From CCoeControl processing of a key event
- * @param aKeyEvent : Key event information
- * aType : EEventKeyDown | EEventKey | EEventKeyUp
- * @return : EKeyWasConsumed if keyevent is consumed.
- * EKeyWasNotConsumed if keyevent is not consumed.
- * Handling of the keys is taken care for the editor fields
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
- TEventCode aType);
-
- /**
- *Checks if the number entered in the editor field is a valid number
- *@param aEditroId : Id of the editor that needs to be evaluated
- *@return : EFalse if the editor value is not a vaild number
- * : ETrue if the number is a valid number
- */
- TBool IsVaildNumberEntered(TInt aEditorId);
-
- /**
- *From MEikEdwinObserver. handles the Navigation on the editor control.
- */
- void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType);
-
- /**
- *Do the calculation and change the value for the related edit field
- */
- void ValueCalculationL( TUint aUnit1Popup, TUint aUnit2Popup, TReal aMount );
-
- private: // data
-
- /**
- * Pointer to our model. Owned.
- */
- CCnvConverter* iModel;
-
- /**
- * Model accessor for unit types.
- */
- TCnvCategory iTypeCategory;
-
- /**
- * Model accessor for source units.
- */
- TCnvCategory iUnit1Category;
-
- /**
- * Model accessor for destination units.
- */
- TCnvCategory iUnit2Category;
-
- /**
- * Pointer to the Unit Type popup field. Not owned.
- */
- CAknPopupField* iTypePopupCtrl;
-
- /**
- * Pointer to the source Unit popup field. Not owned.
- */
- CAknPopupField* iUnit1PopupCtrl;
-
- /**
- * Pointer to the destination Unit popup field. Not owned.
- */
- CAknPopupField* iUnit2PopupCtrl;
-
- /**
- * Id of the currency category in the model.
- */
- TUint iCurrencyCategoryId;
-
- /**
- * ETrue if this instance is fully constructed, EFalse otherwise.
- */
- TBool iIsFullyConstructed;
-
- /**
- * ETrue if the user has already been notified that the disk is full.
- */
- TBool iHasNotifiedDiscFull;
-
- /**
- * ETrue if the iLastUsedEditorId has changed after the focus
- * has entered the editor.
- */
- TBool iActiveEditorChanged;
-
- /**
- * Pointer to the timer used for asynchronous conversions
- * (which need a0.75 second delay..)
- */
- CPeriodic* iConversionTimer;
-
- /**
- * The id of the unit amount field that the user has modified last.
- */
- TInt iLastUsedEditorId;
-
- /**
- * The id of the line that was last active in the form.
- */
- TInt iLastActiveEditorLine;
-
- /**
- * The previous type selection.
- */
- TInt iHistoryTypeCategory;
-
- /**
- * The previous source unit selection.
- */
- TInt iHistoryUnit1Category;
-
- /**
- * The previous destination unit selection.
- */
- TInt iHistoryUnit2Category;
-
- /**
- * Pointer to the Error UI object. Owned
- * Used for displaying the Disk Full error message.
- */
- CErrorUI* iErrorUI;
-
- /**
- * Reference to a flag in this form's owner.
- * Used to indicate that we have been deleted by someone
- * (could be the app framework.. <sigh>)
- */
- TBool& iAlreadyDead;
-
- TKeyEvent iKeyEvent;
-
- TBool isEdwinNavigated;
- TBool isEdwinUpdateText;
-
- };
-
-#endif // __CCNVMAINFORM_H__
-
--- a/extras/converter/Ui/Src/CCnvRatesForm.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,844 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in CCnvRatesForm.h
-*
-*/
-
-
-
-#include <eikcapc.h>
-#include <eikfpne.h>
-#include <AknQueryDialog.h>
-#include <aknnotewrappers.h>
-#include <akntitle.h>
-#include <StringLoader.h>
-#include <featmgr.h>
-#include <eikmenup.h>
-
-#include <TCnvCategory.h>
-#include "CCnvRatesForm.h"
-#include "CCnvApplication.h"
-
-#include <csxhelp/cnv.hlp.hrh>
-
-#include <Converter.rsg>
-#include "Converter.hrh"
-
-#include <e32math.h> //Header to be included for getting CEikEdwin Text to a number
-
-//CONSTANTS for Max Number of Added Currency
-const TInt KMaxNumberAddCurrency = 40;
-
-CCnvRatesForm::CCnvRatesForm( TBool* aWantsRelaunch, TBool* aShouldExit,
- TBool* aModelChanged, TCnvCategory& aCategory )
- : iWantsRelaunch( aWantsRelaunch ), iShouldExit( aShouldExit ),
- iModelChanged( aModelChanged ), iCategory( aCategory ),
- iLastUsedEditorId(-1)
- {
- }
-
-CCnvRatesForm::CCnvRatesForm()
- {
-
- //Member variable set to False in the Constructor
- iEKeyOk = EFalse;
- }
-
-CCnvRatesForm::~CCnvRatesForm()
- {
- iFormIdMapArray.Close();
- iFormIdEdwinMapArray.Close();
- SetDefaultTitle();
- }
-
-void CCnvRatesForm::ConstructL()
- {
- // Use base class to construct menubar
- CAknDialog::ConstructL( R_CNV_RATESFORM_MENUBAR );
- iCategory.CreateTempUnitArrayForRestore();
- iCategory.GetDefaultUnits( iSrcUnitIndexForRestore , iDesUnitIndexForRestore );
- iHistoryBaseUnit = iCategory.BaseUnit();
- }
-
-void CCnvRatesForm::GetHelpContext( TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KUidCnv;
- aContext.iContext = KCNV_HLP_RATES;
- }
-
-void CCnvRatesForm::ProcessCommandL( TInt aCommandId )
- {
- // Base class handles EAknFormCmdSave among the other things
- CAknForm::ProcessCommandL( aCommandId );
-
- switch ( aCommandId )
- {
- case ECmdAddCurrency:
- {
- AddNewCurrencyL();
- break;
- }
- case ECmdDeleteCurrency:
- {
- DeleteCurrencyL();
- break;
- }
- case ECmdChangeCurrencyName:
- {
- CmdChangeCurrencyNameL();
- break;
- }
- case ECmdSetAsBaseCurrency:
- {
- CmdSetAsBaseCurrencyL();
- break;
- }
- case EAknCmdHelp:
- {
- iEikonEnv->EikAppUi()->HandleCommandL( EAknCmdHelp );
- break;
- }
- case EEikCmdExit:
- {
- *iShouldExit = ETrue;
- TryExitL( EAknSoftkeyBack );
- break;
- }
- default:
- {
- break;
- }
- }
- }
-
-// Takes any action required when the current line is changed to aControlId.
-void CCnvRatesForm::LineChangedL( TInt aControlId )
- {
-
- CEikFloatingPointEditor* editor =
- static_cast< CEikFloatingPointEditor* >( Control( aControlId ) );
-
- //editor->ClearSelectionL();
- editor->SetCursorPosL( editor->Text()->DocumentLength(), ETrue );
-
- if ( iLastUsedEditorId > 0 )
- {
- editor =static_cast<CEikFloatingPointEditor*> ( Control( iLastUsedEditorId ) );
- TBuf<KEditorTextMaxLength> editorText;
- editor->GetText( editorText );
-
- // Use local value for different area
- TBuf<1> localeZero;
- localeZero.AppendNum( 0 );
- AknTextUtils::LanguageSpecificNumberConversion( localeZero );
- if ( editorText.Length() > 1 && editorText[0] == localeZero[0] )
- {
- // remove all leading zeroes
- while ( editorText.Length() > 0 && editorText[0] == localeZero[0] )
- {
- editorText.Delete( 0, 1 );
- }
- // if too many zeroes removed, insert one.
- TLocale locale;
- if ( editorText.Length() == 0 ||
- TChar( editorText[0] ) == locale.DecimalSeparator() )
- {
- editorText.Insert( 0, localeZero );
- }
- editor->SetTextL( &editorText );
- editor->DrawDeferred();
- }
- }
- iLastUsedEditorId = aControlId;
- }
-
-void CCnvRatesForm::DoNotSaveFormDataL()
- {
- iCategory.RestoreUnitArray();
- iCategory.SetDefaultUnits( iSrcUnitIndexForRestore , iDesUnitIndexForRestore );
- iCategory.SetBaseUnit( iHistoryBaseUnit );
- }
-
-// Saves values from form fields back to the model
-TBool CCnvRatesForm::SaveFormDataL()
- {
- SetEditableL( ETrue );
-
- const MDesCArray* names = iCategory.MdcArray();
- TInt len( names->MdcaCount() );
- TInt formIdIndex = 0;
- for( TInt i = 0; i < len; i ++ )
- {
-
- if( i != iCategory.BaseUnit() )
- {
- TInt formId = iFormIdMapArray[formIdIndex];
- //A seperate formIdIndex is maintained for the form as iFormIdMapArray
- //does not have an index for Base Unit
- formIdIndex++;
-
- TReal value = 0; //Contains the value of the editor
-
- if(KErrNotFound != iFormIdEdwinMapArray.Find(formId))
- {
- TBuf<32> edText;
- GetEdwinText( edText, formId );
- TInt64 power = 1;
- TBool fraction = EFalse;
- TChar ch;
-
- for(TInt i = 0; i < edText.Length(); i++)
- {
- ch = edText[i];
-
- if(ch == '+')
- {
- if( i != 0 )
- {
- value = 0;
- break;
- }
- }
-
- else if(ch == '.')
- {
- fraction = ETrue;
- }
- else if(IsDigit(ch))
- {
- value = value * 10 + ch.GetNumericValue();
- if(fraction)
- {
- power = power * 10;
- }
- }
- }
- value = value / power;
-
- }
- else
- {
- value = FloatEditorValue( formId );
- }
- iCategory.SetUnitFactor( i, /*FloatEditorValue( formId )*/value );
- }
- }
-
- *iModelChanged = ETrue;
- return ETrue;
- }
-
-// Sets the focus to the topmost line of the form when the dialog is activated
-void CCnvRatesForm::SetInitialCurrentLine()
- {
- CEikDialog::SetInitialCurrentLine();
- TRAP_IGNORE(TryChangeFocusToL( IdOfFocusControl() ) );
- }
-
-void CCnvRatesForm::PreLayoutDynInitL()
- {
- SetTitleL( ETrue );
-
- const MDesCArray* currencies = iCategory.MdcArray();
- TInt len( currencies->MdcaCount() );
-
- for( TInt i = 0; i < len; i++ )
- {
- if( i != iCategory.BaseUnit() )
- {
- // form controls don't like id = 0, so we need to do id += 1..
- CCoeControl* control =
- CreateLineByTypeL( currencies->MdcaPoint( i ),
- ActivePageId(),
- i + 1,
- EEikCtFlPtEd,
- NULL );
- //Keep the id's of the form in an array so that deletion based on form ids is not a problem.
- iFormIdMapArray.Append(i+1);
- CEikFloatingPointEditor* editor =
- static_cast< CEikFloatingPointEditor* >( control );
- editor->ConstructL( 0, 9e99, 12 ); // 9e99 = max TReal
- TReal value( iCategory.UnitFactor( i ) );
- editor->SetValueL( &value );
- }
- }
- }
-
-void CCnvRatesForm::CmdChangeCurrencyNameL()
- {
- // 16 is long enough, current edit window max length is 13
- // (defined in R_CNV_UNITNAME_QUERY )
- TBuf< 16 > newName;
- TBool nameOk( EFalse );
-
- TInt controlId = IdOfFocusControl();
- TInt index = controlId - 1;
-
- index = iFormIdMapArray.Find( controlId ); //get the index where the id i
-
- TUint uintindex = index ;//To remove warnings
-
- if( uintindex >= iCategory.BaseUnit())
- {
- index++;
- }
- const MDesCArray* names = iCategory.MdcArray();
- newName.Copy( names->MdcaPoint( index ).Left( MAXCURRENCYNAMELENGTH ) );
-
-
- TCurrencyType type = NewCurrencyNameDialogL( newName, nameOk );
-
- if(nameOk)
- {
- iCategory.SetUnitName( index , newName , type);
- Line( controlId )->SetCaptionL( newName );
- Line( controlId )->DrawDeferred();
- nameOk = ETrue;
- *iModelChanged = ETrue;
- }
- }
-
-
-void CCnvRatesForm::CmdSetAsBaseCurrencyL()
- {
- CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-
- if( dlg->ExecuteLD( R_CNV_CONFIRMATION_QUERY ) )
- {
- // form controls don't like ID = 0, so IDs are unit id + 1;
- TInt baseUnit;
- TUint baseUnitIndex; //To remove warnings
- //Get the current id of the form.
- TInt currentFocusIndex = IdOfFocusControl();
- //Find the id in the map array
- baseUnit = iFormIdMapArray.Find(currentFocusIndex);
- baseUnitIndex = baseUnit; //To remove warnings
- //adjust the baseUnitIndxex to the index in the Currency Category array..
- if( baseUnitIndex >= iCategory.BaseUnit())
- {
- baseUnit++;
- }
- iHistoryBaseUnit = baseUnit;
- iCategory.SetBaseUnit( baseUnit );
-
- // Reset all currency rates to 1
- TInt len( iCategory.MdcArray()->MdcaCount() );
- for( TInt i = 0; i < len; i++ )
- {
- iCategory.SetUnitFactor( i, 1.0 );
- }
-
- // Except the base unit factor is set to 1.0
- iCategory.SetUnitFactor( baseUnit, 1.0 );
-
- // We have to destroy and relaunch the form
- *iWantsRelaunch = ETrue;
- delete this;
- }
- }
-
-
-// Reset the title to default. Don't want a leave.
-// If it fails, it fails. For use in the destructor.
-void CCnvRatesForm::SetDefaultTitle()
- {
- TRAP_IGNORE(SetTitleL( EFalse ) );
- }
-
-void CCnvRatesForm::SetTitleL( TBool aNonDefault )
- {
- CAknTitlePane* title = static_cast< CAknTitlePane* >(
- iEikonEnv->AppUiFactory()->StatusPane()->
- ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-
- if( aNonDefault )
- {
- TInt baseUnit = iCategory.BaseUnit();
- const MDesCArray* currencies = iCategory.MdcArray();
- TPtrC unitName = currencies->MdcaPoint( baseUnit );
- // stuff it into the title text's placeholder
- HBufC* titleText = StringLoader::LoadL( R_CNV_RATESFORM_TITLE,
- unitName, iEikonEnv );
- TPtr titleTextPtr = titleText->Des();
- CleanupStack::PushL( titleText );
- AknTextUtils::DisplayTextLanguageSpecificNumberConversion(titleTextPtr);
- title->SetTextL( *titleText );
- CleanupStack::PopAndDestroy( titleText ); // titleText
- }
- else
- {
- title->SetTextToDefaultL();
- }
- }
-
-void CCnvRatesForm::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- //No delete option for more than two currencies
- const MDesCArray* names = iCategory.MdcArray();
- TInt count = names->MdcaCount();
-
- if (aResourceId == R_CNV_RATESFORM_MENUPANE)
- {
-
- if(count <= 2)
- {
- aMenuPane->SetItemDimmed(ECmdDeleteCurrency, ETrue);
-
- }
- else
- {
- aMenuPane->SetItemDimmed(ECmdDeleteCurrency, EFalse);
- }
- if(count >= KMaxNumberAddCurrency )
- {
- aMenuPane->SetItemDimmed(ECmdAddCurrency, ETrue);
- }
- else
- {
- aMenuPane->SetItemDimmed(ECmdAddCurrency, EFalse);
- }
- if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
- {
- aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
- }
- }
- }
-//New methods which will imlement add and delete currency implementation
-void CCnvRatesForm::AddNewCurrencyL()
- {
- //_LIT(KDefaultText,"Foreign");
- //TBuf<16> newFieldPtr;
- //newFieldPtr.Format(KDefaultText);
- HBufC* foreignText = StringLoader::LoadLC( R_QTN_CNV_FOREIGN,iEikonEnv );
- TBuf<16> newFieldPtr;
-
- newFieldPtr.Copy(foreignText->Left(MAXCURRENCYNAMELENGTH));
-
- TBool nameEntered(EFalse);
- TCurrencyType type = NewCurrencyNameDialogL( newFieldPtr, nameEntered, ETrue );
-
- TInt id = IdOfFocusControl(); //Get the focus controls id
- TInt index = iFormIdMapArray.Find(id); //get the index where the id i
- TInt indexOfCurrency = index;
- TUint uintindex = indexOfCurrency;//To remove warnings
-
- if( uintindex >= iCategory.BaseUnit())
- {
- indexOfCurrency++;
- }
-
- if(nameEntered)//Dont add any field if the user cancels the dialog
- {
- TReal real = 1.0;
-
- iCategory.AddNewCurrencyL( indexOfCurrency + 1, newFieldPtr, real, type);
-
- //TInt newItemId = 0;
- TInt newItemId = iFormIdMapArray[0];
-
- //Get the largest formId present now in the form...
- for(TInt i = 0; i < iFormIdMapArray.Count() ; i++ )
- {
- if( newItemId < iFormIdMapArray[i])
- newItemId = iFormIdMapArray[i];
- }
-
- newItemId++;
-
- //Update the new FormId into the form id map array
- if( index + 1 < iFormIdMapArray.Count() )
- {
- iFormIdMapArray.Insert(newItemId,index + 1 );
- }
- else
- {
- iFormIdMapArray.Append(newItemId);
- }
-
- //Update the arrray which holds the CEikEdwin ids...
- iFormIdEdwinMapArray.Append(newItemId);
-
-
- CCoeControl* control = CreateLineByTypeL(newFieldPtr, ActivePageId(),
- newItemId , EEikCtFlPtEd, NULL ) ;
- CEikEdwin* edwin = STATIC_CAST( CEikEdwin*, control );
-
- CEikFloatingPointEditor* fpEditor = STATIC_CAST(
- CEikFloatingPointEditor*, control );
- fpEditor->SetMinMax( 0, 9e99 );
- edwin->ConstructL( EEikEdwinNoHorizScrolling | EEikEdwinResizable, 10, 12, 10 );
- edwin->SetAknEditorNumericKeymap( EAknEditorConverterNumberModeKeymap );
-
- edwin->SetAknEditorAllowedInputModes( EAknEditorNumericInputMode );
-
- edwin->SetAknEditorInputMode( EAknEditorNumericInputMode );
- edwin->SetAknEditorSpecialCharacterTable( 0 );
-
- edwin->CreateTextViewL();
- Line( newItemId )->ActivateL();
-
- // Set the editor's value at last and use a number instead of the fixed character.
- SetFloatEditorValueL( IdOfFocusControl(), 1 );
-
- *iModelChanged = ETrue;
- }
- CleanupStack::PopAndDestroy(); // foreignText HBufC
- }
-
-
-void CCnvRatesForm::DeleteCurrencyL()
- {
-
-
- TInt LineForDeletion = IdOfFocusControl();
-
- TInt indexOfCurrency = iFormIdMapArray.Find(LineForDeletion);
- TUint index = indexOfCurrency; //To remove warnings
-
-
- if( index >= iCategory.BaseUnit())
- {
- indexOfCurrency++;
- }
-
- const MDesCArray* names = iCategory.MdcArray();
-
- TBuf<16> currentName;
- currentName.Copy( names->MdcaPoint( indexOfCurrency ).Left( MAXCURRENCYNAMELENGTH ) );
-
- HBufC* confirmDelete = StringLoader::LoadLC(
- R_QTN_CNV_CONFIRM_DELETE,currentName);
-
- CAknQueryDialog* dlg = CAknQueryDialog::NewL();
- dlg->SetPromptL( *confirmDelete);
-
- if( dlg->ExecuteLD( R_CNV_CONFIRMATION_QUERY ) )
- {
- SetFormFlag( EDeleting, ETrue );
-
- if (LineForDeletion)
- {
- iCategory.DeleteCurrencyL( indexOfCurrency );
- DeleteLine(LineForDeletion);
- //SetFormFlag( EUnsavedEdit, ETrue );
- TInt index = iFormIdMapArray.Find(LineForDeletion);
- iFormIdMapArray.Remove(index);
-
- if( index == iFormIdMapArray.Count())
- {
- iLastUsedEditorId = iFormIdMapArray[index - 1];
- }
- else
- {
- iLastUsedEditorId = iFormIdMapArray[index];
- }
- }
-
- DrawNow();
- SetFormFlag( EDeleting, EFalse );
- *iModelChanged = ETrue;
- }
- CleanupStack::PopAndDestroy(); // confirmDelete;
- }
-
-//This function launches a dialog to get the new currency name.
-//Note can also be used for Rename Currency, but will be made use, afte the raised for that has been fixed
-TCurrencyType CCnvRatesForm::NewCurrencyNameDialogL( TDes& aField, TBool& aNameEntered, TBool aIsAddNewCurrency )
- {
- TBool nameOk( EFalse );
- TCurrencyType type = ENameChanged;
- //TInt index = IdOfFocusControl() - 1;
- TInt controlId = IdOfFocusControl();
- TInt index = iFormIdMapArray.Find( controlId ); //get the index where the id i
- TUint uintindex = index ; //To remove warnings
- if ( uintindex >= iCategory.BaseUnit() ) //get correct index
- {
- index++;
- }
-
- const MDesCArray* names = iCategory.MdcArray();
- do
- {
- CAknTextQueryDialog* dlg =
- new( ELeave ) CAknTextQueryDialog( aField );
- CleanupStack::PushL(dlg);
-
- if( dlg->ExecuteLD( R_CNV_UNITNAME_QUERY ) != EAknSoftkeyOk )
- {
- aNameEntered = EFalse;
- CleanupStack::Pop(dlg); // dlg
- return type;
- }
- CleanupStack::Pop(dlg); // dlg
-
- // Search through all the names to see if the new name already exists
- TInt len( names->MdcaCount() );
- TBool nameExists( EFalse );
- //Set the index larger than all when a new is added, make it compare with
- //all of the item to judge if the name is already used
- if ( aIsAddNewCurrency )
- {
- index = len;
- }
-
- for( TInt i = 0; i < len; i ++ )
- {
- if( names->MdcaPoint( i ).Compare( aField ) == 0 )
- {
- if ( i != index )
- {
- nameExists = ETrue;
- break;
- }
- }
- }
-
- if( nameExists )
- {
- // display error
- HBufC* label = StringLoader::LoadLC(
- R_QTN_FLDR_NAME_ALREADY_USED, aField );
- CAknErrorNote* note = new( ELeave ) CAknErrorNote( ETrue );
- note->ExecuteLD( *label );
- CleanupStack::PopAndDestroy(); // label;
- }
- else
- {
- nameOk = ETrue;
- }
- }
-
- while ( !nameOk );
-
- HBufC* homeText = StringLoader::LoadLC( R_QTN_CNV_HOME,iEikonEnv );
- HBufC* foreignText = StringLoader::LoadLC( R_QTN_CNV_FOREIGN,iEikonEnv );
- TBuf<16> defaultTextPtr;
- TBuf<16> homeTextPtr;
- TInt equal;
-
- defaultTextPtr.Copy(foreignText->Left(MAXCURRENCYNAMELENGTH));
- homeTextPtr.Copy(homeText->Left(MAXCURRENCYNAMELENGTH));
- equal = defaultTextPtr.Compare(aField);
- if(equal==0)
- type = EForeign;
-
- equal = homeTextPtr.Compare(aField);
- if(equal==0)
- type = EHome;
-
- aNameEntered = nameOk;
- CleanupStack::PopAndDestroy(); // foreignText HBufC
- CleanupStack::PopAndDestroy(); // HomeText HBufC
-
- return type;
- }
-//
-//ShowInvalidValueNoteL(TInt aEditorId)
-//
-void CCnvRatesForm::ShowInvalidValueNoteL(TInt aEditorId, TBool aSetValue)
- {
- HBufC* label = iCoeEnv->AllocReadResourceLC(
- R_CNV_MAINFORM_INVALIDVALUE );
- CAknErrorNote* note = new( ELeave ) CAknErrorNote(ETrue);
- note->ExecuteLD( *label );
- CleanupStack::PopAndDestroy(); // label;
- if ( aSetValue )
- {
- SetFloatEditorValueL( aEditorId, 0.0 );
- }
- }
-
-//
-//IsVaildNumberEntered(TInt aEditorId)
-//
-TBool CCnvRatesForm::IsVaildNumberEntered(TInt aEditorId)
- {
-
- CEikFloatingPointEditor* editor =
- static_cast< CEikFloatingPointEditor* >( Control( aEditorId ) );
-
- if( editor->TextLength() == 0 )
- {
- return EFalse;
- }
-
- TReal real;
- CAknNumericEdwin::TValidationStatus validationStatus = editor->GetValueAsReal(real);
-
- // The enter number is not valid if GetValueAsReal function's return value is not EValueValid
- if( validationStatus != CAknNumericEdwin::EValueValid /* && validationStatus != CAknNumericEdwin::EValueTooLarge */ )
- {
- return EFalse;
- }
- return ETrue;
-
- }
-
-
-TBool CCnvRatesForm::OkToExitL(TInt aButtonId)
- {
- //Check for validity of the rates entered
- TInt aControlId( IdOfFocusControl() );
- if(!IsVaildNumberEntered(aControlId))
- {
- ShowInvalidValueNoteL(aControlId, ETrue );
- }
- //Check which one of the two buttons'Options' or 'MSK' is pressed
- if (aButtonId == EAknSoftkeyOptions && iEKeyOk)
- {
- //Make the variable False
- iEKeyOk = EFalse;
- return EFalse;
- }
- else
- // Call the Base Class OkToExitL()
- return CAknForm::OkToExitL(aButtonId);
-
- }
-//
-//OfferKeyEventL
-//
-TKeyResponse CCnvRatesForm::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
-{
-
- // Make the variable 'iEKeyOk' to True if and only if MSK is pressed.
- if(aKeyEvent.iScanCode == EStdKeyDevice3 && aType == EEventKeyDown)
- {
- iEKeyOk = ETrue;
- }
- if(aKeyEvent.iScanCode == EStdKeyDevice0 && aType == EEventKeyDown && iEKeyOk)
- {
- iEKeyOk = EFalse;
- }
-
-
- TInt controlId1( IdOfFocusControl() );
- if(aType == EEventKeyDown)
- {
- if((aKeyEvent.iScanCode == EStdKeyDevice0)
- ||(aKeyEvent.iScanCode == EStdKeyDevice1)||(aKeyEvent.iScanCode == EStdKeyDevice3) )
- {
- if(!IsVaildNumberEntered(controlId1))
- {
- iError=ETrue;
- return EKeyWasConsumed;
- }
- }
- }
-
- if(aType == EEventKeyUp && iError)
- {
- if((aKeyEvent.iScanCode == EStdKeyDevice0)
- ||(aKeyEvent.iScanCode == EStdKeyDevice1)||(aKeyEvent.iScanCode == EStdKeyDevice3))
- {
- ShowInvalidValueNoteL(controlId1, ETrue);
- iError = EFalse;
- return EKeyWasConsumed;
- }
- }
-
- // Return EKeyWasNotConsumed if OfferKeyEventL() does not handle any event.
- if ( aType != EEventKey )
- {
- return EKeyWasNotConsumed;
- }
-
- if ( ( aKeyEvent.iScanCode == EStdKeyDownArrow ) || ( aKeyEvent.iScanCode == EStdKeyUpArrow ) )
- {
- TInt controlId( IdOfFocusControl() );
- if ( !IsVaildNumberEntered( controlId ) )
- {
- ShowInvalidValueNoteL( controlId, ETrue);
- return EKeyWasConsumed;
- }
- }
- return CAknForm::OfferKeyEventL( aKeyEvent, aType );
-}
-
-// ----------------------------------------------------
-// CCnvRatesForm::IsDigit
-// Converts the digit from any digit mode (devangiri or arabic)
-// to western digit and checks whether it is a valid digit or not.
-// ----------------------------------------------------
-//
-TBool CCnvRatesForm::IsDigit(TUint aChar)
- {
- TBuf<1> digit;
- digit.Append(aChar);
-
- AknTextUtils::ConvertDigitsTo(digit , EDigitTypeWestern);
-
- TChar ch = digit[0];
- return ch.IsDigit();
- }
-
-
-// ----------------------------------------------------
-// CCnvRatesForm::PrepareForFocusTransitionL
-// Used for touch UI to display the invalid note if number
-// is invalid
-// ----------------------------------------------------
-//
-void CCnvRatesForm::PrepareForFocusTransitionL()
- {
- // Check if touch is enabled or not
- if ( !AknLayoutUtils::PenEnabled() )
- {
- CAknForm::PrepareForFocusTransitionL();
- return;
- }
-
- // Get the focus of the current control line
- TInt controlId( IdOfFocusControl() );
- // Check for validity of the rate entered
- if (!IsVaildNumberEntered( controlId ) )
- {
- ShowInvalidValueNoteL(controlId, EFalse);
- }
-
- // Delete the radix point if it is excrescent
- else
- {
- CEikFloatingPointEditor* editor =
- static_cast<CEikFloatingPointEditor*> ( Control( controlId ) );
- TBuf< KEditorTextMaxLength > editorText;
- editor->GetText( editorText );
- TInt editorTextLength = editorText.Length();
- TLocale local;
- if ( editorText[ editorTextLength - 1 ] == local.DecimalSeparator() )
- {
- editorText.Delete( editorTextLength - 1 , 1 );
- editor->SetTextL( &editorText );
- }
- }
- CAknForm::PrepareForFocusTransitionL();
- }
-
-
-// ----------------------------------------------------
-// CCnvRatesForm::ActivateL
-// Sets the control as ready to be drawn.
-// ----------------------------------------------------
-//
-void CCnvRatesForm::ActivateL()
- {
- CAknForm::ActivateL();
- CEikFloatingPointEditor* editor =
- static_cast< CEikFloatingPointEditor* >( Control( IdOfFocusControl() ) );
- editor->SetCursorPosL( editor->Text()->DocumentLength(), ETrue );
- }
-//End of file
-
-
--- a/extras/converter/Ui/Src/CCnvRatesForm.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* An AVKON form class for changing unit names and factors (rates).
-* Used with currency units, but is not limited to them.
-* Implements the 'Rates State' of the application.
-*
-*/
-
-
-
-#ifndef __CCNVRATESFORM_H__
-#define __CCNVRATESFORM_H__
-
-// INCLUDES
-#include <AknForm.h>
-#include "CCnvConverter.h"
-// FORWARD DECLARATIONS
-class TCnvCategory;
-
-// CLASS DEFINITION
-/**
-* An AVKON form class for changing unit names and factors (rates).
-* Used with currency units, but is not limited to them.
-* Implements the 'Rates State' of the application.
-*/
-class CCnvRatesForm : public CAknForm
- {
-
- public: // Constructors and destructor
-
- /**
- * Constructor.
- * @param aWantsRelaunch Indicates to the caller if we want
- * to be relaunched.
- * @param aShouldExit Indicates to the caller if the application should
- * exit after this form has been closed.
- * @param aModelChanged Indicates to the caller that the model data
- * has changed and needs saving to permanent storage.
- * @param aCategory Unit category containing currencies.
- */
-
- CCnvRatesForm( TBool* aWantsRelaunch, TBool* aShouldExit,
- TBool* aModelChanged, TCnvCategory& aCategory );
-
- /**
- * Destructor.
- */
- ~CCnvRatesForm();
-
- /**
- * 2nd phase constructor.
- */
- void ConstructL();
-
- public: // from CCoeControl
-
- /**
- * Specifies the help context for this form.
- * @param aContext the context IDs are placed here
- */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- public: // from MEikCommandObserver
-
- /**
- * Handles menu commands.
- * @param aCommandId Command identifier.
- */
- void ProcessCommandL( TInt aCommandId );
-
- public: // from MEikDialogPageObserver
-
- /**
- * Takes any action required when the current line
- * is changed to aControlId.
- * @param aControlId Control identifier.
- */
- void LineChangedL( TInt aControlId );
-
- public: // from MEikMenuObserver
-
- /**
- * Dynamically initialises a menu pane. The Uikon framework calls this
- * function, immediately before the menu pane is activated.
- * @param aResourceId Resource ID identifying a menu pane to initialise
- * @param aMenuPane The in-memory representation of the menu pane.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- protected: // from CAknForm
-
- /**
- * Saves form data to model.
- * @return ETrue if the editable state can be left
- * (always in this case).
- */
- void DoNotSaveFormDataL();
- /**
- * Saves form data to model.
- * @return ETrue if the editable state can be left
- * (always in this case).
- */
- TBool SaveFormDataL();
- /**
- * Tests if it is OK to exit the dialog.
- * @param aButtonId The ID of the button that was activated.
- * @return ETrue to validate and exit the dialog,
- * EFalse to keep the dialog active.
- */
- TBool OkToExitL(TInt aButtonId);
- /**
- * Sets the focus to the topmost line of the form.
- * when the dialog is activated.
- */
- void SetInitialCurrentLine();
-
- /**
- * For Touch Ui implementation
- * To prepare for focus transition from the current line.
- */
- void PrepareForFocusTransitionL();
-
- protected: // from CEikDialog
-
- /**
- * Pre-layout dialog initialisation.
- * Populates from with floating point editor controls.
- */
- void PreLayoutDynInitL();
-
- private: // Constructors and destructor.
-
- /**
- * Default constructor, empty implementation.
- */
- CCnvRatesForm();
-
- /**
- * returns ETrue if the the character is an integer
- */
- TBool IsDigit(TUint aChar);
-
- private: // new methods
-
- /**
- * Handles the ECmdChangeCurrencyName command.
- */
- void CmdChangeCurrencyNameL();
-
- /**
- * Handles the ECmdSetAsBaseCurrency command.
- */
- void CmdSetAsBaseCurrencyL();
-
- /**
- * Changes the application title pane text to default.
- * Non-leaving.
- */
- void SetDefaultTitle();
-
- /**
- * Changes the application title pane text.
- * @param aNonDefault EFalse = set to default.
- */
- void SetTitleL( TBool aNonDefault );
-
- /**
- * Handles the Key events for the rates form
- * @param aKeyEvent : Key event information
- * aType : EEventKeyDown | EEventKey | EEventKeyUp
- * @return : EKeyWasConsumed if keyevent is consumed.
- * EKeyWasNotConsumed if keyevent is not consumed.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
- TEventCode aType);
-
-
- private: // data
-
- /**
- * Pointer to the flag in the caller object.
- * Used to indicate if we want to be relaunched after exit.
- */
- TBool* iWantsRelaunch;
-
- /**
- * Pointer to the flag in the caller object.
- * Used to indicate if the application should close after form exit.
- */
- TBool* iShouldExit;
-
- /**
- * Shows an error note for invalid value situation
- * @param aEditorId Id of the editor that holds the invalid value
- * @param aSetValue its value is ETrue or EFalse,
- * if aSetValue equals EFlase that does not set FloatEditor Value
- */
- void ShowInvalidValueNoteL(TInt aEditorId, TBool aSetValue);
-
- /**
- * Pointer to the flag in the caller object.
- * Used to indicate if the model data has changed and needs
- * saving to permanent storage.
- */
- TBool* iModelChanged;
-
- /**
- * Model accessor for the units displayed in this form.
- */
- TCnvCategory iCategory;
-
- private:
- /**
- *Implements the dialog to add a new currency OR rename a currency
- *@param aNewname indicates the text that should appear in the dialog as default
- *@param aPrompt indicates that title of the dialog
- *@param aIsAddNewCurrency if add a new currency aIsAddNewCurrency is ETrue,otherwise EFalsse
- */
- TCurrencyType NewCurrencyNameDialogL(TDes& aNewName,TBool& aNameEntered,TBool aIsAddNewCurrency = EFalse );
- /**
- * Adds new currency...
- */
- void AddNewCurrencyL();
- /**
- * Deletes the Currency (which is having focus)
- */
- void DeleteCurrencyL();
-
- /**
- *Checks if the number entered in the editor field is a valid number
- *@param aEditroId : Id of the editor that needs to be evaluated
- *@return : EFalse if the editor value is not a vaild number
- * : ETrue if the number is a valid number
- */
- TBool IsVaildNumberEntered(TInt aEditorId);
-
- /**
- *Sets the control as ready to be drawn.
- */
- void ActivateL();
-
- RArray<TInt> iFormIdMapArray; //Array which has the ids of the form..
- RArray<TInt> iFormIdEdwinMapArray; //Array which has the ids of the CEikEdwin editors in the form
- /*
- * Last active editor line.
- */
- TInt iLastUsedEditorId;
- TBool iEKeyOk;
- TBool iError;
-
- TUint iSrcUnitIndexForRestore;
- TUint iDesUnitIndexForRestore;
- TInt iHistoryBaseUnit;
-
- };
-
-#endif // __CCNVRATESFORM_H__
-
--- a/extras/converter/Ui/Src/Converter.hrh Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* Defines commands and control identifiers.
-* The file can be included in C++ or resource file.
-*
-*/
-
-
-
-#ifndef __CONVERTER_HRH__
-#define __CONVERTER_HRH__
-
-enum TMaxValues
- {
- KEditorTextMaxLength = 12
- };
-
-enum TConverterCommands
- {
- ECmdSetUnit = 100, // Don't override UIKON IDs..
- ECmdSetCurrency,
- ECmdSetType,
- ECmdRates,
- ECmdChangeCurrencyName,
- ECmdSetAsBaseCurrency,
- ECmdAddCurrency,
- ECmdDeleteCurrency
- };
-
-enum TConverterDlgCtrlIds
- {
- EConverterTypePopup = 1, // Dialogs don't like zero IDs..
- EConverterUnit1Popup,
- EConverterEditor1,
- EConverterUnit2Popup,
- EConverterEditor2,
- EConverterNote,
- EConverterDummy
- };
-
-#define MAXCURRENCYNAMELENGTH 13
-
-enum TConverterUnitIds
- {
- EAreaItemAcres = 1,
- EAreaItemAres,
- EAreaItemHectares,
- EAreaItemSqCm,
- EAreaItemSqFeet,
- EAreaItemSqInches,
- EAreaItemSqKm,
- EAreaItemSqMetres,
- EAreaItemSqMiles,
- EAreaItemSqMm,
- EAreaItemSqYards,
- EEnergItemCalor,
- EEnergItemElecVol,
- EEnergItemHrsPwH,
- EEnergItemJoules,
- EEnergItemKCalor,
- EEnergItemKJoules,
- EEnergItemKwH,
- ELengthItemCm,
- ELengthItemFeet,
- ELengthItemInches,
- ELengthItemKm,
- ELengthItemMetres,
- ELengthItemMiles,
- ELengthItemMm,
- ELengthItemNm,
- ELengthItemYards,
- EMassItemGrams,
- EMassItemKilograms,
- EMassItemMTons,
- EMassItemMilgrams,
- EMassItemOunces,
- EMassItemPounds,
- EMassItemStones,
- EPowerItemHorsepwr,
- EPowerItemKWatts,
- EPowerItemWatts,
- EPressureItemAthm,
- EPressureItemBars,
- EPressureItemMmhg,
- EPressureItemPasc,
- ETempItemCelsius,
- ETempItemFahrenh,
- ETempItemKelvin,
- ETimeItemDays,
- ETimeItemHours,
- ETimeItemMinutes,
- ETimeItemSeconds,
- ETimeItemWeeks,
- EVelItemFeetSec,
- EVelItemKmH,
- EVelItemKnots,
- EVelItemMetresSec,
- EVelItemMilesH,
- EVolItemBarrels,
- EVolItemCubCm,
- EVolItemCubFeet,
- EVolItemCubInches,
- EVolItemCubMetres,
- EVolItemCubMm,
- EVolItemGallonsUk,
- EVolItemGallonsUs,
- EVolItemLiqOuncUk,
- EVolItemLiqOuncUs,
- EVolItemLiqPints,
- EVolItemLitres,
- EVolItemMillilitres,
- EVolItemPintsIm,
- EVolItemPintsUs,
- ECurrencyHome,
- ECurrencyForeign
- };
-
-#endif // __CONVERTER_HRH__
--- a/extras/converter/Ui/Src/Converter.rh Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* Defines resource structures for unit data storage.
-* The file can be included in a resource file only.
-*
-*/
-
-
-
-#ifndef __CONVERTER_RH__
-#define __CONVERTER_RH__
-
-STRUCT CNV_MODEL
- {
- WORD modelVersion = 0; // version number of this model
- WORD currencycategory = 0; // id of the currency category
- STRUCT categories[]; // CNV_CATEGORY array
- }
-
-STRUCT CNV_CATEGORY
- {
- LTEXT name; // textual name of this category
- BYTE ischineseorder = 0;// is order of src/dest default or chinese special
- BYTE baseunit = 0; // id of base unit (on which all unit factors are based)
- BYTE unit1 = 0; // id of default source unit (for conversion)
- BYTE unit2 = 0; // id of default destination unit (for conversion)
- BYTE istemperature = 0; // is this category temperatures (1 if yes) ?
- STRUCT units[]; // CNV_UNIT array
- }
-
-STRUCT CNV_UNIT
- {
- LTEXT name; // textual name of this unit
- DOUBLE factor = 0.0; // factor for conversion (all units)
- WORD id; // id of the unit
- }
-
-STRUCT CNV_UNIT_CURRENCY
- {
- LTEXT name; // textual name of this unit
- DOUBLE factor = 0.0; // factor for conversion (all units)
- WORD id; // id of the unit
- BYTE type = 0;
- }
-
-STRUCT CNV_UNIT_TEMPERATURE
- {
- LTEXT name; // textual name of this unit
- DOUBLE factor = 0.0; // factor for conversion (all units)
- WORD id;
- DOUBLE offset = 0.0; // offset for conversion (temperature units)
- DOUBLE min = 0.0; // minimum acceptable value (all units)
- }
-
-#endif // __CONVERTER_RH__
--- a/extras/converter/aif/ConverterAif.rss Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the application information file resource definition file
-* for Converter.app
-* -------------------------------------------------------------------
-*
-*/
-
-
-
-#include <aiftool.rh>
-
-RESOURCE AIF_DATA
- {
- app_uid = 0x101f4668;
- num_icons = 2;
- embeddability = KAppNotEmbeddable;
- hidden = KAppNotHidden;
- newfile = KAppDoesNotSupportNewFile;
- }
--- a/extras/converter/eabi/ConverterEngine_EKA2u.def Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-EXPORTS
- _ZN12TCnvCategory11SetBaseUnitEj @ 1 NONAME
- _ZN12TCnvCategory11SetUnitNameEjRK7TDesC1613TCurrencyType @ 2 NONAME
- _ZN12TCnvCategory13SetUnitFactorEjRKd @ 3 NONAME
- _ZN12TCnvCategory15AddNewCurrencyLEiR7TDesC16Rd13TCurrencyType @ 4 NONAME
- _ZN12TCnvCategory15DeleteCurrencyLEi @ 5 NONAME
- _ZN12TCnvCategory15SetDefaultUnitsEjj @ 6 NONAME
- _ZN12TCnvCategory18CurrentValueTextLCEv @ 7 NONAME
- _ZN12TCnvCategory20SetCurrentValueIndexEi @ 8 NONAME
- _ZN12TCnvCategoryC1Ev @ 9 NONAME
- _ZN12TCnvCategoryC2Ev @ 10 NONAME
- _ZN13CCnvConverter12InternalizeLER11RReadStream @ 11 NONAME
- _ZN13CCnvConverter19GetCategoryAccessorER12TCnvCategoryj @ 12 NONAME
- _ZN13CCnvConverter23GetCategorylistAccessorER12TCnvCategory @ 13 NONAME
- _ZN13CCnvConverter4NewLER15TResourceReader @ 14 NONAME
- _ZN13CCnvConverterD0Ev @ 15 NONAME
- _ZN13CCnvConverterD1Ev @ 16 NONAME
- _ZN13CCnvConverterD2Ev @ 17 NONAME
- _ZNK12TCnvCategory10UnitFactorEj @ 18 NONAME
- _ZNK12TCnvCategory11UnitMinimumEj @ 19 NONAME
- _ZNK12TCnvCategory15GetDefaultUnitsERjS0_ @ 20 NONAME
- _ZNK12TCnvCategory17CurrentValueIndexEv @ 21 NONAME
- _ZNK12TCnvCategory7ConvertEjjRKdj @ 22 NONAME
- _ZNK12TCnvCategory8BaseUnitEv @ 23 NONAME
- _ZNK12TCnvCategory8MdcArrayEv @ 24 NONAME
- _ZNK13CCnvConverter12ExternalizeLER12RWriteStream @ 25 NONAME
- _ZNK13CCnvConverter18CurrencyCategoryIdEv @ 26 NONAME
- _ZTI12CCnvCategory @ 27 NONAME ; #<TI>#
- _ZTI12TCnvCategory @ 28 NONAME ; #<TI>#
- _ZTI13CCnvConverter @ 29 NONAME ; #<TI>#
- _ZTV12CCnvCategory @ 30 NONAME ; #<VT>#
- _ZTV12TCnvCategory @ 31 NONAME ; #<VT>#
- _ZTV13CCnvConverter @ 32 NONAME ; #<VT>#
- _ZThn4_N13CCnvConverterD0Ev @ 33 NONAME ; #<thunk>#
- _ZThn4_N13CCnvConverterD1Ev @ 34 NONAME ; #<thunk>#
- _ZN12TCnvCategory16RestoreUnitArrayEv @ 35 NONAME
- _ZN12TCnvCategory29CreateTempUnitArrayForRestoreEv @ 36 NONAME
-
--- a/extras/converter/eabi/ConverterEngineu.def Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-EXPORTS
- _ZN12TCnvCategory11SetBaseUnitEj @ 1 NONAME
- _ZN12TCnvCategory11SetUnitNameEjRK7TDesC16 @ 2 NONAME
- _ZN12TCnvCategory13SetUnitFactorEjRKd @ 3 NONAME
- _ZN12TCnvCategory15SetDefaultUnitsEjj @ 4 NONAME
- _ZN12TCnvCategory18CurrentValueTextLCEv @ 5 NONAME
- _ZN12TCnvCategory20SetCurrentValueIndexEi @ 6 NONAME
- _ZN12TCnvCategoryC1Ev @ 7 NONAME
- _ZN12TCnvCategoryC2Ev @ 8 NONAME
- _ZN13CCnvConverter12InternalizeLER11RReadStream @ 9 NONAME
- _ZN13CCnvConverter19GetCategoryAccessorER12TCnvCategoryj @ 10 NONAME
- _ZN13CCnvConverter23GetCategorylistAccessorER12TCnvCategory @ 11 NONAME
- _ZN13CCnvConverter4NewLER15TResourceReader @ 12 NONAME
- _ZN13CCnvConverterD0Ev @ 13 NONAME
- _ZN13CCnvConverterD1Ev @ 14 NONAME
- _ZN13CCnvConverterD2Ev @ 15 NONAME
- _ZNK12TCnvCategory10UnitFactorEj @ 16 NONAME
- _ZNK12TCnvCategory11UnitMinimumEj @ 17 NONAME
- _ZNK12TCnvCategory15GetDefaultUnitsERjS0_ @ 18 NONAME
- _ZNK12TCnvCategory17CurrentValueIndexEv @ 19 NONAME
- _ZNK12TCnvCategory7ConvertEjjRKdj @ 20 NONAME
- _ZNK12TCnvCategory8BaseUnitEv @ 21 NONAME
- _ZNK12TCnvCategory8MdcArrayEv @ 22 NONAME
- _ZNK13CCnvConverter12ExternalizeLER12RWriteStream @ 23 NONAME
- _ZNK13CCnvConverter18CurrencyCategoryIdEv @ 24 NONAME
- _ZTI12TCnvCategory @ 25 NONAME ; #<TI>#
- _ZTV12TCnvCategory @ 26 NONAME ; #<VT>#
- _ZThn4_N13CCnvConverterD0Ev @ 27 NONAME ; #<thunk>#
- _ZThn4_N13CCnvConverterD1Ev @ 28 NONAME ; #<thunk>#
- _ZN12TCnvCategory15AddNewCurrencyLEiR7TDesC16Rd @ 29 NONAME
- _ZN12TCnvCategory15DeleteCurrencyLEi @ 30 NONAME
-
--- a/extras/converter/engine/Inc/CCnvConverter.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This class is a data container of unit categories.
-* It is able to construct itself from a resource file.
-* This class implements the Model Instantiation API.
-*
-*/
-
-
-
-#ifndef __CCNVCONVERTER_H__
-#define __CCNVCONVERTER_H__
-
-// INCLUDES
-#include <e32base.h>
-#include <bamdesca.h>
-
-// FORWARD DECLARATIONS
-class CCnvCategory;
-class TCnvCategory;
-class RWriteStream;
-class TResourceReader;
-
-// CLASS DEFINITION
-/**
-* This class is a data container of unit categories.
-* It is able to construct itself from a resource file.
-* This class implements the Model Instantiation API.
-*/
-enum TCurrencyType
-{
- ENotApplicable,
- ENameChanged,
- EHome,
- EForeign
-};
-
-class CCnvConverter : public CBase, public MDesCArray
- {
- public: // Constructors and destructor.
-
- /**
- * Destructor.
- */
- IMPORT_C ~CCnvConverter();
-
- /**
- * Two-phased constructor
- * @param aReader A resource reader object initialised to a resource.
- */
- IMPORT_C static CCnvConverter* NewL( TResourceReader& aReader );
-
- private: // Constructors
-
- /**
- * Default constructor.
- * 1 = minimum array granularity
- */
- inline CCnvConverter() : iCategoryArray( 1 ) {};
-
- /**
- * Constructs the model a CNV_MODEL resource.
- * @param aReader A resource reader object initialised to a resource.
- */
- void ConstructFromResourceL( TResourceReader& aReader );
-
- public: // from MDesCArray (need not to be imported, vftable takes care..)
-
- /**
- * Returns the number of unit categories.
- * @return number of items.
- */
- TInt MdcaCount() const;
-
- /**
- * Returns a pointer to a unit category name specified by aIndex.
- * @param aIndex Defines the point in the array that is
- * queried for the name.
- * @return Pointer to category name.
- */
- TPtrC MdcaPoint( TInt aIndex ) const;
-
- public: // new methods
-
- /**
- * Returns a category accessor for the requested category.
- * @param aCategory Category accessor placeholder.
- * @param aCategoryIndex Category identifier.
- */
- IMPORT_C void GetCategoryAccessor( TCnvCategory& aCategory,
- TUint aCategoryIndex );
- /**
- * Return a category accessor for the category list.
- * @param aCategory Category accessor placeholder.
- */
- IMPORT_C void GetCategorylistAccessor( TCnvCategory& aCategory );
-
- /**
- * Returns the index of the currency category.
- * @return category index.
- */
- IMPORT_C TUint CurrencyCategoryId() const;
-
- /**
- * Stores the category array to the given stream.
- * @param aStream Stream for writing.
- */
- IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
-
- /**
- * Loads the category array from the given stream.
- * @param aStream Stream for reading.
- */
- IMPORT_C void InternalizeL( RReadStream& aStream );
-
- private: // new methods
-
- /**
- * Skips zero or more category structures.
- * @param aCount Skips this many categories
- * @param aReader A resource reader object initialised to a resource.
- */
- void SkipCategoriesL( TInt aCount, TResourceReader& aReader );
-
- private: // data
-
- /**
- * The running version number of the model data (structure and content)
- */
- TUint iModelVersion;
-
- /**
- * The index of the category containing currencies (in the array).
- */
- TUint iCurrencyCategory;
-
- /**
- * The array for categories in this model. Owned.
- */
- CArrayPtrSeg< CCnvCategory > iCategoryArray;
-
- };
-
-#endif // __CCNVCONVERTER_H__
-
--- a/extras/converter/engine/Inc/TCnvCategory.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This class can be seen as a view to a subset (one unit category) of
-* the data stored in the data model.
-* It does not own or copy any model data.
-* This class implements the Model Access API.
-*
-*/
-
-
-
-#ifndef __TCNVCATEGORY_H__
-#define __TCNVCATEGORY_H__
-
-// INCLUDES
-#include <e32base.h>
-#include <AknQueryValue.h>
-#include "CCnvConverter.h"
-// FORWARD DECLARATIONS
-class CCnvCategory;
-class MDesCArray;
-
-enum TPanicCode
- {
- EPanicPreCond_Convert = 1,
- EPanicPreCond_UnitFactor,
- EPanicPreCond_UnitMinimum,
- EPanicPreCond_SetUnitFactor,
- EPanicPreCond_SetUnitName,
- EPanicPreCond_BaseUnit,
- EPanicPreCond_SetBaseUnit,
- EPanicPreCond_GetDefaultUnits,
- EPanicPreCond_SetDefaultUnits,
- EPanicPreCond_CurrentValueTextLC
- };
-
-_LIT(KPanicText, "TCnvCategory");
-
-// CLASS DEFINITION
-/**
-* This class can be seen as a view to a subset (one unit category) of
-* the data stored in the data model. It does not own or copy any model data.
-* This class implements the Model Access API.
-*/
-class TCnvCategory : public MAknQueryValue
- {
- public: // Constructors.
-
- /**
- * Default constructor.
- */
- IMPORT_C TCnvCategory();
-
- /**
- * Constructor.
- */
- TCnvCategory( CCnvCategory* aCategory );
-
- /**
- * Constructor.
- */
- TCnvCategory( MDesCArray* aDesCArray );
-
- public: // from MAknQueryValue
-
- /**
- * Returns a descriptor array interface to the category data.
- * @return Text array accessor.
- */
- IMPORT_C const MDesCArray* MdcArray() const;
-
- /**
- * Returns the text associated with the current selection.
- * @return currently selected item's text.
- */
- IMPORT_C HBufC* CurrentValueTextLC();
-
- /**
- * Returns the index of the current selection.
- * @return currently selected item.
- */
- IMPORT_C TInt CurrentValueIndex() const;
-
- /**
- * Set the index of the current selection.
- * @param aIndex Newly selected item.
- */
- IMPORT_C void SetCurrentValueIndex( const TInt aIndex );
-
- public: // new methods
-
- /**
- * Calculates the conversion from source unit to destination unit.
- * @param aSourceUnit Index of the source unit.
- * @param aDestinationUnit Index of the destination unit.
- * @param aAmount Convert this many source units.
- * @return Result of conversion, rounded to aDecimals decimal places.
- */
- IMPORT_C TReal Convert( TUint aSourceUnit, TUint aDestinationUnit,
- const TReal& aAmount,
- TUint aDecimals = 5 ) const;
-
- /**
- * Returns the factor (rate) of the specified unit.
- * @param unit index (identifier).
- */
- IMPORT_C TReal UnitFactor( TUint aUnit ) const;
-
- /**
- * Returns the minimum allowable amount for the specified unit.
- * @param unit index (identifier).
- */
- IMPORT_C TReal UnitMinimum( TUint aUnit ) const;
-
- /**
- * Changes the factor (rate) of the specified unit.
- * @param aUnit index (identifier).
- * @param aNewFactor new factor for the unit.
- */
- IMPORT_C void SetUnitFactor( TUint aUnit, const TReal& aNewFactor );
-
- /**
- * Changes the name of the specified unit.
- * @param aUnit index (identifier).
- * @param aNewName new name for the unit.
- */
- IMPORT_C void SetUnitName( TUint aUnit, const TDesC& aNewName , TCurrencyType aType);
-
- /**
- * Returns the index of the base unit.
- * @return base unit index.
- */
- IMPORT_C TUint BaseUnit() const;
-
- /**
- * Changes the index of the base unit.
- * @param aBaseUnit index.
- */
- IMPORT_C void SetBaseUnit( TUint aBaseUnit );
-
- /**
- * Returns the default unit indices.
- * @param aSourceUnit Index placeholder of the source unit.
- * @param aDestinationUnit Index placeholder of the destination unit.
- */
- IMPORT_C void GetDefaultUnits( TUint& aSourceUnit,
- TUint& aDestinationUnit ) const;
-
- /**
- * Sets the default unit indices.
- * @param aSourceUnit Index of the new source unit.
- * @param aDestinationUnit Index of the new destination unit.
- */
- IMPORT_C void SetDefaultUnits( TUint aSourceUnit,
- TUint aDestinationUnit );
- /**
- *Deletes a particular currency from the list.
- *@param aControlId indicates which currency has to be deleted.
- */
- IMPORT_C void AddNewCurrencyL(TInt aControlId, TDesC& aNewName , TReal& aNewFactor, TCurrencyType aType);
- /**
- *Adds a new field at a given position(focus)
- *@param aControlId indicates the currenct focus and the new currency
- * should be added accordingly
- *@param aNewName indicates the name of the currecy being added
- *@param aNewFactor indicates the factor of the currency that will be added
- */
- IMPORT_C void DeleteCurrencyL( TInt aCurrencyId );
-
- /**
- *Create a temp array to save the previous unit for restore
- *
- */
- IMPORT_C void CreateTempUnitArrayForRestore();
-
- /**
- *restore the unit array that not be modified
- *
- */
- IMPORT_C void RestoreUnitArray();
-
- private: // from MAknQueryValue, empty implementations, not to be used!
- // inlined to avoid exporting these.
-
- inline TBool CreateEditorL() { return EFalse; }
- inline void SetQueryMode( MAknQueryValue::TMode ) {};
- inline void SetSettingPageResourceIds( TInt, TInt ) {};
- inline void SetAutoAppend( TBool ) {};
- inline void AppendValueIfNewL() {};
-
- private: // data
-
- /**
- * Pointer to the category object this class accesses. Not owned.
- */
- CCnvCategory* iCategory;
-
- /**
- * Pointer to the name array. Not owned. (MAknQueryValue interface).
- */
- MDesCArray* iDesCArray;
-
- /**
- * Index of the currently selected value (MAknQueryValue interface).
- */
- TUint iCurrentValueIndex;
-
- /**
- * ETrue if the instance can be used only as a MAknQueryValue.
- * It is the case when this class is
- * constructed by TCnvCategory( MDesCArray* aDesCArray )
- */
- TBool iIsQueryValueOnly;
-
- };
-
-#endif // __TCNVCATEGORY_H__
--- a/extras/converter/engine/Src/CCnvCategory.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,290 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in CCnvCategory.h
-*
-*/
-
-
-
-#include <barsread.h> // TResourceReader
-#include <e32math.h> // Math::Round()
-#include <s32strm.h> // RReadStream, RWriteStream
-#include <Converter.rsg>
-#include "CCnvCategory.h"
-
-CCnvCategory::~CCnvCategory()
- {
- iUnitArray.Reset();
- iTempUintForRestoreArray.Reset();
- }
-
-CCnvCategory* CCnvCategory::NewLC( TResourceReader& aReader , TBool aIsCurrencyCategory)
- {
- CCnvCategory* self = new( ELeave ) CCnvCategory;
- CleanupStack::PushL( self );
- self->ConstructFromResourceL( aReader ,aIsCurrencyCategory );
-
- return self;
- }
-
-void CCnvCategory::ConstructFromResourceL( TResourceReader& aReader, TBool aIsCurrencyCategory)
- {
- // read the category parameters
- iName.Copy( aReader.ReadTPtrC() );
- TInt isChineseorder = aReader.ReadInt8();
- iBaseUnitIndex = aReader.ReadInt8();
-
-
- if( isChineseorder == 1)
- {
- switch( User::Language() )
- {
- case ELangHongKongChinese:
- case ELangTaiwanChinese:
- case ELangPrcChinese:
- iDestinationUnitIndex = aReader.ReadInt8();
- iSourceUnitIndex = aReader.ReadInt8();
- break;
- default:
- iSourceUnitIndex = aReader.ReadInt8();
- iDestinationUnitIndex = aReader.ReadInt8();
- break;
- }
- }
- else
- {
- iSourceUnitIndex = aReader.ReadInt8();
- iDestinationUnitIndex = aReader.ReadInt8();
- }
-
- TBool isTemperatureCategory( EFalse );
- if( aReader.ReadInt8() != 0 )
- {
- isTemperatureCategory = ETrue;
- }
-
- // start reading the unit array
- TInt numUnits = aReader.ReadInt16();
-
- TCnvUnit unit;
- for( TInt i = 0; i < numUnits; i++ )
- {
- unit.ReadFromResource( aReader, isTemperatureCategory, aIsCurrencyCategory );
- iUnitArray.AppendL( unit );
- }
- }
-
-TInt CCnvCategory::MdcaCount() const
- {
- return iUnitArray.Count();
- }
-
-// Returns the name of the unit at index 'aIndex'
-TPtrC CCnvCategory::MdcaPoint( TInt aIndex ) const
- {
- return TPtrC( iUnitArray.At( aIndex ).iName );
- }
-
-TReal CCnvCategory::Convert( TUint aSourceUnit, TUint aDestinationUnit,
- const TReal& aAmount, TUint aDecimals ) const
- {
- const TCnvUnit& srcUnit = iUnitArray.At( aSourceUnit );
- const TCnvUnit& dstUnit = iUnitArray.At( aDestinationUnit );
-
- TReal result( ( aAmount - srcUnit.iOffset ) / srcUnit.iFactor
- * dstUnit.iFactor + dstUnit.iOffset );
- Math::Round( result, result, aDecimals );
- return result;
- }
-
-void CCnvCategory::GetDefaultUnits( TUint& aSourceUnit,
- TUint& aDestinationUnit ) const
- {
- aSourceUnit = iSourceUnitIndex;
- aDestinationUnit = iDestinationUnitIndex;
- }
-
-void CCnvCategory::SetDefaultUnits( TUint aSourceUnit,
- TUint aDestinationUnit )
- {
- iSourceUnitIndex = aSourceUnit;
- iDestinationUnitIndex = aDestinationUnit;
- }
-
-TUint CCnvCategory::BaseUnit() const
- {
- return iBaseUnitIndex;
- }
-
-void CCnvCategory::SetBaseUnit( const TUint& aBaseUnit )
- {
- iBaseUnitIndex = aBaseUnit;
- }
-
-const TDes& CCnvCategory::Name() const
- {
- return iName;
- }
-
-TCnvUnit& CCnvCategory::Unit( TUint aIndex )
- {
- return iUnitArray.At( aIndex );
- }
-
-// Store the data in a stream.
-void CCnvCategory::ExternalizeL( RWriteStream& aStream ) const
- {
- aStream.WriteUint8L( iBaseUnitIndex );
- aStream.WriteUint8L( iSourceUnitIndex );
- aStream.WriteUint8L( iDestinationUnitIndex );
-
- TUint len( iUnitArray.Count() );
- aStream.WriteUint8L( iUnitArray.Count() );
- for( TUint i = 0; i < len; i ++)
- {
- iUnitArray.At( i ).ExternalizeL( aStream );
- }
- }
-
-// Recover the data from a stream.
-void CCnvCategory::InternalizeL( RReadStream& aStream, TBool aIsCurrencyCategory )
- {
- TBuf<16> currencyNames[3];
-
- iBaseUnitIndex = aStream.ReadUint8L();
- iSourceUnitIndex = aStream.ReadUint8L();
- iDestinationUnitIndex = aStream.ReadUint8L();
-
- TUint len( aStream.ReadUint8L() );
-
- //The ini file exists. So delete the existing iUnitArray and load it again
- //from the Configuration Settings file
-
- //Trying to use enum values as array indexes
- currencyNames[1] = iUnitArray.At(0).iName; // Qtn_Cnv_Home
- currencyNames[2] = iUnitArray.At(1).iName; // Qtn_Cnv_Foreign
-
- iUnitArray.Delete(0,iUnitArray.Count());
-
- for( TUint i = 0; i < len; i ++)
- {
- //Change: Loads the currencies directly from ini file. no searching..
- // TInt index;
- TCnvUnit unit;
- unit.InternalizeL( aStream , aIsCurrencyCategory);
-
- iUnitArray.AppendL(unit);
- }
-
- TCurrencyType type;
-
- for( TUint in = 0; in < len; in++)
- {
- type = iUnitArray.At(in).iNameType;
- if(type == EHome)
- iUnitArray.At(in).iName = currencyNames[1];
- else if(type == EForeign)
- iUnitArray.At(in).iName = currencyNames[2];
- }
- }
-
-
-void CCnvCategory::AddNewCurrencyL( TInt aCurrencyId, TDesC& aNewName, TReal& aNewFactor, TCurrencyType aType)
- {
- TCnvUnit unit;
- TUint curencyId = aCurrencyId; // To remove the warnings
- unit.iName = aNewName;
- unit.iFactor = aNewFactor;
- unit.iNameType = aType;
- unit.iIsCurrencyUnit = ETrue;
- //To calculate the id for the new currency added.
- //will run thru the ids, gets the largest id and increments it and assigns to the new unit.
- //Make sure that the ids for the currencies have the largest possible value in the hrh file.
- TUint id;
- id = iUnitArray.At(0).iId;
- for(TInt i = 1; i < iUnitArray.Count(); i++)
- {
- if(id < iUnitArray.At(i).iId)
- {
- id = iUnitArray.At(i).iId;
- }
- }
- id++;
- unit.iId = id;
-
- iUnitArray.InsertL( curencyId, unit );
- //New element has been added. So set the base source and destination currencies accordingly
- if( iBaseUnitIndex >= curencyId )
- {
- iBaseUnitIndex++;
- }
- if( iSourceUnitIndex >= curencyId )
- {
- iSourceUnitIndex++;
- }
- if( iDestinationUnitIndex >= curencyId )
- {
- iDestinationUnitIndex++;
- }
-
- }
-
-
-
-void CCnvCategory::DeleteCurrency(TInt aCurrencyId)
- {
- iUnitArray.Delete(aCurrencyId);
-
- TUint unsignedCurrencyId = aCurrencyId; //to remove warnings
-
- //An element has been deleted. So set the base source and destination currencies accordingly
- if(iBaseUnitIndex >= unsignedCurrencyId )
- {
- if( iBaseUnitIndex > 0)
- iBaseUnitIndex--;
- }
- if(iSourceUnitIndex >= unsignedCurrencyId )
- {
- if( iSourceUnitIndex > 0)
- iSourceUnitIndex--;
- }
- if(iDestinationUnitIndex >= unsignedCurrencyId )
- {
- if( iDestinationUnitIndex > 0)
- iDestinationUnitIndex--;
- }
-
- }
-
-
-void CCnvCategory::CreateTempUnitArrayForRestore()
- {
- iTempUintForRestoreArray.Reset();
- for ( TInt i = 0; i < iUnitArray.Count() ; i++ )
- {
- TRAP_IGNORE( iTempUintForRestoreArray.AppendL( iUnitArray.At( i ) ) );
- }
- }
-
-void CCnvCategory::RestoreUnitArray()
- {
- iUnitArray.Reset();
- for ( TInt i = 0 ; i < iTempUintForRestoreArray.Count() ; i++ )
- {
- TRAP_IGNORE( iUnitArray.AppendL( iTempUintForRestoreArray.At( i ) ) );
- }
- }
-
-// End of File
--- a/extras/converter/engine/Src/CCnvCategory.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This class is a data container of unit conversion parameters
-* for a single unit category. It creates and owns the units in this
-* category. It is able to construct itself from a resource file.
-*
-*/
-
-
-
-#ifndef __CCNVCATEGORY_H__
-#define __CCNVCATEGORY_H__
-
-// INCLUDES
-#include <e32base.h>
-#include <bamdesca.h>
-#include "TCnvUnit.h"
-
-// FORWARD DECLARATIONS
-class TResourceReader;
-class RWriteStream;
-
-// CONSTANTS
-const TInt KMaxNameLength = 32;
-
-// CLASS DEFINITION
-/**
-* This class is a data container of unit conversion parameters
-* for a single unit category. It creates and owns the units in this category.
-* It is able to construct itself from a resource file.
-*/
-class CCnvCategory : public CBase, public MDesCArray
- {
- public: // Constructors and destructor
-
- /**
- * Destructor.
- */
- ~CCnvCategory();
-
- /**
- * Two-phased constructor
- * @param aReader A resource reader object initialised to a resource.
- */
- static CCnvCategory* NewLC( TResourceReader& aReader, TBool aIsCurrencyCategory = EFalse );
-
- private: // Constructors
-
- /**
- * Default constructor. Inlined to save a few bytes
- * 2 = array granularity ( balanced between memory usage and speed )
- */
- inline CCnvCategory() : iUnitArray( 2 ) , iTempUintForRestoreArray( 2 ) {};
-
- /**
- * Constructs this category from a CNV_CATEGORY resource.
- * @param aReader A resource reader object initialised to a resource.
- */
- void ConstructFromResourceL( TResourceReader& aReader , TBool aIsCurrencyCategory = EFalse);
-
- public: // from MDesCArray
-
- /**
- * Returns the number of items (units) in this category.
- * @return number of items.
- */
- TInt MdcaCount() const;
-
- /**
- * Returns a pointer to a unit name specified by aIndex.
- * @param aIndex Defines the point in the array that is
- * queried for the name.
- * @return Pointer to unit name.
- */
- TPtrC MdcaPoint( TInt aIndex ) const;
-
- public: // new methods
-
- /**
- * Calculates the conversion from source unit to destination unit.
- * @param aSourceUnit Index of the source unit.
- * @param aDestinationUnit Index of the destination unit.
- * @param aAmount Convert this many source units.
- * @return Result of conversion, rounded to aDecimals decimal places.
- */
- TReal Convert( TUint aSourceUnit, TUint aDestinationUnit,
- const TReal& aAmount, TUint aDecimals ) const;
-
- /**
- * Returns the default unit indices.
- * @param aSourceUnit Index placeholder of the source unit.
- * @param aDestinationUnit Index placeholder of the destination unit.
- */
- void GetDefaultUnits( TUint& aSourceUnit,
- TUint& aDestinationUnit ) const;
-
- /**
- * Sets the default unit indices.
- * @param aSourceUnit Index of the new source unit.
- * @param aDestinationUnit Index of the new destination unit.
- */
- void SetDefaultUnits( TUint aSourceUnit, TUint aDestinationUnit );
-
- /**
- * Returns the index of the base unit.
- * @return base unit index.
- */
- TUint BaseUnit() const;
-
- /**
- * Changes the index of the base unit.
- * @param aIndex new base unit index.
- */
- void SetBaseUnit( const TUint& aIndex );
-
- /**
- * Returns a pointer to this category's name.
- * @return the category name.
- */
- const TDes& Name() const;
-
- /**
- * Returns a reference to the Unit object identified by aIndex.
- * @return the requested Unit object.
- */
- TCnvUnit& Unit( TUint aIndex );
-
- /**
- * Stores the unit array to the given stream.
- * @param aStream Stream for writing.
- */
- void ExternalizeL( RWriteStream& aStream ) const;
-
- /**
- * Loads the unit array from the given stream.
- * @param aStream Stream for reading.
- */
- void InternalizeL( RReadStream& aStream , TBool aIsCurrencyCategory = EFalse);
-
- /**
- * create a unit array copy
- *
- */
- void CreateTempUnitArrayForRestore();
-
- /**
- * restore the unit array
- *
- */
- void RestoreUnitArray();
-
- private: // data
-
- /**
- * Index of the default source unit (in the unit array).
- */
- TUint iSourceUnitIndex;
-
- /**
- * Index of the default destination unit (in the unit array).
- */
- TUint iDestinationUnitIndex;
-
- /**
- * Index of the base unit (in the unit array).
- */
- TUint iBaseUnitIndex;
-
- /**
- * Name of this category.
- */
- TBuf< KMaxNameLength > iName;
-
- /**
- * The array for units in this category. Owned.
- */
- CArrayFixSeg< TCnvUnit > iUnitArray;
-
- // Save unit for restore
- CArrayFixSeg< TCnvUnit > iTempUintForRestoreArray;
-
- public:
- /**
- *Deletes a particular currency from the list.
- *@param aControlId indicates which currency has to be deleted.
- */
- void DeleteCurrency(TInt aCurrencyId);
-
- /**
- *Adds a new field at a given position(focus)
- *@param aControlId indicates the currenct focus and the new currency
- * should be added accordingly
- *@param aNewName indicates the name of the currecy being added
- *@param aNewFactor indicates the factor of the currency that will be added
- */
- void AddNewCurrencyL( TInt aCurrencyId, TDesC& aNewName, TReal& aNewFactor , TCurrencyType aType);
-
- };
-
-#endif // __CCNVCATEGORY_H__
--- a/extras/converter/engine/Src/CCnvConverter.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in CCnvConverter.h
-*
-*/
-
-
-
-#include <s32strm.h>
-#include <barsread.h>
-
-#include "CCnvConverter.h"
-#include "CCnvCategory.h"
-#include "TCnvCategory.h"
-
-
-EXPORT_C CCnvConverter::~CCnvConverter()
- {
- iCategoryArray.ResetAndDestroy();
- }
-
-EXPORT_C CCnvConverter* CCnvConverter::NewL( TResourceReader& aReader )
- {
- CCnvConverter* self = new( ELeave ) CCnvConverter;
- CleanupStack::PushL( self );
- self->ConstructFromResourceL( aReader );
- CleanupStack::Pop(); // self;
-
- return self;
- }
-
-void CCnvConverter::ConstructFromResourceL( TResourceReader& aReader )
- {
- iModelVersion = aReader.ReadInt16();
- iCurrencyCategory = aReader.ReadInt16();
-iCurrencyCategory = iCurrencyCategory ;
-
- TUint numCategories( aReader.ReadInt16() );
-
- for( TUint i = 0; i < numCategories ; i++ )
- {
- if(i == iCurrencyCategory)
- {
- CCnvCategory* category = CCnvCategory::NewLC( aReader, ETrue ); // Load Currency
- iCategoryArray.AppendL( category );
- CleanupStack::Pop(); // category
- }
- else
- {
- CCnvCategory* category = CCnvCategory::NewLC( aReader );
- iCategoryArray.AppendL( category );
- CleanupStack::Pop(); // category
- }
- }
- }
-
-TInt CCnvConverter::MdcaCount() const
- {
- return iCategoryArray.Count();
- }
-
-TPtrC CCnvConverter::MdcaPoint( TInt aIndex ) const
- {
- return TPtrC( iCategoryArray.At( aIndex )->Name() );
- }
-
-EXPORT_C void CCnvConverter::GetCategoryAccessor( TCnvCategory& aCategory,
- TUint aCategoryIndex )
- {
- aCategory = TCnvCategory( iCategoryArray.At( aCategoryIndex ) );
- }
-
-EXPORT_C void CCnvConverter::GetCategorylistAccessor(
- TCnvCategory& aCategory )
- {
- aCategory = TCnvCategory( this );
- }
-
-EXPORT_C TUint CCnvConverter::CurrencyCategoryId() const
- {
- return iCurrencyCategory;
- }
-
-// Store the data in a stream.
-EXPORT_C void CCnvConverter::ExternalizeL( RWriteStream& aStream ) const
- {
- // Write the current model version
- aStream.WriteUint32L( iModelVersion );
-
- // Write the current model language variant
- aStream.WriteUint32L( User::Language() );
-
- // Save out the currency category as a whole
- CCnvCategory* category = iCategoryArray.At( iCurrencyCategory );
- category->ExternalizeL( aStream );
-
- // Save
- TUint len( iCategoryArray.Count() );
- for( TUint i = 0; i < len; i++ )
- {
- TUint aSrc( 0 ), aDst( 0 );
- category = iCategoryArray.At( i );
- category->GetDefaultUnits( aSrc, aDst );
- aStream.WriteUint8L( aSrc );
- aStream.WriteUint8L( aDst );
- }
- }
-
-// Recover the data from a stream.
-EXPORT_C void CCnvConverter::InternalizeL( RReadStream& aStream )
- {
- TUint version( aStream.ReadUint32L() );
- if( version != iModelVersion )
- {
- User::Leave( KErrCorrupt );
- }
- TInt language( aStream.ReadUint32L() );
- language = language; // suppress compiler warnings
- /*if( language != User::Language() )
- {
- User::Leave( KErrCorrupt );
- }
- */
- // Read in the currency category as a whole
- CCnvCategory* category = iCategoryArray.At( iCurrencyCategory );
- category->InternalizeL( aStream );
-
- TUint len( iCategoryArray.Count() );
- for( TUint i = 0; i < len; i++ )
- {
- TUint src( aStream.ReadUint8L() );
- TUint dst( aStream.ReadUint8L() );
- category = iCategoryArray.At( i );
- category->SetDefaultUnits( src, dst );
- }
- }
-
-
-void CCnvConverter::SkipCategoriesL( TInt aCount, TResourceReader& aReader )
- {
- for( TInt i = 0; i < aCount; i++ )
- {
- CCnvCategory::NewLC( aReader );
- CleanupStack::PopAndDestroy();
- }
- }
-
-// End of File
--- a/extras/converter/engine/Src/DllMain.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* The E32Dll() function is required by all DLLs; it is defined
-* as the main DLL entry point which implies that it is exported,
-* even though there is no explicit EXPORT_C in the C++ code. Its
-* primary use is to allocate thread-local storage.
-*
-*/
-
-
-
-#include <e32base.h>
-
-
-// End of File
--- a/extras/converter/engine/Src/TCnvCategory.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in TCnvCategory.h
-*
-*/
-
-
-
-#include "CCnvCategory.h"
-#include "TCnvUnit.h"
-#include "TCnvCategory.h"
-
-
-EXPORT_C TCnvCategory::TCnvCategory() :
- iCategory( NULL ), iDesCArray( NULL ),
- iCurrentValueIndex( 0 ), iIsQueryValueOnly( EFalse )
- {
- }
-
-TCnvCategory::TCnvCategory( CCnvCategory* aCategory ) :
- iCategory( aCategory ), iDesCArray( aCategory ),
- iCurrentValueIndex( 0 ), iIsQueryValueOnly( EFalse )
- {
- }
-
-TCnvCategory::TCnvCategory( MDesCArray* aDesCArray ):
- iCategory( NULL ), iDesCArray( aDesCArray ),
- iCurrentValueIndex( 0 ), iIsQueryValueOnly( ETrue )
- {
- }
-
-EXPORT_C TReal TCnvCategory::Convert( TUint aSourceUnit,
- TUint aDestinationUnit,
- const TReal& aAmount,
- TUint aDecimals ) const
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_Convert ) );
- return iCategory->Convert( aSourceUnit, aDestinationUnit,
- aAmount, aDecimals );
- }
-
-EXPORT_C TReal TCnvCategory::UnitFactor( TUint aUnit ) const
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_UnitFactor ) );
- return iCategory->Unit( aUnit ).iFactor;
- }
-
-EXPORT_C TReal TCnvCategory::UnitMinimum( TUint aUnit ) const
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_UnitMinimum ) );
- return iCategory->Unit( aUnit ).iMinimum;
- }
-
-EXPORT_C void TCnvCategory::SetUnitFactor( TUint aUnit,
- const TReal& aNewFactor )
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_SetUnitFactor ) );
- iCategory->Unit( aUnit ).iFactor = aNewFactor;
- }
-
-EXPORT_C void TCnvCategory::SetUnitName( TUint aUnit, const TDesC& aNewName, TCurrencyType aType )
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_SetUnitName ) );
- iCategory->Unit( aUnit ).iName.Copy( aNewName );
- iCategory->Unit( aUnit ).iNameType = aType;
- }
-
-EXPORT_C TUint TCnvCategory::BaseUnit() const
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_BaseUnit ) );
- return iCategory->BaseUnit();
- }
-
-EXPORT_C void TCnvCategory::SetBaseUnit( TUint aBaseUnit )
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_SetBaseUnit ) );
- iCategory->SetBaseUnit( aBaseUnit );
- iCategory->Unit( aBaseUnit ).iFactor = 1.0;
- }
-
-EXPORT_C void TCnvCategory::GetDefaultUnits( TUint& aSourceUnit,
- TUint& aDestinationUnit ) const
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_GetDefaultUnits ) );
- iCategory->GetDefaultUnits( aSourceUnit, aDestinationUnit );
- }
-
-EXPORT_C void TCnvCategory::SetDefaultUnits( TUint aSourceUnit,
- TUint aDestinationUnit )
- {
- __ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_SetDefaultUnits ) );
- iCategory->SetDefaultUnits( aSourceUnit, aDestinationUnit );
- }
-
-EXPORT_C const MDesCArray* TCnvCategory::MdcArray() const
- {
- return iDesCArray;
- }
-
-EXPORT_C HBufC* TCnvCategory::CurrentValueTextLC()
- {
- __ASSERT_DEBUG( iDesCArray, User::Panic(KPanicText, EPanicPreCond_CurrentValueTextLC ) );
- TPtrC ptr = iDesCArray->MdcaPoint( iCurrentValueIndex );
- HBufC* buf = HBufC::NewLC( ptr.Length() );
- buf->operator=( ptr );
- return buf;
- }
-
-EXPORT_C TInt TCnvCategory::CurrentValueIndex() const
- {
- return iCurrentValueIndex;
- }
-
-EXPORT_C void TCnvCategory::SetCurrentValueIndex( const TInt aIndex )
- {
- iCurrentValueIndex = aIndex;
- }
-
-EXPORT_C void TCnvCategory::AddNewCurrencyL( TInt aControlId, TDesC& aNewName, TReal& aNewFactor, TCurrencyType aType )
- {
- iCategory->AddNewCurrencyL( aControlId, aNewName, aNewFactor, aType );
- }
-
-EXPORT_C void TCnvCategory::DeleteCurrencyL(TInt aCurrencyId)
- {
- iCategory->DeleteCurrency( aCurrencyId);
- }
-
-EXPORT_C void TCnvCategory::CreateTempUnitArrayForRestore()
- {
- iCategory->CreateTempUnitArrayForRestore();
- }
-EXPORT_C void TCnvCategory::RestoreUnitArray()
- {
- iCategory->RestoreUnitArray();
- }
-
-// End of file
--- a/extras/converter/engine/Src/TCnvUnit.cpp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the implementation of the class defined in TCnvUnit.h
-*
-*/
-
-
-
-#include <barsread.h>
-#include <s32strm.h>
-
-#include "TCnvUnit.h"
-
-TCnvUnit::TCnvUnit() :
- iFactor( 0 ), iOffset( 0 ),
- iMinimum( 0 ), iId( 0 ),
- iIsTemperatureUnit( EFalse ),
- iIsCurrencyUnit ( EFalse )
- {
- }
-
-// Read the data from a resource. If this is a temperature unit we have
-// a couple extra parameters to read.
-void TCnvUnit::ReadFromResource( TResourceReader& aReader,
- TBool aIsTemperature, TBool aIsCurrencyUnit )
- {
- // This flag has been done to avoid storing the two additional TReals in
- // resources and streams (they are valid only for temperature units).
- iIsTemperatureUnit = aIsTemperature;
- iIsCurrencyUnit = aIsCurrencyUnit;
-
- iName.Copy( aReader.ReadTPtrC() );
- iFactor = aReader.ReadReal64();
- iId = aReader.ReadUint16();
-
- if( iIsTemperatureUnit )
- {
- iOffset = aReader.ReadReal64();
- iMinimum = aReader.ReadReal64();
- }
-
- if(iIsCurrencyUnit)
- {
- TUint nameType (aReader.ReadUint8());
- iNameType = (TCurrencyType)nameType;
- }
- }
-
-// Store the data in a stream.
-void TCnvUnit::ExternalizeL( RWriteStream& aStream ) const
- {
- aStream.WriteUint16L( iName.Length() );
- aStream.WriteL( iName );
-
- aStream.WriteReal64L( iFactor );
-
- aStream.WriteUint16L( iId );
-
- aStream.WriteUint8L( iIsTemperatureUnit );
- if( iIsTemperatureUnit )
- {
- aStream.WriteReal64L( iOffset );
- aStream.WriteReal64L( iMinimum );
- }
-
- aStream.WriteUint8L( iIsCurrencyUnit );
- if(iIsCurrencyUnit)
- {
- aStream.WriteUint8L( iNameType );
- }
- }
-
-// Recover the data from a stream.
-void TCnvUnit::InternalizeL( RReadStream& aStream, TBool aIsCurrencyCategory )
- {
- iIsCurrencyUnit = aIsCurrencyCategory;
- TUint nameLength( aStream.ReadUint16L() );
- aStream.ReadL( iName, nameLength );
-
- iFactor = aStream.ReadReal64L();
-
- iId = aStream.ReadUint16L();
-
- iIsTemperatureUnit = aStream.ReadUint8L();
-
- if( iIsTemperatureUnit )
- {
- iOffset = aStream.ReadReal64L();
- iMinimum = aStream.ReadReal64L();
- }
-
- iIsCurrencyUnit = aStream.ReadUint8L();
-
- if(iIsCurrencyUnit)
- {
- TUint nameType (aStream.ReadUint8L());
- iNameType = (TCurrencyType)nameType;
- }
- }
-
-
-// End of file
--- a/extras/converter/engine/Src/TCnvUnit.h Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This class is a data container of unit conversion parameters
-* for a single unit.
-* It is able to construct itself from a resource file.
-*
-*/
-
-
-
-#ifndef __TCNVUNIT_H__
-#define __TCNVUNIT_H__
-
-// INCLUDES
-#include <e32base.h>
-#include "CCnvConverter.h"
-// FORWARD DECLARATIONS
-class TResourceReader;
-class RWriteStream;
-
-// CONSTANTS
-const TInt KMaxUnitNameLength = 36;
-
-// CLASS DEFINITION
-/**
-* This class is a data container of unit conversion parameters
-* for a single unit.
-* It is able to construct itself from a resource file.
-*/
-class TCnvUnit
- {
- public: // Constructors
-
- TCnvUnit();
-
- public: // new methods.
-
- /**
- * Constructs this unit from a CNV_UNIT or CNV_UNIT_TEMPERATURE
- * resource.
- * @param aReader A resource reader object initialised to a resource.
- * @param aIsTemperature EFalse if we are going to read a CNV_UNIT
- * resource, ETrue if a CNV_UNIT_TEMPERATURE.
- */
- void ReadFromResource( TResourceReader& aReader,
- TBool aIsTemperature = EFalse, TBool aIsCurrencyUnit =EFalse);
-
- /**
- * Stores the member variables to the given stream.
- * @param aStream Stream for writing.
- */
- void ExternalizeL( RWriteStream& aStream ) const;
-
- /**
- * Loads the member variables from the given stream.
- * @param aStream Stream for reading.
- */
- void InternalizeL( RReadStream& aStream , TBool aIsCurrencyCategory = EFalse);
-
- public: // data
-
- /**
- * The factor for converting this unit to the base unit.
- */
- TReal iFactor;
-
- /**
- * The offset for converting this unit to the base unit.
- * Used only with temperature units.
- */
- TReal iOffset;
-
- /**
- * Minimum allowable unit amount in conversion.
- * Used only with temperature units.
- */
- TReal iMinimum;
-
- /**
- * Unit name. Max lengh of 35 used in unit name queries.
- */
- TBuf< KMaxUnitNameLength > iName;
-
- /**
- * Id of the unit. Used to identify unit among all other units.
- * Unique.
- */
- TUint iId;
-
-// private: // data
-
- /**
- * ETrue if this unit defines a temperature, EFalse otherwise.
- */
- TBool iIsTemperatureUnit;
- TBool iIsCurrencyUnit;
- TCurrencyType iNameType;
- };
-
-#endif // __TCNVUNIT_H__
--- a/extras/converter/group/Converter.rss Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,468 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the resource definition file for Converter.app
-* -------------------------------------------------------------------
-*
-*/
-
-
-#include <eikon.rsg>
-#include <eikon.rh>
-#include <uikon.rh>
-
-#include <avkon.loc>
-#include <avkon.rsg>
-#include <avkon.hrh>
-#include <avkon.rh>
-#include <avkon.mbg>
-
-
-#include <appinfo.rh>//svg icons
-#include <data_caging_paths_strings.hrh>
-#include "Converter.rh"
-#include "Converter.hrh"
-#include <converter.loc>
-#include <converterengine.loc>
-
-NAME CONV
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf = ""; }
-
-RESOURCE EIK_APP_INFO
- {
- }
-
-
-// -- Main form + associated menus -------------------------------------------
-
-RESOURCE DIALOG r_cnv_mainform
- {
- flags = EEikDialogFlagNoDrag
- | EEikDialogFlagFillAppClientRect
- | EEikDialogFlagButtonsRight
- | EEikDialogFlagCbaButtons
- | EEikDialogFlagNoTitleBar;
-buttons =r_cnv_mainform_softkeys;
-
-
- form = r_cnv_mainform_form;
- }
-
-
-
-RESOURCE FORM r_cnv_mainform_form
- {
- flags = EEikFormEditModeOnly;
- items =
- {
- // conversion type
- DLG_LINE
- {
- type = EAknCtPopupField;
- id = EConverterTypePopup;
- prompt = qtn_cnv_label_type;
- itemflags = EEikDlgItemTakesEnterKey
- | EEikDlgItemOfferAllHotKeys;
- control = POPUP_FIELD {};
- },
-
- // top unit popup
- DLG_LINE
- {
- type = EAknCtPopupField;
- id = EConverterUnit1Popup;
- prompt = qtn_cnv_label_unit;
- itemflags = EEikDlgItemTakesEnterKey
- | EEikDlgItemOfferAllHotKeys
- | EEikDlgItemSeparatorAfter;
- control = POPUP_FIELD {};
- },
-
- // top amount editor
- DLG_LINE
- {
- type = EEikCtFlPtEd;
- id = EConverterEditor1;
- prompt = qtn_cnv_label_amount;
- itemflags = EEikDlgItemTakesEnterKey;
-
- control = FLPTED { maxlength = KEditorTextMaxLength; };
- },
-
- // bottom unit popup
- DLG_LINE
- {
- type = EAknCtPopupField;
- id = EConverterUnit2Popup;
- prompt = qtn_cnv_label_unit;
- itemflags = EEikDlgItemTakesEnterKey
- | EEikDlgItemOfferAllHotKeys
- | EEikDlgItemSeparatorAfter;
- control = POPUP_FIELD {};
- },
-
- // bottom amount editor
- DLG_LINE
- {
- type = EEikCtFlPtEd;
- id = EConverterEditor2;
- prompt = qtn_cnv_label_amount;
- control = FLPTED { maxlength = KEditorTextMaxLength; };
- }
- };
- }
-
-RESOURCE MENU_BAR r_cnv_mainform_menubar
- {
- titles=
- {
- MENU_TITLE { menu_pane = r_cnv_mainform_menupane; }
- };
- }
-
-RESOURCE MENU_PANE r_cnv_mainform_menupane
- {
- items=
- {
- MENU_ITEM { command = ECmdSetUnit; txt = qtn_cnv_set_unit; flags = EEikMenuItemDimmed; },
- MENU_ITEM { command = ECmdSetCurrency; txt = qtn_cnv_set_currency; flags = EEikMenuItemDimmed; },
- MENU_ITEM { command = ECmdSetType; txt = qtn_cnv_set_type; },
- MENU_ITEM { command = ECmdRates; txt = qtn_cnv_rates; flags = EEikMenuItemDimmed; },
- MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
- MENU_ITEM { command = EEikCmdExit ; txt = qtn_options_exit; }
- };
- }
-
-
-// -- Rates form + associated menus ------------------------------------------
-
-RESOURCE DIALOG r_cnv_ratesform
- {
- flags = EEikDialogFlagNoDrag
- | EEikDialogFlagFillAppClientRect
- | EEikDialogFlagButtonsRight
- | EEikDialogFlagCbaButtons
- | EEikDialogFlagNoTitleBar
- | EEikDialogFlagWait;
- buttons = r_cnv_ratesform_softkeys;
- form = r_cnv_ratesform_form;
- }
-
-RESOURCE FORM r_cnv_ratesform_form
- {
- flags = EEikFormEditModeOnly;
- items = {}; // This has to be an empty array, we'll fill it up later
- }
-
-RESOURCE TBUF r_cnv_ratesform_title { buf = qtn_cnv_rates_title; }
-
-RESOURCE MENU_BAR r_cnv_ratesform_menubar
- {
- titles=
- {
- MENU_TITLE { menu_pane = r_cnv_ratesform_menupane; }
- };
- }
-
-RESOURCE MENU_PANE r_cnv_ratesform_menupane
- {
- items=
- {
- MENU_ITEM { command = ECmdAddCurrency; txt = qtn_cnv_add_currency_rate; },
- MENU_ITEM { command = ECmdDeleteCurrency; txt = qtn_cnv_opt_delete_currency; },
- MENU_ITEM { command = ECmdChangeCurrencyName; txt = qtn_cnv_rename_currency; },
- MENU_ITEM { command = ECmdSetAsBaseCurrency; txt = qtn_cnv_base_currency; },
- MENU_ITEM { command = EAknFormCmdSave; txt = qtn_cnv_save; },
- MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
- MENU_ITEM { command = EEikCmdExit; txt = qtn_options_exit; }
- };
- }
-
-RESOURCE CBA r_cnv_ratesform_softkeys
- {
- buttons =
- {
- CBA_BUTTON { id = EAknSoftkeyOptions; txt = text_softkey_option;},
- CBA_BUTTON { id = EAknSoftkeyBack; txt = text_softkey_done; }
- };
- }
-
-// -- Rates form confirmation query ------------------------------------------
-
-RESOURCE DIALOG r_cnv_confirmation_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
- items=
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- label = qtn_cnf_conf_base_currency;
- };
- }
- };
- }
-
-// -- Rates form unit name query ---------------------------------------------
-
-RESOURCE DIALOG r_cnv_unitname_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- items=
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control= AVKON_DATA_QUERY
- {
- layout = EDataLayout;
- label = qtn_cnv_edit_name_prompt;
- control = EDWIN
- {
- maxlength = MAXCURRENCYNAMELENGTH;
- };
- };
- }
- };
- }
-
-// -- Error note texts -------------------------------------------------------
-
-RESOURCE TBUF r_qtn_fldr_name_already_used { buf = qtn_fldr_name_already_used; }
-RESOURCE TBUF r_cnv_mainform_norate { buf = qtn_cnv_error_no_rate_singular; }
-RESOURCE TBUF r_cnv_mainform_norate_plural { buf = qtn_cnv_error_no_rate_plural; }
-RESOURCE TBUF r_cnv_mainform_invalidvalue { buf = qtn_cnv_error_invalid; }
-
-// -- Unit conversion parameters ---------------------------------------------
-
-RESOURCE CNV_MODEL r_cnv_model
- {
- // REMEMBER TO INCREMENT THIS VERSION NUMBER EVERY TIME THE ABOVE DATA IS
- // MODIFIED (EVEN JUST UNIT NAMES) THIS IS TO AVOID CONFLICT BETWEEN
- // SAVED APPLICATION SETTINGS AND THE DATA BELOW.
- modelVersion = 8;
- currencycategory = 0;
- categories =
- {
- // NORMAL, NON-CHINESE, CURRENCY CATEGORY
- CNV_CATEGORY
- {
- ischineseorder = 0; baseunit = 0; unit1 = 0; unit2 = 1; name = qtn_cnv_type_currency;
- units =
- {
-//Change: Only six currencies are present. There is no language dependent base currency..
-
- CNV_UNIT_CURRENCY { name = qtn_cnv_rate_home; factor = 1.0; id = ECurrencyHome; type = 2;},
- CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
- CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
- CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
- CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
- CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
- CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;}
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 6; unit1 = 1; unit2 = 6; name = qtn_cnv_type_area;
- units =
- {
- CNV_UNIT { name = qtn_cnv_area_item_sq_inches; factor = 1550.0031000062001; id = EAreaItemSqInches; }, // 6
- CNV_UNIT { name = qtn_cnv_area_item_sq_feet; factor = 10.763910416709722; id = EAreaItemSqFeet; }, // 7
- CNV_UNIT { name = qtn_cnv_area_item_sq_yards; factor = 1.1959900463010802; id = EAreaItemSqYards; }, // 8
- CNV_UNIT { name = qtn_cnv_area_item_sq_miles; factor = 0.0000003861021585424; id = EAreaItemSqMiles; }, // 10
- CNV_UNIT { name = qtn_cnv_area_item_sq_mm; factor = 1000000.0; id = EAreaItemSqMm; }, // 0
- CNV_UNIT { name = qtn_cnv_area_item_sq_cm; factor = 10000.0; id = EAreaItemSqCm; }, // 1
- CNV_UNIT { name = qtn_cnv_area_item_sq_metres; factor = 1.0; id = EAreaItemSqMetres; }, // 2
- CNV_UNIT { name = qtn_cnv_area_item_sq_km; factor = 0.000001; id = EAreaItemSqKm; }, // 5
- CNV_UNIT { name = qtn_cnv_area_item_acres; factor = 0.00024710538146716527; id = EAreaItemAcres; }, // 9
- CNV_UNIT { name = qtn_cnv_area_item_ares; factor = 0.01; id = EAreaItemAres; }, // 3
- CNV_UNIT { name = qtn_cnv_area_item_hectares; factor = 0.0001; id = EAreaItemHectares; } // 4
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 0; baseunit = 2; unit1 = 1; unit2 = 3; name = qtn_cnv_type_energy;
- units =
- {
- CNV_UNIT { name = qtn_cnv_energ_item_calor; factor = 0.23884589662749592; id = EEnergItemCalor; }, // 0
- CNV_UNIT { name = qtn_cnv_energ_item_k_calor; factor = 0.00023884589662749592; id = EEnergItemKCalor; }, // 1
- CNV_UNIT { name = qtn_cnv_energ_item_joules; factor = 1.0; id = EEnergItemJoules; }, // 2
- CNV_UNIT { name = qtn_cnv_energ_item_k_joules; factor = 0.001; id = EEnergItemKJoules; }, // 3
- CNV_UNIT { name = qtn_cnv_energ_item_hrs_pw_h; factor = 0.00000037300002052; id = EEnergItemHrsPwH; }, // 4
- CNV_UNIT { name = qtn_cnv_energ_item_kw_h; factor = 0.00000027777777777778; id = EEnergItemKwH; }, // 5
- CNV_UNIT { name = qtn_cnv_energ_item_elec_vol; factor = 6241506000000000000.0; id = EEnergItemElecVol; } // 6
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 2; unit1 = 7; unit2 = 2; name = qtn_cnv_type_length;
- units =
- {
- CNV_UNIT { name = qtn_cnv_length_item_mm; factor = 1000.0; id = ELengthItemMm; }, // 0
- CNV_UNIT { name = qtn_cnv_length_item_cm; factor = 100.0; id = ELengthItemCm; }, // 1
- CNV_UNIT { name = qtn_cnv_length_item_metres; factor = 1.0; id = ELengthItemMetres; }, // 2
- CNV_UNIT { name = qtn_cnv_length_item_km; factor = 0.001; id = ELengthItemKm; }, // 3
- CNV_UNIT { name = qtn_cnv_length_item_inches; factor = 39.37007874015748; id = ELengthItemInches; }, // 4
- CNV_UNIT { name = qtn_cnv_length_item_feet; factor = 3.280839895013123; id = ELengthItemFeet; }, // 5
- CNV_UNIT { name = qtn_cnv_length_item_yards; factor = 1.0936132983377076; id = ELengthItemYards; }, // 6
- CNV_UNIT { name = qtn_cnv_length_item_miles; factor = 0.0006213711922373338; id = ELengthItemMiles; }, // 7
- CNV_UNIT { name = qtn_cnv_length_item_nm; factor = 0.0005399568034557234; id = ELengthItemNm; } // 8
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 1; unit1 = 5; unit2 = 2; name = qtn_cnv_type_mass;
- units =
- {
- CNV_UNIT { name = qtn_cnv_mass_item_milgrams; factor = 1000.0; id = EMassItemMilgrams; }, // 0
- CNV_UNIT { name = qtn_cnv_mass_item_grams; factor = 1.0; id = EMassItemGrams; }, // 1
- CNV_UNIT { name = qtn_cnv_mass_item_kilograms; factor = 0.001; id = EMassItemKilograms; }, // 2
- CNV_UNIT { name = qtn_cnv_mass_item_m_tons; factor = 0.000001; id = EMassItemMTons; }, // 3
- CNV_UNIT { name = qtn_cnv_mass_item_ounces; factor = 0.03527396194958041; id = EMassItemOunces; }, // 4
- CNV_UNIT { name = qtn_cnv_mass_item_pounds; factor = 0.002204622621848776; id = EMassItemPounds; }, // 5
- CNV_UNIT { name = qtn_cnv_mass_item_stones; factor = 0.0001574730444177697; id = EMassItemStones; } // 6
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 0; unit1 = 2; unit2 = 1; name = qtn_cnv_type_power;
- units =
- {
- CNV_UNIT { name = qtn_cnv_power_item_watts; factor = 1.0; id = EPowerItemWatts; }, // 0
- CNV_UNIT { name = qtn_cnv_power_item_k_watts; factor = 0.001; id = EPowerItemKWatts; }, // 1
- CNV_UNIT { name = qtn_cnv_power_item_horsepwr; factor = 0.001341021858656296; id = EPowerItemHorsepwr; } // 2
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 2; unit1 = 2; unit2 = 1; name = qtn_cnv_type_pressure;
- units =
- {
- CNV_UNIT { name = qtn_cnv_pressure_item_athm; factor = 0.00000986923266716013; id = EPressureItemAthm; }, // 0
- CNV_UNIT { name = qtn_cnv_pressure_item_bars; factor = 0.00001; id = EPressureItemBars; }, // 1
- CNV_UNIT { name = qtn_cnv_pressure_item_pasc; factor = 1.0; id = EPressureItemPasc; }, // 2
- CNV_UNIT { name = qtn_cnv_pressure_item_mmhg; factor = 0.0075006; id = EPressureItemMmhg; } // 3
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 2; unit1 = 1; unit2 = 0; istemperature = 1; name = qtn_cnv_type_temperature;
- units =
- {
- CNV_UNIT_TEMPERATURE { name = qtn_cnv_temp_item_celsius; factor = 1.0; offset = 0.0; min = -273.15; id = ETempItemCelsius; }, // 0
- CNV_UNIT_TEMPERATURE { name = qtn_cnv_temp_item_fahrenh; factor = 1.8; offset = 32; min = -459.67; id = ETempItemFahrenh; }, // 1
- CNV_UNIT_TEMPERATURE { name = qtn_cnv_temp_item_kelvin; factor = 1.0; offset = 273.15; id = ETempItemKelvin; } // 2
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 4; unit1 = 3; unit2 = 2; name = qtn_cnv_type_time;
- units =
- {
- CNV_UNIT { name = qtn_cnv_time_item_seconds; factor = 1.0; id = ETimeItemSeconds; }, // 0
- CNV_UNIT { name = qtn_cnv_time_item_minutes; factor = 0.016666666666666667; id = ETimeItemMinutes; }, // 1
- CNV_UNIT { name = qtn_cnv_time_item_hours; factor = 0.000277777777777778; id = ETimeItemHours; }, // 2
- CNV_UNIT { name = qtn_cnv_time_item_days; factor = 0.0000115740740740740741; id = ETimeItemDays; }, // 3
- CNV_UNIT { name = qtn_cnv_time_item_weeks; factor = 0.00000165343915343915343; id = ETimeItemWeeks; } // 4
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 1; unit1 = 2; unit2 = 0; name = qtn_cnv_type_velocity;
- units =
- {
- CNV_UNIT { name = qtn_cnv_vel_item_km_h; factor = 1.0; id = EVelItemKmH; }, // 0
- CNV_UNIT { name = qtn_cnv_vel_item_metres_sec; factor = 0.2777777777777778; id = EVelItemMetresSec; }, // 1
- CNV_UNIT { name = qtn_cnv_vel_item_miles_h; factor = 0.6213711922373341; id = EVelItemMilesH; }, // 2
- CNV_UNIT { name = qtn_cnv_vel_item_feet_sec; factor = 0.9113444152814232; id = EVelItemFeetSec; }, // 3
- CNV_UNIT { name = qtn_cnv_vel_item_knots; factor = 0.539957269941486; id = EVelItemKnots; } // 4
- };
- },
-
- CNV_CATEGORY
- {
- ischineseorder = 1; baseunit = 1; unit1 = 8; unit2 = 1; name = qtn_cnv_type_volume;
- units =
- {
- CNV_UNIT { name = qtn_cnv_vol_item_millilitres; factor = 1000.0; id = EVolItemMillilitres; },// 0
- CNV_UNIT { name = qtn_cnv_vol_item_litres; factor = 1.0; id = EVolItemLitres; }, // 1
- CNV_UNIT { name = qtn_cnv_vol_item_cub_mm; factor = 1000000.0; id = EVolItemCubMm; }, // 2
- CNV_UNIT { name = qtn_cnv_vol_item_cub_cm; factor = 1000.0; id = EVolItemCubCm; }, // 3
- CNV_UNIT { name = qtn_cnv_vol_item_cub_metres; factor = 0.001; id = EVolItemCubMetres; }, // 4
- CNV_UNIT { name = qtn_cnv_vol_item_cub_inches; factor = 61.023744094732294; id = EVolItemCubInches; }, // 5
- CNV_UNIT { name = qtn_cnv_vol_item_cub_feet; factor = 0.0353146667214886; id = EVolItemCubFeet; }, // 6
- CNV_UNIT { name = qtn_cnv_vol_item_gallons_uk; factor = 0.21996924829908782; id = EVolItemGallonsUk; }, // 7
- CNV_UNIT { name = qtn_cnv_vol_item_gallons_us; factor = 0.2641720523581485; id = EVolItemGallonsUs; }, // 8
- CNV_UNIT { name = qtn_cnv_vol_item_pints_im; factor = 1.7597539863927025; id = EVolItemPintsIm; }, // 9
- CNV_UNIT { name = qtn_cnv_vol_item_pints_us; factor = 1.8161659685377122; id = EVolItemPintsUs; }, // 10
- CNV_UNIT { name = qtn_cnv_vol_item_liq_pints; factor = 2.113376418865188; id = EVolItemLiqPints; }, // 11
- CNV_UNIT { name = qtn_cnv_vol_item_liq_ounc_us; factor = 33.81402270184301; id = EVolItemLiqOuncUs; }, // 12
- CNV_UNIT { name = qtn_cnv_vol_item_liq_ounc_uk; factor = 35.19507972785406; id = EVolItemLiqOuncUk; }, // 13
- CNV_UNIT { name = qtn_cnv_vol_item_barrels; factor = 0.006289810770432106; id = EVolItemBarrels; } // 14
- };
- }
- };
- }
-
-RESOURCE TBUF r_qtn_cnv_confirm_delete { buf = qtn_cnv_query_del_currency; }
-RESOURCE TBUF r_qtn_cnv_foreign {buf = qtn_cnv_rate_foreign; }
-RESOURCE TBUF r_qtn_cnv_home {buf = qtn_cnv_rate_home; }
-
-//Resource for MSK
-
-RESOURCE CBA r_cnv_mainform_softkeys
- {
- buttons =
- {
- CBA_BUTTON { id = EAknSoftkeyOptions; txt = text_softkey_option;},
- CBA_BUTTON { id = EAknSoftkeyExit; txt = text_softkey_exit; },
- CBA_BUTTON { id = EAknSoftkeyChange; txt =qtn_options_change;}
- };
- }
-
-RESOURCE LOCALISABLE_APP_INFO r_cnv_localisable_app_info
- {
- short_caption = qtn_cnv_app_caption_short;
- caption_and_icon =
- CAPTION_AND_ICON_INFO
- {
- caption = qtn_cnv_app_caption;
-#ifdef __SCALABLE_ICONS
- number_of_icons = 1;
- icon_file = APP_BITMAP_DIR"\\converter_aif.mif";
-#else
- number_of_icons = 2;
- icon_file = APP_BITMAP_DIR"\\Converter_aif.mbm";
-#endif
- };
- }
--- a/extras/converter/group/Converter_caption.rss Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the caption resource definition file for Converter.app
-* -------------------------------------------------------------------
-*
-*/
-
-
-
-#include <apcaptionfile.rh>
-#include <Converter.loc>
-
-RESOURCE CAPTION_DATA
- {
- caption = qtn_cnv_app_caption;
- shortcaption = qtn_cnv_app_caption_short;
- }
--- a/extras/converter/group/backup_registration.xml Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration>
- <passive_backup>
- <include_directory name = "\"/>
- </passive_backup>
- <restore requires_reboot = "no"/>
-</backup_registration>
\ No newline at end of file
--- a/extras/converter/group/bld.inf Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2002 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: This file provides the information required for building Converter
-*
-*/
-
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-// Help exports
-#include "../help/group/bld.inf"
-
-PRJ_EXPORTS
-./backup_registration.xml /epoc32/data/z/private/101f4668/backup_registration.xml
-./backup_registration.xml /epoc32/release/winscw/udeb/z/private/101f4668/backup_registration.xml
-./backup_registration.xml /epoc32/release/winscw/urel/z/private/101f4668/backup_registration.xml
-// export localised loc file
-../loc/Converter.loc APP_LAYER_LOC_EXPORT_PATH(converter.loc)
-../loc/ConverterEngine.loc APP_LAYER_LOC_EXPORT_PATH(converterengine.loc)
-
-// export IBY files
-../rom/Converter.iby CORE_APP_LAYER_IBY_EXPORT_PATH(converter.iby)
-../rom/Converterengine.iby CORE_APP_LAYER_IBY_EXPORT_PATH(converterengine.iby)
-../rom/ConverterResources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(converterresources.iby)
-
-PRJ_MMPFILES
-
-// #ifdef __SCALABLE_ICONS
-// gnumakefile converter_icons_aif_scalable_dc.mk
-// #else
-// gnumakefile converter_icons_aif_bitmaps_dc.mk
-// #endif
-
-engine.mmp
-ui.mmp
-
-PRJ_EXTENSIONS
-
-START EXTENSION s60/mifconv
-OPTION TARGETFILE converter_aif.mif
-OPTION SOURCES -c8,8 qgn_menu_cnv
-END
\ No newline at end of file
--- a/extras/converter/group/converter_icons_aif_bitmaps.mk Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2004 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: Icons makefile for project Converter
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\system\apps\converter
-ICONTARGETFILENAME=$(TARGETDIR)\converter_aif.mbm
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_cnv_lst.bmp \
- /c8,8 qgn_menu_cnv_cxt.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/extras/converter/group/converter_icons_aif_bitmaps_dc.mk Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2004 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: Icons makefile for project Converter
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\RESOURCE\APPS
-ICONTARGETFILENAME=$(TARGETDIR)\converter_aif.mbm
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_cnv_lst.bmp \
- /c8,8 qgn_menu_cnv_cxt.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/extras/converter/group/converter_icons_aif_scalable.mk Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-#
-# Copyright (c) 2004 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: Icons makefile for project Converter
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\system\apps\converter
-ICONTARGETFILENAME=$(TARGETDIR)\converter_aif.mif
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_cnv.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/extras/converter/group/converter_icons_aif_scalable_dc.mk Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-#
-# Copyright (c) 2004 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: Icons makefile for project Converter
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\RESOURCE\APPS
-ICONTARGETFILENAME=$(TARGETDIR)\converter_aif.mif
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# Configure these.
-#
-# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
-# MifConv if the mask detph is defined.
-#
-# NOTE 2: Usually, source paths should not be included in the bitmap
-# definitions. MifConv searches for the icons in all icon directories in a
-# predefined order, which is currently \s60\icons, \s60\bitmaps2.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_cnv.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/extras/converter/group/converter_reg.rss Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2004 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: This file contains the application registration resource.
-*
-*/
-
-
-
-#include <appinfo.rh>
-#include <Converter.rsg>
-
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x101f4668 // Define your application UID here
-
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file = "converter";
- localisable_resource_file = APP_RESOURCE_DIR"\\converter";
- localisable_resource_id = R_CNV_LOCALISABLE_APP_INFO;
- }
-
-// End of File
--- a/extras/converter/group/engine.mmp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the project definition file. It defines the application UIDs,
-* source code, paths and libraries needed.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-LANGUAGE_IDS
-TARGET converterengine.dll
-TARGETTYPE dll
-UID 0x1000008d 0x101f4669
-
-VENDORID VID_DEFAULT
-
-CAPABILITY CAP_GENERAL_DLL
-
-SOURCEPATH ../engine/Src
-SOURCE DllMain.cpp CCnvConverter.cpp CCnvCategory.cpp
-SOURCE TCnvCategory.cpp TCnvUnit.cpp
-
-USERINCLUDE ../engine/Inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib bafl.lib estor.lib avkon.lib
-
-
- #if defined(ARMCC)
- DEFFILE ../eabi/ConverterEngine_EKA2.def
- #elif defined( WINSCW )
- DEFFILE ../BWinsCw/ConverterEngine_EKA2.def
- #elif defined( WINS )
- DEFFILE ../BWins/ConverterEngine_EKA2.def
- #else
- DEFFILE ../BMarm/ConverterEngine_EKA2.def
- #endif
-
--- a/extras/converter/group/ui.mmp Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is the project definition file. It defines the application UIDs,
-* source code, paths, bitmaps and libraries needed.
-*
-*/
-
-
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-EPOCSTACKSIZE 0X5000
-
-TARGET converter.exe
-TARGETTYPE exe
-
-UID 0x100039ce 0x101f4668
-
-VENDORID VID_DEFAULT
-
-CAPABILITY CAP_APPLICATION
-
-APP_LAYER_SYSTEMINCLUDE
-
-START RESOURCE ../group/Converter.rss
-HEADER
-
-TARGETPATH APP_RESOURCE_DIR
-
-LANGUAGE_IDS
-END
-
-START RESOURCE ../group/converter_reg.rss
-DEPENDS converter.rsg
-// Do not change the UID below.
-TARGETPATH /private/10003a3f/apps
-END
-
-
-SOURCEPATH ../Ui/Src
-SOURCE CCnvApplication.cpp CCnvDocument.cpp CCnvAppUi.cpp
-SOURCE CCnvMainForm.cpp CCnvRatesForm.cpp
-
-USERINCLUDE ../group ../Ui/Src
-
-
-SYSTEMINCLUDE ../engine/Inc
-
-LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
-LIBRARY eikcoctl.lib avkon.lib eikdlg.lib
-LIBRARY eikctl.lib // CEikFloatingPointEditor
-LIBRARY commonengine.lib // StringLoader
-LIBRARY estor.lib // RFileWriteStream, RFileReadStream
-LIBRARY commonui.lib // CErrorUI
-LIBRARY featmgr.lib // Feature Manager
-LIBRARY converterengine.lib
-LIBRARY hlplch.lib // HlpLauncher
-LIBRARY efsrv.lib
-
-
Binary file extras/converter/help/data/xhtml.zip has changed
--- a/extras/converter/help/group/bld.inf Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* 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:
-* Export help related files.
-*
-*/
-
-#include <platform_paths.hrh>
-PRJ_EXPORTS
-:zip ../data/xhtml.zip /epoc32/data/z/resource/ overwrite
-:zip ../data/xhtml.zip /epoc32/winscw/c/resource/ overwrite
-
-../inc/cnv.hlp.hrh MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/cnv.hlp.hrh)
-../rom/converterhelps_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(converterhelps_variant.iby)
--- a/extras/converter/help/inc/cnv.hlp.hrh Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* 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:
-*
-*/
-
-//
-// cnv.hlp.hrh generated by CSXHelp Utilities.
-//
-
-#ifndef __CNV_HLP_HRH__
-#define __CNV_HLP_HRH__
-
-_LIT(KCNV_HLP_RATES, "CNV_HLP_RATES"); //
-_LIT(KCNV_HLP_MAIN_STATE, "CNV_HLP_MAIN_STATE"); //
-
-#endif
\ No newline at end of file
--- a/extras/converter/help/rom/converterhelps_variant.iby Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* 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:
-*
-*/
-
-#ifndef __CONVERTERHELPS_VARIANT_IBY__
-#define __CONVERTERHELPS_VARIANT_IBY__
-
-#if defined(FF_S60_HELPS_IN_USE)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4668\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4668\contents.zip)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4668\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4668\index.xml)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4668\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4668\keywords.xml)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4668\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4668\meta.xml)
-#endif
-
-#endif
\ No newline at end of file
--- a/extras/converter/loc/Converter.loc Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is a localisation file for Converter.app
-* A .loc file is the one and only place where the logical strings
-* to be localised are defined.
-* -------------------------------------------------------------------
-*
-*/
-
-
-
-// LOCALISATION STRINGS
-
-
-// -- Menu items -------------------------------------------------------------
-
-// d: Command in options list (main form).
-// d: Changes the type of conversion being performed (length, area, temp, etc)
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_set_type "Set type"
-
-// d: Command in options list (main form).
-// d: Changes the current unit (meters, feet, mm, etc)
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_set_unit "Set unit"
-
-// d: Command in options list (main form).
-// d: Changes the current currency unit
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_set_currency "Set currency"
-
-// d: Command in options list (main form).
-// d: Opens rates form
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_rates "Rates"
-
-// d: Command in options list (rates form).
-// d: used for changing the name of a currency
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_rename_currency "Rename Currency"
-
-// d: Command in options list (rates form).
-// d: used for selecting a new base currency
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_base_currency "Set as base currency"
-
-// d: Command in options list (rates form).
-// d: used to save edited currency rates
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_save "Save"
-
-// d: Command in options list (rates form).
-// d: used to add new currencies
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_add_currency_rate "Add Currency Rate"
-
-// d: Command in options list (rates form).
-// d: used to delete currencies
-// l: list_single_pane_t1_cp2
-//
-#define qtn_cnv_opt_delete_currency "Delete Currency Rate"
-
-// -- Form texts -------------------------------------------------------------
-
-// d: Form field label (main form)
-// d: Identifies popup field for setting type of conversion
-// l: form_field_data_pane_t1
-//
-#define qtn_cnv_label_type "Type"
-
-// d: Form field label (main form)
-// d: Identifies popup field for setting conversion unit
-// l: form_field_data_pane_t1
-//
-#define qtn_cnv_label_unit "Unit"
-
-// d: Form field label (main form)
-// d: Identifies popup field for entering data
-// l: form_field_data_pane_t1
-//
-#define qtn_cnv_label_amount "Amount"
-
-// d: Form title (rates form)
-// d: Displayed while in rates form
-// l: title_pane_t2/opt9
-//
-#define qtn_cnv_rates_title "Rates (1 %U)"
-
-// -- Query and note texts ---------------------------------------------------
-
-// d: Confirmation that all currency rates are about to be reset
-// d: Note that the confirmation dialog only fits 20-25 characters comfortably on a line
-// l: popup_note_window
-//
-#define qtn_cnf_conf_base_currency "All set rates will be cleared.Continue?"
-
-// d: Query prompt used when renaming a currency
-// l: popup_query_data_window
-//
-#define qtn_cnv_edit_name_prompt "Currency name:"
-
-// d: Error note text (main form)
-// d: Displayed when attempting to convert using a currency whose rate has not be established.
-// l: popup_note_window
-//
-#define qtn_cnv_error_no_rate_singular "Currency rate\nis missing."
-
-// d: Error note text (main form)
-// d: Displayed when attempting to convert using a currency whose rate has not be established.
-// l: popup_note_window
-//
-#define qtn_cnv_error_no_rate_plural "Currency rates\nare missing."
-
-// d: Error note text (main form)
-// d: Displayed when attempting to convert a value smaller than the units minimum value
-// l: popup_note_window
-//
-#define qtn_cnv_error_invalid "Invalid value."
-
-
-// d: Confirmation that the currency on focus will be deleted
-// d: Note that the confirmation dialog only fits 20-25 characters comfortably on a line
-// l: popup_note_window
-//
-#define qtn_cnv_query_del_currency "Delete Currency Rate %U?"
-
-
-// -- Application captions ---------------------------------------------------
-
-//d:The application's caption string for the AIF file
-//d:Long version
-//l:list_single_large_graphic_pane_t1
-//
-#define qtn_cnv_app_caption "Converter"
-
-//d:The application's caption string for the AIF file
-//d:Short version
-//l:cell_app_pane_t1
-//
-#define qtn_cnv_app_caption_short "Converter"
-
-
-// -- Unit category names ----------------------------------------------------
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_currency "Currency"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_area "Area"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_energy "Energy"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_length "Length"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_mass "Mass"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_power "Power"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_pressure "Pressure"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_temperature "Temperature"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_time "Time"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_velocity "Velocity"
-
-// d: Popup field choice (main form)
-// d: Unit category
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_type_volume "Volume"
--- a/extras/converter/loc/ConverterEngine.loc Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,708 +0,0 @@
-/*
-* Copyright (c) 2002 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:
-* This is a localisation file for Converter.app
-* A .loc file is the one and only place where the logical strings
-* to be localised are defined.
-* -------------------------------------------------------------------
-*
-*/
-
-
-
-// LOCALISATION STRINGS
-
-
-
-// -- Unit names -------------------------------------------------------------
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_usd "USD"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_eur "EUR"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_gbp "GBP"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_jpy "JPY"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_aed "AED"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_aud "AUD"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_bgl "BGL"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_brr "BRR"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_cad "CAD"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_chf "CHF"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_cny "CNY"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_czk "CZK"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_dkk "DKK"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_eek "EEK"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_egp "EGP"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_hkd "HKD"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_hrk "HRK"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_huf "HUF"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_idr "IDR"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_ils "ILS"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_inr "INR"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_isk "ISK"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_mxp "MXP"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_myr "MYR"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_nok "NOK"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_nzd "NZD"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_php "PHP"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_pln "PLN"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_rol "ROL"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_rur "RUR"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_sar "SAR"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_sek "SEK"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_sgd "SGD"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_sit "SIT"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_skk "SKK"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_thb "THB"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_trl "TRL"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_chi_cnv_currency_twd "TWD"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_chi_cnv_currency_krw "KRW"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_uah "UAH"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_yun "YUN"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_currency_zar "ZAR"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-
-#define qtn_cnv_area_item_sq_mm "Square millimetres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_sq_cm "Square centimetres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_sq_metres "Square metres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_ares "Ares"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_hectares "Hectares"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_sq_km "Square kilometres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_sq_inches "Square inches"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_sq_feet "Square feet"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_sq_yards "Square yards"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_acres "Acres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_area_item_sq_miles "Square miles"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_energ_item_calor "Calories"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_energ_item_k_calor "Kilocalories"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_energ_item_joules "Joules"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_energ_item_k_joules "Kilojoules"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_energ_item_hrs_pw_h "Horsepower-hours"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_energ_item_kw_h "Kilowatt-hours"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_energ_item_elec_vol "Electron volts"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_mm "Millimetres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_cm "Centimetres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_metres "Metres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_km "Kilometres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_inches "Inches"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_feet "Feet"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_yards "Yards"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_miles "Miles"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_length_item_nm "Nautical miles"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_mass_item_milgrams "Milligrams"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_mass_item_grams "Grams"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_mass_item_kilograms "Kilograms"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_mass_item_m_tons "Metric tons"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_mass_item_ounces "Ounces"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_mass_item_pounds "Pounds"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_mass_item_stones "Stones"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_power_item_watts "Watts"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_power_item_k_watts "Kilowatts"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_power_item_horsepwr "Horsepower"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_pressure_item_athm "Atmospheres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_pressure_item_bars "Bars"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_pressure_item_pasc "Pascals"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_pressure_item_mmhg "mm Hg"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_temp_item_celsius "Celsius"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_temp_item_fahrenh "Fahrenheit"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_temp_item_kelvin "Kelvin"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_time_item_seconds "Seconds"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_time_item_minutes "Minutes"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_time_item_hours "Hours"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_time_item_days "Days"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_time_item_weeks "Weeks"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vel_item_km_h "Kilometres/hour"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vel_item_metres_sec "Metres/second"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vel_item_miles_h "Miles/hour"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vel_item_feet_sec "Feet/second"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vel_item_knots "Knots"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_millilitres "Millilitres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_litres "Litres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_cub_mm "Cubic mm"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_cub_cm "Cubic cm"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_cub_metres "Cubic metres"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_cub_inches "Cubic inches"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_cub_feet "Cubic feet"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_gallons_uk "Gallons (UK)"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_gallons_us "Gallons (US)"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_pints_im "Pints (UK)"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_pints_us "Dry pints (US)"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_liq_pints "Liquid pints (US)"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_liq_ounc_us "Liquid ounces (US)"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_liq_ounc_uk "Liquid ounces (UK)"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-//
-#define qtn_cnv_vol_item_barrels "Barrels"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-
-#define qtn_cnv_rate_home "Home"
-
-// d: Popup field choice (main form)
-// d: Unit item
-// l: list_form_graphic_pane_t1
-#define qtn_cnv_rate_foreign "Foreign"
-
-
--- a/extras/converter/rom/Converter.iby Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2002 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: Image description file for project Converter
-*
-*/
-
-
-
-#ifndef __CONVERTER_IBY__
-#define __CONVERTER_IBY__
-
-S60_APP_EXE(converter)
-S60_APP_AIF_ICONS(converter)
-S60_APP_AIF_RSC(converter)
-data=DATAZ_\private\101f4668\backup_registration.xml private\101f4668\backup_registration.xml
-#endif __CONVERTER_IBY__
--- a/extras/converter/rom/ConverterResources.iby Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2002 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: Image description file for Converter
-*
-*
-*/
-
-
-
-#ifndef __CONVERTER_RESOURCES_IBY__
-#define __CONVERTER_RESOURCES_IBY__
-
-//Resource file(s) for CONVERTER application
-#ifndef NO_PIMS_IN_ROM
-S60_APP_CAPTION(Converter)
-S60_APP_RESOURCE(Converter)
-#endif
-//Resource file(s) for CONVERTERENGINE application
-//data=ABI_DIR\BUILD_DIR\ConverterEngine.rsc System\Data\Converterengine.rsc
-
-#endif
\ No newline at end of file
--- a/extras/converter/rom/Converterengine.iby Wed Apr 14 15:58:57 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2002 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: Image description file for converter engine
-*
-*
-*/
-
-
-
-#ifndef __CONVERTERENGINE_IBY__
-#define __CONVERTERENGINE_IBY__
-
-file=ABI_DIR\BUILD_DIR\converterengine.dll SHARED_LIB_DIR\converterengine.dll
-
-#endif __CONVERTERENGINE_IBY__
--- a/extras/group/bld.inf Wed Apr 14 15:58:57 2010 +0300
+++ b/extras/group/bld.inf Tue May 11 16:14:55 2010 +0300
@@ -21,7 +21,6 @@
// extras subsystem
#include "../about/group/bld.inf"
#include "../calcsoft/group/bld.inf"
-#include "../converter/group/bld.inf"