Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | void TestGUI(interfaces::Node &node) { | ||||
// Create widgets for sending coins and listing transactions. | // Create widgets for sending coins and listing transactions. | ||||
std::unique_ptr<const PlatformStyle> platformStyle( | std::unique_ptr<const PlatformStyle> platformStyle( | ||||
PlatformStyle::instantiate("other")); | PlatformStyle::instantiate("other")); | ||||
OptionsModel optionsModel; | OptionsModel optionsModel; | ||||
ClientModel clientModel(node, &optionsModel); | ClientModel clientModel(node, &optionsModel); | ||||
AddWallet(wallet); | AddWallet(wallet); | ||||
WalletModel walletModel(interfaces::MakeWallet(wallet), clientModel, | WalletModel walletModel(interfaces::MakeWallet(wallet), clientModel, | ||||
platformStyle.get()); | platformStyle.get()); | ||||
RemoveWallet(wallet); | RemoveWallet(wallet, std::nullopt); | ||||
SendCoinsDialog sendCoinsDialog(platformStyle.get(), &walletModel); | SendCoinsDialog sendCoinsDialog(platformStyle.get(), &walletModel); | ||||
{ | { | ||||
// Check balance in send dialog | // Check balance in send dialog | ||||
QLabel *balanceLabel = | QLabel *balanceLabel = | ||||
sendCoinsDialog.findChild<QLabel *>("labelBalance"); | sendCoinsDialog.findChild<QLabel *>("labelBalance"); | ||||
QString balanceText = balanceLabel->text(); | QString balanceText = balanceLabel->text(); | ||||
int unit = walletModel.getOptionsModel()->getDisplayUnit(); | int unit = walletModel.getOptionsModel()->getDisplayUnit(); | ||||
▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines |