5 #if defined(HAVE_CONFIG_H)
10 #include <qt/forms/ui_createwalletdialog.h>
12 #include <QPushButton>
19 ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr(
"Create"));
20 ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
false);
21 ui->wallet_name_line_edit->setFocus(Qt::ActiveWindowFocusReason);
23 connect(
ui->wallet_name_line_edit, &QLineEdit::textEdited, [
this](
const QString& text) {
24 ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.isEmpty());
27 connect(
ui->encrypt_wallet_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
30 ui->disable_privkeys_checkbox->setEnabled(!checked);
33 if (!ui->disable_privkeys_checkbox->isEnabled()) {
34 ui->disable_privkeys_checkbox->setChecked(false);
38 connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
41 ui->encrypt_wallet_checkbox->setEnabled(!checked);
45 ui->blank_wallet_checkbox->setChecked(true);
49 if (!ui->encrypt_wallet_checkbox->isEnabled()) {
50 ui->encrypt_wallet_checkbox->setChecked(
false);
55 ui->descriptor_checkbox->setToolTip(tr(
"Compiled without sqlite support (required for descriptor wallets)"));
56 ui->descriptor_checkbox->setEnabled(
false);
57 ui->descriptor_checkbox->setChecked(
false);
69 return ui->wallet_name_line_edit->text();
74 return ui->encrypt_wallet_checkbox->isChecked();
79 return ui->disable_privkeys_checkbox->isChecked();
84 return ui->blank_wallet_checkbox->isChecked();
89 return ui->descriptor_checkbox->isChecked();
bool isEncryptWalletChecked() const
CreateWalletDialog(QWidget *parent)
Ui::CreateWalletDialog * ui
bool isMakeBlankWalletChecked() const
bool isDescriptorWalletChecked() const
bool isDisablePrivateKeysChecked() const
Dialog for creating wallets.
QString walletName() const
virtual ~CreateWalletDialog()