5 #if defined(HAVE_CONFIG_H) 15 #include <QPushButton> 22 ui->
buttonBox->button(QDialogButtonBox::Ok)->setText(tr(
"Create"));
23 ui->
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
false);
27 ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.isEmpty());
33 ui->disable_privkeys_checkbox->setEnabled(!checked);
34 #ifdef ENABLE_EXTERNAL_SIGNER
35 ui->external_signer_checkbox->setEnabled(m_has_signers && !checked);
38 if (!ui->disable_privkeys_checkbox->isEnabled()) {
39 ui->disable_privkeys_checkbox->setChecked(false);
49 connect(ui->external_signer_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
50 ui->encrypt_wallet_checkbox->setEnabled(!checked);
51 ui->blank_wallet_checkbox->setEnabled(!checked);
52 ui->disable_privkeys_checkbox->setEnabled(!checked);
53 ui->descriptor_checkbox->setEnabled(!checked);
58 ui->descriptor_checkbox->setChecked(checked);
59 ui->encrypt_wallet_checkbox->setChecked(false);
60 ui->disable_privkeys_checkbox->setChecked(checked);
64 ui->blank_wallet_checkbox->setChecked(checked);
67 connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
70 ui->encrypt_wallet_checkbox->setEnabled(!checked);
74 ui->blank_wallet_checkbox->setChecked(true);
78 if (!ui->encrypt_wallet_checkbox->isEnabled()) {
79 ui->encrypt_wallet_checkbox->setChecked(
false);
83 connect(ui->blank_wallet_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
85 ui->disable_privkeys_checkbox->setChecked(false);
90 ui->descriptor_checkbox->setToolTip(tr(
"Compiled without sqlite support (required for descriptor wallets)"));
91 ui->descriptor_checkbox->setEnabled(
false);
92 ui->descriptor_checkbox->setChecked(
false);
93 ui->external_signer_checkbox->setEnabled(
false);
94 ui->external_signer_checkbox->setChecked(
false);
98 ui->descriptor_checkbox->setEnabled(
false);
99 ui->descriptor_checkbox->setChecked(
true);
102 #ifndef ENABLE_EXTERNAL_SIGNER 104 ui->external_signer_checkbox->setToolTip(tr(
"Compiled without external signing support (required for external signing)"));
105 ui->external_signer_checkbox->setEnabled(
false);
106 ui->external_signer_checkbox->setChecked(
false);
129 const std::string label = signers[0]->getName();
131 ui->
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
true);
bool isExternalSignerChecked() const
bool isDescriptorWalletChecked() 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
QCheckBox * descriptor_checkbox
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