13 #include <QPushButton> 20 ui->
buttonBox->button(QDialogButtonBox::Ok)->setText(tr(
"Create"));
21 ui->
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
false);
25 ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.isEmpty());
31 ui->disable_privkeys_checkbox->setEnabled(!checked);
32 #ifdef ENABLE_EXTERNAL_SIGNER
33 ui->external_signer_checkbox->setEnabled(m_has_signers && !checked);
36 if (!ui->disable_privkeys_checkbox->isEnabled()) {
37 ui->disable_privkeys_checkbox->setChecked(false);
47 connect(ui->external_signer_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
48 ui->encrypt_wallet_checkbox->setEnabled(!checked);
49 ui->blank_wallet_checkbox->setEnabled(!checked);
50 ui->disable_privkeys_checkbox->setEnabled(!checked);
55 ui->encrypt_wallet_checkbox->setChecked(false);
56 ui->disable_privkeys_checkbox->setChecked(checked);
57 ui->blank_wallet_checkbox->setChecked(false);
60 connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
63 ui->encrypt_wallet_checkbox->setEnabled(!checked);
66 ui->blank_wallet_checkbox->setEnabled(!checked);
68 ui->blank_wallet_checkbox->setChecked(false);
72 if (!ui->encrypt_wallet_checkbox->isEnabled()) {
73 ui->encrypt_wallet_checkbox->setChecked(
false);
77 connect(ui->blank_wallet_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
80 ui->disable_privkeys_checkbox->setEnabled(!checked);
82 ui->disable_privkeys_checkbox->setChecked(false);
86 #ifndef ENABLE_EXTERNAL_SIGNER 88 ui->external_signer_checkbox->setToolTip(tr(
"Compiled without external signing support (required for external signing)"));
89 ui->external_signer_checkbox->setEnabled(
false);
90 ui->external_signer_checkbox->setChecked(
false);
113 const std::string label = signers[0]->getName();
115 ui->
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
true);
bool isExternalSignerChecked() const
Utility functions used by the Bitcoin Qt UI.
bool isEncryptWalletChecked() const
QString walletName() const
bool isDisablePrivateKeysChecked() const
CreateWalletDialog(QWidget *parent)
Ui::CreateWalletDialog * ui
QCheckBox * blank_wallet_checkbox
QLineEdit * wallet_name_line_edit
constexpr auto dialog_flags
bool isMakeBlankWalletChecked() const
QCheckBox * encrypt_wallet_checkbox
void setSigners(const std::vector< std::unique_ptr< interfaces::ExternalSigner >> &signers)
QCheckBox * disable_privkeys_checkbox
Dialog for creating wallets.
virtual ~CreateWalletDialog()
QDialogButtonBox * buttonBox
void setupUi(QDialog *CreateWalletDialog)
QCheckBox * external_signer_checkbox