extras/converter/group/Converter.rss
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:40:41 +0200
branchRCL_3
changeset 10 ebe992a85829
parent 0 3ee3dfdd8d69
permissions -rw-r--r--
Revision: 201009 Kit: 201010

/*
* 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
        };
    }