Skip to content

Commit

Permalink
Current state
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghus committed Sep 9, 2019
1 parent 76b5bb5 commit 3fa38c1
Show file tree
Hide file tree
Showing 38 changed files with 2,493 additions and 3,981 deletions.
50 changes: 34 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
![Icon](https://raw.githubusercontent.com/tanghus/currency-converter-qml/master/harbour-currencyconverter.png) Currency Converter for SailfishOS
=================================

| branch | status |
| ----------- | ------ |
| master | [![Build Status](https://travis-ci.org/tanghus/currency-converter-qml.png?branch=master)](https://travis-ci.org/tanghus/currency-converter-qml) |
Convert currencies using data configurable currency rates providers.

[![flattr this](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=tanghus&url=https%3A%2F%2Fgithub.com%2Ftanghus%2Fcurrency-converter-qml)
Currency Converter per default uses {https://ExchangeRatesAPI.io](https://exchangeratesapi.io/)
that offers daily exchange rates for a limited set of currencies (currently 33) published by
the [European Central Bank](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html).

Convert currencies using data from Yahoo! Finance.
With Currency Converter you can select different Exchange Rates Providers to get
faster updates, more options, and a wider set of currencies.
Most commercial providers also offers a free version, but with some caveats, as for
example not being able to request a base currency, with the result that each time you
request one new currency pair, all of them will be downloaded.
So unless you *really* need to, I strongly recommend sticking with the default.

**Current** features:
- Select to and/or from the dropdown list and the converted amount will be updated.
- Change the amount to be converted and the result will be updated.
- Selected currencies and amount is saved between sessions.
- Refresh selected convertion when no activity for a user defined period of time, or by request.
- Selected exchange rates is shown real-time on the home screen cover.
- Swap currently selected currencies.
For the average traveller or businessperson the default selection should be more than enough.

**Planned** features (in time for first release):
- Well, pretty much done, I think.
If you - like me - have a combination of lousy math skills and bad short-time memory,
the quick switch of currencies comes in handy ;)

Currency Converter keeps an internal list of registered, legal currencies, which is
used together with a list of the currencies offered by the chosen provider. The latter
is refreshed when the app is loaded, except if there is no network connection, or if
you have explicitly chosen to work offline.
For this Currency Converter uses an effective caching mechanism. Based on the update interval
of the current provider, and timestamps on each currency pair (e.g. EUR/USD) it only fetches
online rates when needed - or, again, when explicitly told to.

You can chose to delete the cache for one pair or the entire cache.

**Be aware**, that if you delete the entire cache, the list of available currencies will
have to be downloaded once again. It's not a very big payload, though, but if you're offline
it could be problematic.

**Also be aware**, that the list of available currencies is dependant on which 'From Currency'
you had selected selected when the app is loaded.
That means, that if you change the 'From Currency' right after you go offline, there is
no guarantee that a list of the available currencies can be generated from the cache.
To remedy this, change to the 'From Currency' you need to be cached, close the app, and
launch it again. I'll put an option in to load them on demand if I get that request.

**Planned** features (or maybe just brain barfs):
- Select (short) list of currencies to monitor and notify on change (within a range).

22 changes: 13 additions & 9 deletions app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@ OTHER_FILES += Changelog README.md icons flags
DISTFILES += qml/cover/CoverPage.qml \
TODO.md \
qml/$${TARGET}.qml \
qml/components/Currencies.qml \
qml/components/Currency.qml \
qml/components/CurrencyCombo.qml \
qml/components/CurrencyModel.qml \
qml/components/CurrencyPair.qml \
qml/components/qmldir \
qml/components/Env.qml \
qml/components/Network.qml \
qml/components/ExchangeRatesAPIProvider.qml \
qml/pages/FrontPage.qml \
qml/pages/SettingsDialog.qml \
qml/pages/SearchPage.qml \
qml/pages/AboutPage.qml \
qml/components/ExchangeProvider.qml \
qml/components/Requester.qml \
qml/components/Settings.qml \
qml/components/JSONListModel.qml \
qml/components/CurrencyModel.qml \
qml/components/CurrencyItem.qml \
qml/components/CurrencyCombo.qml \
qml/components/CurrencyList.qml \
qml/components/Notification.qml \
qml/components/Storage.qml \
qml/components/ExchangeProvider.qml \
qml/pages/FrontPage.qml \
qml/pages/SettingsDialog.qml \
qml/pages/AboutPage.qml \
rpm/$${TARGET}.changes.in \
rpm/$${TARGET}.changes.run.in \
rpm/$${TARGET}.spec \
Expand Down
304 changes: 152 additions & 152 deletions data/currencies.csv
Original file line number Diff line number Diff line change
@@ -1,152 +1,152 @@
"code","num","symbol","name"
"AED","د.إ","784","UAE Dirham"
"AFN","Af","971","Afghan Afghani"
"ALL","L","008","Albanian Lek"
"AMD","Դ","051","Armenian Dram"
"AOA","Kz","973","Kwanza"
"ARS","$","032","Argentine Peso"
"AUD","$","036","Australian Dollar"
"AWG","ƒ","533","Aruban Guilder/Florin"
"AZN","ман","944","Azerbaijanian Manat"
"BAM","КМ","977","Konvertibilna Marka"
"BBD","$","052","Barbados Dollar"
"BDT","","050","Bangladeshi Taka"
"BGN","лв","975","Bulgarian Lev"
"BHD","ب.د","048","Bahraini Dinar"
"BIF","","108","Burundi Franc"
"BMD","$","060","Bermudian Dollar"
"BND","$","096","Brunei Dollar"
"BOB","Bs.","068","Bolivian Boliviano"
"BRL","R$","986","Brazilian Real"
"BSD","$","044","Bahamian Dollar"
"BTN","","064","Bhutan Ngultrum"
"BWP","P","072","Botswanan Pula"
"BYR","Br","974","Belarussian Ruble"
"BZD","$","084","Belize Dollar"
"CAD","$","124","Canadian Dollar"
"CDF","","976","Congolese Franc"
"CHF","","756","Swiss Franc"
"CLP","$","152","Chilean Peso"
"CNY","¥","156","Chinese Yuan"
"COP","$","170","Colombian Peso"
"CRC","","188","Costa Rican Colon"
"CUP","$","192","Cuban Peso"
"CVE","$","132","Cape Verde Escudo"
"CZK","","203","Czech Koruna"
"DJF","","262","Djibouti Franc"
"DKK","kr","208","Danish Krone"
"DOP","$","214","Dominican Peso"
"DZD","د.ج","012","Algerian Dinar"
"EGP","£","818","Egyptian Pound"
"ERN","Nfk","232","Eritrean Nakfa"
"ETB"," 230","Ethiopian Birr"
"EUR","","978","Euro"
"FJD","$","242","Fiji Dollar"
"FKP","£","238","Falkland Islands Pound"
"GBP","£","826","Pound Sterling"
"GEL","","981","Georgian Lari"
"GHS","","936","Ghanaian Cedi"
"GIP","£","292","Gibraltar Pound"
"GMD","D","270","Gambian Dalasi"
"GNF","","324","Guinea Franc"
"GTQ","Q","320","Guatemalan Quetzal"
"GYD","$","328","Guyana Dollar"
"HKD","$","344","Hong Kong Dollar"
"HNL","L","340","Honduran Lempira"
"HRK","Kn","191","Croatian Kuna"
"HTG","G","332","Haitian Gourde"
"HUF","Ft","348","Hungarian Forint"
"IDR","Rp","360","Indonesian Rupiah"
"ILS","","376","New Israeli Shekel"
"INR","","356","Indian Rupee"
"IQD","ع.د","368","Iraqi Dinar"
"IRR","","364","Iranian Rial"
"ISK","Kr","352","Iceland Krona"
"JMD","$","388","Jamaican Dollar"
"JOD","د.ا","400","Jordanian Dinar"
"JPY","¥","392","Japanese Yen"
"KES","Sh","404","Kenyan Shilling"
"KGS"," 417","Kyrgyzstani Som"
"KHR","","116","Cambodian Riel"
"KPW","","408","North Korean Won"
"KRW","","410","South Korean Won"
"KWD","د.ك","414","Kuwaiti Dinar"
"KYD","$","136","Cayman Islands Dollar"
"KZT","","398","Kazakhstani Tenge"
"LAK","","418","Laotian Kip"
"LBP","ل.ل","422","Lebanese Pound"
"LKR","Rs","144","Sri Lanka Rupee"
"LRD","$","430","Liberian Dollar"
"LSL","L","426","Lesotho Loti"
"LYD","ل.د","434","Libyan Dinar"
"MAD","د.م.","504","Moroccan Dirham"
"MDL","L","498","Moldavian Leu"
"MGA","","969","Malagasy Ariary"
"MKD","ден","807","Macedonian Denar"
"MMK","K","104","Myanmar Kyat"
"MNT","","496","Mongolian Tugrik"
"MOP","P","446","Macanese Pataca"
"MRO","UM","478","Mauritanian Ouguiya"
"MUR","","480","Mauritius Rupee"
"MVR","ރ.","462","Maldivan Rufiyaa"
"MWK","MK","454","Malawian Kwacha"
"MXN","$","484","Mexican Peso"
"MYR","RM","458","Malaysian Ringgit"
"MZN","MTn","943","Mozambican Metical"
"NAD","$","516","Namibia Dollar"
"NGN","","566","Nigerian Naira"
"NIO","C$","558","Nicaraguan Cordoba Oro"
"NOK","kr","578","Norwegian Krone"
"NPR","","524","Nepalese Rupee"
"NZD","$","554","New Zealand Dollar"
"OMR","ر.ع.","512","Rial Omani"
"PAB","B/.","590","Panaman Balboa"
"PEN","S/.","604","Peruvian Nuevo Sol"
"PGK","K","598","Papua New Guinean Kina"
"PHP","","608","Philippine Peso"
"PKR","","586","Pakistan Rupee"
"PLN","","985","Polish Zloty"
"PYG","","600","Paraguayan Guarani"
"QAR","ر.ق","634","Qatari Rial"
"RON","L","946","Romania Leu"
"RSD","din","941","Serbian Dinar"
"RUB","р.","643","Russian Ruble"
"RWF","","646","Rwanda Franc"
"SAR","ر.س","682","Saudi Riyal"
"SBD","$","090","Solomon Islands Dollar"
"SCR","","690","Seychelles Rupee"
"SDG","£","938","Sudanese Pound"
"SEK","kr","752","Swedish Krona"
"SGD","$","702","Singapore Dollar"
"SHP","£","654","Saint Helena Pound"
"SLL","Le","694","Sierra Leonean Leone"
"SOS","Sh","706","Somali Shilling"
"SRD","$","968","Suriname Dollar"
"STD","Db","678","Sao Tome and Principe Dobra"
"SYP","ل.س","760","Syrian Pound"
"SZL","L","748","Swazi Lilangeni"
"THB","฿","764","Thai Baht"
"TJS","ЅМ","972","Tajikistani Somoni"
"TMT","m","934","Turkmenistan Manat"
"TND","د.ت","788","Tunisian Dinar"
"TOP","T$","776","Tongan Pa’anga"
"TRY","","949","Turkish Lira"
"TTD","$","780","Trinidad and Tobago Dollar"
"TWD","$","901","Taiwan Dollar"
"TZS","Sh","834","Tanzanian Shilling"
"UAH","","980","Ukrainian Hryvnia"
"UGX","Sh","800","Uganda Shilling"
"USD","$","840","US Dollar"
"UYU","$","858","Uruguayan Peso"
"UZS","","860","Uzbekistan Sum"
"VEF","Bs F","937","Venezuelan Bolivar Fuerte"
"VND","","704","Vietnamese Dong"
"VUV","Vt","548","Vanuatu Vatu"
"WST","T","882","Samoan Tala"
"XAF","","950","CFA Franc BCEAO"
"XCD","$","951","East Caribbean Dollar"
"XPF","","953","CFP Franc"
"YER","","886","Yemeni Rial"
"ZAR","R","710","Rand"
"ZMW","ZK","967","Zambian Kwacha"
"ZWL","$","932","Zimbabwe Dollar"
"code","symbol","num","name"
"AED","\u062F\u002E\u0625","784","UAE Dirham"
"AFN","\u0041\u0066","971","Afghan Afghani"
"ALL","\u004c","008","Albanian Lek"
"AMD","\u058F","051","Armenian Dram"
"AOA","\u004b\u007a","973","Kwanza"
"ARS","\u0024","032","Argentine Peso"
"AUD","\u0024","036","Australian Dollar"
"AWG","\u0192","533","Aruban Guilder/Florin"
"AZN","\u20BC","944","Azerbaijanian Manat"
"BAM","\u041a\u041c","977","Konvertibilna Marka"
"BBD","\u0024","052","Barbados Dollar"
"BDT","\u09F3","050","Bangladeshi Taka"
"BGN","\u043b\u0432","975","Bulgarian Lev"
"BHD","\u0628\u002e\u062f","048","Bahraini Dinar"
"BIF","\u20A3","108","Burundi Franc"
"BMD","\u0024","060","Bermudian Dollar"
"BND","\u0024","096","Brunei Dollar"
"BOB","\u0042\u0073\u002e","068","Bolivian Boliviano"
"BRL","R\u0024","986","Brazilian Real"
"BSD","\u0024","044","Bahamian Dollar"
"BTN","\u004e\u0075\u002e","064","Bhutan Ngultrum"
"BWP","\u0050","072","Botswanan Pula"
"BYR","\u0042\u0072","974","Belarussian Ruble"
"BZD","\u0024","084","Belize Dollar"
"CAD","\u0024","124","Canadian Dollar"
"CDF","\u20A3","976","Congolese Franc"
"CHF","\u20A3","756","Swiss Franc"
"CLP","\u0024","152","Chilean Peso"
"CNY","\u00a5","156","Chinese Yuan"
"COP","\u0024","170","Colombian Peso"
"CRC","\u20A1","188","Costa Rican Colon"
"CUP","\u0024","192","Cuban Peso"
"CVE","\u0024","132","Cape Verde Escudo"
"CZK","\u004b\u010d","203","Czech Koruna"
"DJF","\u20A3","262","Djibouti Franc"
"DKK","\u006b\u0072","208","Danish Krone"
"DOP","\u0024","214","Dominican Peso"
"DZD","\u062f\u002e\u062c","012","Algerian Dinar"
"EGP","\u00a3","818","Egyptian Pound"
"ERN","\u004e\u0066\u006b","232","Eritrean Nakfa"
"ETB","\u0042\u0072","230","Ethiopian Birr"
"EUR","\u20AC","978","Euro"
"FJD","\u0024","242","Fiji Dollar"
"FKP","\u00a3","238","Falkland Islands Pound"
"GBP","\u00a3","826","Pound Sterling"
"GEL","\u10da","981","Georgian Lari"
"GHS","\u20b5","936","Ghanaian Cedi"
"GIP","\u00a3","292","Gibraltar Pound"
"GMD","\u0044","270","Gambian Dalasi"
"GNF","\u20A3","324","Guinea Franc"
"GTQ","\u0051","320","Guatemalan Quetzal"
"GYD","\u0024","328","Guyana Dollar"
"HKD","\u0024","344","Hong Kong Dollar"
"HNL","\u004c","340","Honduran Lempira"
"HRK","\u004b\u006e","191","Croatian Kuna"
"HTG","\u004b\u006e","332","Haitian Gourde"
"HUF","\u0046\u0074","348","Hungarian Forint"
"IDR","\u0052\u0070","360","Indonesian Rupiah"
"ILS","\u20aa","376","New Israeli Shekel"
"INR","\u20b9","356","Indian Rupee"
"IQD","\u0639\u002e\u062f","368"Iraqi Dinar"
"IRR","\ufdfc","364","Iranian Rial"
"ISK","\u004b\u0072","352","Iceland Krona"
"JMD","\u0024","388","Jamaican Dollar"
"JOD","\u062f\u002e\u0627","400","Jordanian Dinar"
"JPY","\u00a5","392","Japanese Yen"
"KES","\u0053\u0068","404","Kenyan Shilling"
"KGS","\u0441\u043e\u043c","417","Kyrgyzstani Som"
"KHR","\u17db","116","Cambodian Riel"
"KPW","\u20a9","408","North Korean Won"
"KRW","\u20a9","410","South Korean Won"
"KWD","\u062f\u002e\u0643","414","Kuwaiti Dinar"
"KYD","\u0024","136","Cayman Islands Dollar"
"KZT","\u3012","398","Kazakhstani Tenge"
"LAK","\u20ad","418","Laotian Kip"
"LBP","\u0644\u002e\u0644","422","Lebanese Pound"
"LKR","\u0052\u0073","144","Sri Lanka Rupee"
"LRD","\u0024","430","Liberian Dollar"
"LSL","\u004c","426","Lesotho Loti"
"LYD","\u0644\u002e\u062f","434","Libyan Dinar"
"MAD","\u062f\u002e\u0645.","504","Moroccan Dirham"
"MDL","\u004c","498","Moldavian Leu"
"MGA","\u0041\u0072","969","Malagasy Ariary"
"MKD","\u0434\u0435\u043d","807","Macedonian Denar"
"MMK","\u004b","104","Myanmar Kyat"
"MNT","\u20ae","496","Mongolian Tugrik"
"MOP","\u0050","446","Macanese Pataca"
"MRO","\u0055\u004d","478","Mauritanian Ouguiya"
"MUR","\u20a8","480","Mauritius Rupee"
"MVR","\u0783\u002e","462","Maldivan Rufiyaa"
"MWK","\u004d\u004b","454","Malawian Kwacha"
"MXN","\u0024","484","Mexican Peso"
"MYR","\u0052\u004d","458","Malaysian Ringgit"
"MZN","\u004d\u0054\u006e","943","Mozambican Metical"
"NAD","\u0024","516","Namibia Dollar"
"NGN","\u20a6","566","Nigerian Naira"
"NIO","C\u0024","558","Nicaraguan Cordoba Oro"
"NOK","\u006b\u0072","578","Norwegian Krone"
"NPR","\u20a8","524","Nepalese Rupee"
"NZD","\u0024","554","New Zealand Dollar"
"OMR","\u0631\u002e\u0639\u002e","512","Rial Omani"
"PAB","\u0042\u002f\u002e","590","Panaman Balboa"
"PEN","\u0053\u002f\u002e","604","Peruvian Nuevo Sol"
"PGK","\u004b","598","Papua New Guinean Kina"
"PHP","\u20b1","608","Philippine Peso"
"PKR","\u20a8","586","Pakistan Rupee"
"PLN","\u007a\u0142","985","Polish Zloty"
"PYG","\u20b2","600","Paraguayan Guarani"
"QAR","\u0631\u002e\u0642","634","Qatari Rial"
"RON","\u004c","946","Romania Leu"
"RSD","\u0064\u0069\u006e","941","Serbian Dinar"
"RUB","\u20bd","643","Russian Ruble"
"RWF","\u20A3","646","Rwanda Franc"
"SAR","\u0631\u002e\u0633","682","Saudi Riyal"
"SBD","\u0024","090","Solomon Islands Dollar"
"SCR","\u20a8","690","Seychelles Rupee"
"SDG","\u00a3","938","Sudanese Pound"
"SEK","\u006b\u0072","752","Swedish Krona"
"SGD","\u0024","702","Singapore Dollar"
"SHP","\u00a3","654","Saint Helena Pound"
"SLL","\u004c\u0065","694","Sierra Leonean Leone"
"SOS","\u0053\u0068","706","Somali Shilling"
"SRD","\u0024","968","Suriname Dollar"
"STD","\u0044\u0062","678","Sao Tome and Principe Dobra"
"SYP","\u0644\u002e\u0633","760","Syrian Pound"
"SZL","\u004c","748","Swazi Lilangeni"
"THB","\u0e3f","764","Thai Baht"
"TJS","\u0405\u041c","972","Tajikistani Somoni"
"TMT","\u006d","934","Turkmenistan Manat"
"TND","\u062f\u002e\u062a","788","Tunisian Dinar"
"TOP","T\u0024","776","Tongan Pa’anga"
"TRY","\u20a4","949","Turkish Lira"
"TTD","\u0024","780","Trinidad and Tobago Dollar"
"TWD","\u0024","901","Taiwan Dollar"
"TZS","\u0053\u0068","834","Tanzanian Shilling"
"UAH","\u20b4","980","Ukrainian Hryvnia"
"UGX","\u0053\u0068","800","Uganda Shilling"
"USD","\u0024","840","US Dollar"
"UYU","\u0024","858","Uruguayan Peso"
"UZS","\u0441\u045e\u043c","860","Uzbekistan Sum"
"VEF","\u0042\u0073 \u0046","937","Venezuelan Bolivar Fuerte"
"VND","\u20ab","704","Vietnamese Dong"
"VUV","\u0056\u0074","548","Vanuatu Vatu"
"WST","\u0054","882","Samoan Tala"
"XAF","\u20A3","950","CFA Franc BCEAO"
"XCD","\u0024","951","East Caribbean Dollar"
"XPF","\u20A3","953","CFP Franc"
"YER","\ufdfc","886","Yemeni Rial"
"ZAR","\u0052","710","Rand"
"ZMW","\u005a\u004b","967","Zambian Kwacha"
"ZWL","\u0024","932","Zimbabwe Dollar"
Loading

0 comments on commit 3fa38c1

Please sign in to comment.