mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
replace some ugly code in addressbookpage.cpp
- add signals signMessage() and verifyMessage() in addressbookpage.cpp - connect to them in bitcoingui.cpp to switch to the corresponding tab in the Sign/Verify Message dialog - make gotoSignMessageTab() and gotoVerifyMessageTab() private slots
This commit is contained in:
parent
ea53f183fc
commit
ddadf791f1
@ -190,10 +190,7 @@ void AddressBookPage::on_signMessage_clicked()
|
|||||||
addr = address.toString();
|
addr = address.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QObject *qoGUI = parent()->parent();
|
emit signMessage(addr);
|
||||||
BitcoinGUI *gui = qobject_cast<BitcoinGUI *>(qoGUI);
|
|
||||||
if (gui)
|
|
||||||
gui->gotoSignMessageTab(addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressBookPage::on_verifyMessage_clicked()
|
void AddressBookPage::on_verifyMessage_clicked()
|
||||||
@ -208,10 +205,7 @@ void AddressBookPage::on_verifyMessage_clicked()
|
|||||||
addr = address.toString();
|
addr = address.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QObject *qoGUI = parent()->parent();
|
emit verifyMessage(addr);
|
||||||
BitcoinGUI *gui = qobject_cast<BitcoinGUI *>(qoGUI);
|
|
||||||
if (gui)
|
|
||||||
gui->gotoVerifyMessageTab(addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressBookPage::on_newAddressButton_clicked()
|
void AddressBookPage::on_newAddressButton_clicked()
|
||||||
|
@ -76,6 +76,10 @@ private slots:
|
|||||||
|
|
||||||
/** New entry/entries were added to address table */
|
/** New entry/entries were added to address table */
|
||||||
void selectNewAddress(const QModelIndex &parent, int begin, int end);
|
void selectNewAddress(const QModelIndex &parent, int begin, int end);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void signMessage(QString addr);
|
||||||
|
void verifyMessage(QString addr);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ADDRESSBOOKDIALOG_H
|
#endif // ADDRESSBOOKDIALOG_H
|
||||||
|
@ -165,6 +165,11 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
|
|||||||
rpcConsole = new RPCConsole(this);
|
rpcConsole = new RPCConsole(this);
|
||||||
connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));
|
connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));
|
||||||
|
|
||||||
|
// Clicking on "Verify Message" in the address book sends you to the verify message tab
|
||||||
|
connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString)));
|
||||||
|
// Clicking on "Sign Message" in the receive coins page sends you to the sign message tab
|
||||||
|
connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString)));
|
||||||
|
|
||||||
gotoOverviewPage();
|
gotoOverviewPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,9 +132,6 @@ public slots:
|
|||||||
void askFee(qint64 nFeeRequired, bool *payFee);
|
void askFee(qint64 nFeeRequired, bool *payFee);
|
||||||
void handleURI(QString strURI);
|
void handleURI(QString strURI);
|
||||||
|
|
||||||
void gotoSignMessageTab(QString addr = "");
|
|
||||||
void gotoVerifyMessageTab(QString addr = "");
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
/** Switch to overview (home) page */
|
/** Switch to overview (home) page */
|
||||||
void gotoOverviewPage();
|
void gotoOverviewPage();
|
||||||
@ -147,6 +144,11 @@ private slots:
|
|||||||
/** Switch to send coins page */
|
/** Switch to send coins page */
|
||||||
void gotoSendCoinsPage();
|
void gotoSendCoinsPage();
|
||||||
|
|
||||||
|
/** Show Sign/Verify Message dialog and switch to sign message tab */
|
||||||
|
void gotoSignMessageTab(QString addr = "");
|
||||||
|
/** Show Sign/Verify Message dialog and switch to verify message tab */
|
||||||
|
void gotoVerifyMessageTab(QString addr = "");
|
||||||
|
|
||||||
/** Show configuration dialog */
|
/** Show configuration dialog */
|
||||||
void optionsClicked();
|
void optionsClicked();
|
||||||
/** Show about dialog */
|
/** Show about dialog */
|
||||||
|
Loading…
Reference in New Issue
Block a user