Twitter Widget added to InfoPage

This commit is contained in:
Andre Jochems
2016-06-09 12:16:49 +02:00
parent 1b7473bcb2
commit 9f8937da99
22 changed files with 919 additions and 110 deletions

View File

@@ -284,10 +284,13 @@ void OverviewPage::updateFiatBalance(int currency)
QString conversionCurrency = QString("Price").append(Currencies::name(currency));
QString coinValue = QString::number( coinInformation.find("PriceBTC").value().toDouble(), 'f', 8 );
double currencyValue = coinInformation.find(conversionCurrency).value().toDouble();
double marketCapValue = coinInformation.find("MarketCapital").value().toDouble();
// create formated fiat value
QString formattedFiatValue = Currencies::format(currency, currencyValue, true, 4, false);
// create formatted market capital value
QString formattedMarketCapital = Currencies::format(Currencies::USD, marketCapValue, true, 2, false);
// emit signal for change value
emit coinValueChanged(coinValue, formattedFiatValue);
emit coinValueChanged(coinValue, formattedFiatValue, formattedMarketCapital);
// calculate and set fiat balance
double fiatBalance = currentBalance * currencyValue;
QString fiatBalanceString = Currencies::format(currency,fiatBalance,true, 2, true);