first implementation of HushChat TOS

This commit is contained in:
DenioD
2020-06-18 21:08:06 +02:00
parent 5f67dd4a32
commit f8e7a0f5f4
4 changed files with 184 additions and 92 deletions

View File

@@ -51,12 +51,13 @@ int FirstTimeWizard::nextId() const {
NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent) {
setTitle("Create or Restore wallet.");
QWidget* pageWidget = new QWidget();
Ui_CreateWalletForm form;
form.setupUi(pageWidget);
parent->button(QWizard::CommitButton)->setEnabled(false);
setButtonText(QWizard::CommitButton, "Next");
auto fnPasswordEdited = [=](const QString&) {
// Enable the Finish button if the passwords match.
@@ -66,11 +67,11 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
if (!form.txtPassword->text().isEmpty() &&
form.txtPassword->text() == form.txtConfirmPassword->text() && passphraseBlank.size() >= 16) {
form.txtPassword->text() == form.txtConfirmPassword->text() && passphraseBlank.size() >= 16 ){
form.lblPasswordMatch->setText("");
parent->button(QWizard::CommitButton)->setEnabled(true);
setButtonText(QWizard::CommitButton, "Next");
form.radioRestoreWallet->setEnabled(true);
form.radioNewWallet->setEnabled(true);
form.radioNewWallet->setChecked(true);
@@ -109,7 +110,7 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
//qDebug()<<"Objekt gesetzt";
// Exclusive buttons
QObject::connect(form.radioNewWallet, &QRadioButton::clicked, [=](bool checked) {
if (checked) {
@@ -124,6 +125,13 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
}
});
QObject::connect(form.TOS, &QRadioButton::clicked, [=](bool checked) {
if (checked) {
parent->button(QWizard::CommitButton)->setEnabled(true);
}
});