feather/src/dialog/WalletCacheDebugDialog.cpp

96 lines
2.8 KiB
C++
Raw Normal View History

2021-01-25 16:38:04 +00:00
// SPDX-License-Identifier: BSD-3-Clause
2023-01-02 19:30:11 +00:00
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
2021-01-25 16:38:04 +00:00
#include "WalletCacheDebugDialog.h"
#include "ui_WalletCacheDebugDialog.h"
#include <QRadioButton>
2023-03-28 20:42:12 +00:00
#include "utils/Utils.h"
2021-06-27 14:33:18 +00:00
WalletCacheDebugDialog::WalletCacheDebugDialog(Wallet *wallet, QWidget *parent)
2021-10-22 17:19:56 +00:00
: WindowModalDialog(parent)
2021-01-25 16:38:04 +00:00
, ui(new Ui::WalletCacheDebugDialog)
, m_wallet(wallet)
2021-01-25 16:38:04 +00:00
{
ui->setupUi(this);
2023-03-28 20:42:12 +00:00
ui->output->setFont(Utils::getMonospaceFont());
2021-02-03 16:01:19 +00:00
2021-01-25 16:38:04 +00:00
connect(ui->m_blockchain, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printBlockchain());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_transfers, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printTransfers());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_unconfirmed_payments, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printUnconfirmedPayments());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_confirmed_txs, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printConfirmedTransferDetails());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_unconfirmed_txs, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printUnconfirmedTransferDetails());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_payments, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printPayments());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_pub_keys, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printPubKeys());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_tx_notes, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printTxNotes());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_subaddresses, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printSubaddresses());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_subaddress_labels, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printSubaddressLabels());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_additional_tx_keys, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printAdditionalTxKeys());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_attributes, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printAttributes());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_key_images, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printKeyImages());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_account_tags, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printAccountTags());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_tx_keys, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printTxKeys());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_address_book, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printAddressBook());
2021-01-25 16:38:04 +00:00
});
connect(ui->m_scanned_pool_txs, &QRadioButton::pressed, [this]{
this->setOutput(m_wallet->printScannedPoolTxs());
2021-01-25 16:38:04 +00:00
});
this->adjustSize();
}
void WalletCacheDebugDialog::setOutput(const QString &output) {
ui->output->setPlainText(output);
}
2021-06-27 12:13:05 +00:00
WalletCacheDebugDialog::~WalletCacheDebugDialog() = default;