diff --git a/src/qt/forms/infopage.ui b/src/qt/forms/infopage.ui
index 3bb4872..cbcea39 100644
--- a/src/qt/forms/infopage.ui
+++ b/src/qt/forms/infopage.ui
@@ -35,44 +35,6 @@
15
- -
-
-
- QFrame::StyledPanel
-
-
- QFrame::Sunken
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 10
- 75
- true
-
-
-
- color: rgb(166, 27, 31);
-
-
- Exchanges
-
-
-
-
-
-
-
@@ -221,306 +183,6 @@
-
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
- 255
- 255
- 255
-
-
-
-
-
-
-
-
- 75
- true
-
-
-
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
-
-
-
- Number of connections
-
-
- false
-
-
-
- -
-
-
-
- 75
- true
-
-
-
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
-
-
-
- Difficulty
-
-
- false
-
-
-
- -
-
-
-
- 75
- true
-
-
-
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
-
-
-
- Network Hashrate
-
-
- false
-
-
-
- -
-
-
-
- 75
- true
-
-
-
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
-
-
-
- Transactions
-
-
- true
-
-
-
- -
-
75
@@ -558,11 +220,165 @@
+ -
+
+
+ Coin Value
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+
+ Number of connections
+
+
+ false
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+
+
+
+ Difficulty
+
+
+ false
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+
+
+
+ Network Hashrate
+
+
+ false
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Sunken
+
+
+
-
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+ 75
+ true
+
+
+
+ color: rgb(166, 27, 31);
+
+
+ Exchanges
+
+
+
+
+
+
diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index cd9d2d7..9c6cf9c 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -38,230 +38,265 @@
7
-
-
-
-
- 470
- 0
-
+
+
+
+ 470
+ 0
+
+
+
+
+ 470
+ 16777215
+
+
+
+
+ 7
-
-
- 470
- 16777215
-
+
+ 7
-
-
- 7
-
-
- 7
-
-
-
-
-
- QFormLayout::AllNonFixedFieldsGrow
-
-
- 12
-
-
- 12
-
-
-
-
-
-
-
-
-
- 10
- 75
- true
-
-
-
- color: rgb(166, 27, 31);
-
-
- Wallet
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- The displayed information may be out of date. Your wallet automatically synchronizes with the CasinoCoin network after a connection is established, but this process has not completed yet.
-
-
- color: rgb(166, 27, 31);
-
-
- (out of sync)
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
-
-
-
- -
-
-
- Balance:
-
-
-
- -
-
-
-
- 10
- 75
- true
-
-
-
- IBeamCursor
-
-
- Your current balance
-
-
- 0 CSC
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
-
-
-
- -
-
-
- Unconfirmed:
-
-
-
- -
-
-
-
- 75
- true
-
-
-
- IBeamCursor
-
-
- Total of transactions that have yet to be confirmed, and do not yet count toward the current balance
-
-
- 0 CSC
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
-
-
-
- -
-
-
- Immature:
-
-
-
- -
-
-
-
- 75
- true
-
-
-
- Mined balance that has not yet matured
-
-
- 0 CSC
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
-
-
-
- -
-
-
- Estimated Fiat Balance:
-
-
-
- -
-
-
-
- 75
- true
-
-
-
- Estimated Fiat balance calculated against current market value
-
-
- 0
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 100
-
-
-
-
-
-
- -
-
-
-
-
+ -
+
+
+ QFormLayout::AllNonFixedFieldsGrow
+
+
+ 12
+
+
+ 12
+
+
-
+
+
-
+
+
+
+ 10
+ 75
+ true
+
+
+
+ color: rgb(166, 27, 31);
+
+
+ Wallet
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ The displayed information may be out of date. Your wallet automatically synchronizes with the CasinoCoin network after a connection is established, but this process has not completed yet.
+
+
+ color: rgb(166, 27, 31);
+
+
+ (out of sync)
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+ Balance:
+
+
+
+ -
+
+
+
+ 10
+ 75
+ true
+
+
+
+ IBeamCursor
+
+
+ Your current balance
+
+
+ 0 CSC
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
+
+
+
+ -
+
+
+ Unconfirmed:
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ IBeamCursor
+
+
+ Total of transactions that have yet to be confirmed, and do not yet count toward the current balance
+
+
+ 0 CSC
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
+
+
+
+ -
+
+
+ Immature:
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Mined balance that has not yet matured
+
+
+ 0 CSC
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
+
+
+
+ -
+
+
+ Estimated Fiat Balance:
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Estimated Fiat balance calculated against current market value
+
+
+ 0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
+
+
+
+ -
+
+
+
+
+
+ Transactions:
+
+
+ true
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+
+
+
+ -
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 100
+
+
+
+
+
+
+ -
+
+
+
+
diff --git a/src/qt/infopage.cpp b/src/qt/infopage.cpp
index c71c47a..a0ad8f7 100644
--- a/src/qt/infopage.cpp
+++ b/src/qt/infopage.cpp
@@ -25,12 +25,6 @@ InfoPage::InfoPage(QWidget *parent) :
void InfoPage::setWalletModel(WalletModel *model)
{
this->walletModel = model;
- if(model)
- {
- // subscribe to transaction changes
- connect(model, SIGNAL(numTransactionsChanged(int)), this, SLOT(setNumTransactions(int)));
- setNumTransactions(model->getNumTransactions());
- }
}
void InfoPage::setClientModel(ClientModel *model)
@@ -65,11 +59,6 @@ void InfoPage::setNumBlocks(int count, int countOfPeers)
}
}
-void InfoPage::setNumTransactions(int count)
-{
- ui->txtTransactionCount->setText(QString::number(count));
-}
-
double InfoPage::GetNetworkHashRate(int lookup, int height) {
CBlockIndex *pb = pindexBest;
@@ -119,7 +108,8 @@ void InfoPage::createExchangesWidget()
ui->verticalLayoutExchanges->addWidget( exchangesWidget->dockQmlToWidget() );
}
-void InfoPage::setCoinFiatValue(QString coinValue)
+void InfoPage::setCoinValues(QString coinValue, QString coinFiatValue)
{
- ui->txtCoinFiatValue->setText(coinValue);
+ ui->txtCoinValue->setText(coinValue);
+ ui->txtCoinFiatValue->setText(coinFiatValue);
}
diff --git a/src/qt/infopage.h b/src/qt/infopage.h
index 4061968..776a5c8 100644
--- a/src/qt/infopage.h
+++ b/src/qt/infopage.h
@@ -20,10 +20,8 @@ public slots:
void setNumConnections(int count);
/** Set number of blocks shown in the UI */
void setNumBlocks(int count, int countOfPeers);
- /** Set number of transactions shown in the UI */
- void setNumTransactions(int count);
- /** Set Fiat coin value */
- void setCoinFiatValue(const QString coinValue);
+ /** Set coin values */
+ void setCoinValues(const QString coinValue, const QString coinFiatValue);
public:
explicit InfoPage(QWidget *parent = 0);
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index d64b2fd..987716b 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -219,6 +219,10 @@ void OverviewPage::setWalletModel(WalletModel *model)
// set visibility of adverts widget
updateDisplayPromotions(model->getOptionsModel()->getDisplayPromotions());
+
+ // subscribe to transaction changes
+ connect(model, SIGNAL(numTransactionsChanged(int)), this, SLOT(setNumTransactions(int)));
+ setNumTransactions(model->getNumTransactions());
}
// update the display unit, to not use the default ("BTC")
@@ -263,6 +267,7 @@ void OverviewPage::updateCoinInfoFromWeb( JsonCoinInfoParser* coinInfoParser )
{
qDebug() << "CoinInfo ID: " << coinInfoParser->getCoinInfo().find("ID").value().toDouble();
qDebug() << "CoinInfo InfoTime: " <getCoinInfo().find("InfoTime").value().toString();
+ qDebug() << "CoinInfo CoinValue: " << QString::number( coinInfoParser->getCoinInfo().find("PriceBTC").value().toDouble(), 'f', 8 );
// save the coin information
coinInformation = coinInfoParser->getCoinInfo();
// calculate and set the estimated fiat balance
@@ -277,10 +282,12 @@ void OverviewPage::updateFiatBalance(int currency)
if(!coinInformation.isEmpty())
{
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();
+ // create formated fiat value
+ QString formattedFiatValue = Currencies::format(currency, currencyValue, true, 4, false);
// emit signal for change value
- QString coinValue = Currencies::format(currency, currencyValue, true, 4, false);
- emit coinFiatValueChanged(coinValue);
+ emit coinValueChanged(coinValue, formattedFiatValue);
// calculate and set fiat balance
double fiatBalance = currentBalance * currencyValue;
QString fiatBalanceString = Currencies::format(currency,fiatBalance,true, 2, true);
@@ -301,6 +308,11 @@ void OverviewPage::updateDisplayPromotions(bool checked)
}
}
+void OverviewPage::setNumTransactions(int count)
+{
+ ui->txtTransactionCount->setText(QString::number(count));
+}
+
OverviewPage::~OverviewPage()
{
delete ui;
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index b351c95..dfa1ac2 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -36,10 +36,11 @@ public:
public slots:
void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance);
+ void setNumTransactions(int count);
signals:
void transactionClicked(const QModelIndex &index);
- void coinFiatValueChanged(const QString formattedCoinFiatValue);
+ void coinValueChanged(const QString coinValue, const QString formattedCoinFiatValue);
private:
Ui::OverviewPage *ui;
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index ec35c06..c256dbc 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -92,7 +92,7 @@ WalletView::WalletView(QWidget *parent, BitcoinGUI *_gui):
// Clicking on "Export" allows to export the transaction list
connect(exportButton, SIGNAL(clicked()), transactionView, SLOT(exportClicked()));
// subscribe to coin value changes
- connect(overviewPage, SIGNAL(coinFiatValueChanged(const QString)), infoPage, SLOT(setCoinFiatValue(const QString)));
+ connect(overviewPage, SIGNAL(coinValueChanged(const QString, const QString)), infoPage, SLOT(setCoinValues(const QString, const QString)));
gotoOverviewPage();
}