gui: Add transactionClicked and coinsSent signals to WalletView

pull/17937/head
João Barbosa 5 years ago
parent ac61ec9da6
commit ac3d10777d

@ -65,11 +65,13 @@ WalletView::WalletView(const PlatformStyle *_platformStyle, QWidget *parent):
addWidget(receiveCoinsPage);
addWidget(sendCoinsPage);
connect(overviewPage, &OverviewPage::transactionClicked, this, &WalletView::transactionClicked);
// Clicking on a transaction on the overview pre-selects the transaction on the transaction history page
connect(overviewPage, &OverviewPage::transactionClicked, transactionView, static_cast<void (TransactionView::*)(const QModelIndex&)>(&TransactionView::focusTransaction));
connect(overviewPage, &OverviewPage::outOfSyncWarningClicked, this, &WalletView::requestedSyncWarningInfo);
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, this, &WalletView::coinsSent);
// Highlight transaction after send
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, transactionView, static_cast<void (TransactionView::*)(const uint256&)>(&TransactionView::focusTransaction));
@ -91,10 +93,10 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui)
if (gui)
{
// Clicking on a transaction on the overview page simply sends you to transaction history page
connect(overviewPage, &OverviewPage::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage);
connect(this, &WalletView::transactionClicked, gui, &BitcoinGUI::gotoHistoryPage);
// Navigate to transaction history page after send
connect(sendCoinsPage, &SendCoinsDialog::coinsSent, gui, &BitcoinGUI::gotoHistoryPage);
connect(this, &WalletView::coinsSent, gui, &BitcoinGUI::gotoHistoryPage);
// Receive and report messages
connect(this, &WalletView::message, [gui](const QString &title, const QString &message, unsigned int style) {

@ -115,6 +115,8 @@ public Q_SLOTS:
void requestedSyncWarningInfo();
Q_SIGNALS:
void transactionClicked();
void coinsSent();
/** Fired when a message should be reported to the user */
void message(const QString &title, const QString &message, unsigned int style);
/** Encryption status of wallet changed */

Loading…
Cancel
Save