33 mAuthNotifyLayout =
new QVBoxLayout;
34 this->setLayout( mAuthNotifyLayout );
36 mAuthNotifyLayout->addWidget( mAuthNotify );
41 connect( leMasterPassCurrent, &QgsPasswordLineEdit::textChanged,
this, &QgsMasterPasswordResetDialog::leMasterPassCurrent_textChanged );
42 connect( leMasterPassNew, &QgsPasswordLineEdit::textChanged,
this, &QgsMasterPasswordResetDialog::leMasterPassNew_textChanged );
51 leMasterPassCurrent->setFocus();
53 const bool ok = ( exec() == QDialog::Accepted );
58 *newpass = leMasterPassNew->text();
59 *oldpass = leMasterPassCurrent->text();
60 *keepbackup = chkKeepBackup->isChecked();
67void QgsMasterPasswordResetDialog::leMasterPassCurrent_textChanged(
const QString &pass )
71 mPassCurOk = !pass.isEmpty();
76void QgsMasterPasswordResetDialog::leMasterPassNew_textChanged(
const QString &pass )
78 mPassNewOk = !pass.isEmpty();
82void QgsMasterPasswordResetDialog::validatePasswords()
86 leMasterPassCurrent->setStyleSheet( ss1 );
89 leMasterPassNew->setStyleSheet( ss2 );
90 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( mPassCurOk && mPassNewOk );
static QgsAuthManager * authManager()
Returns the application's authentication manager instance.
Utility functions for use by authentication GUI widgets or standalone apps.
static QString greenTextStyleSheet(const QString &selector="*")
Green text stylesheet representing valid, trusted, etc. certificate.
QgsMasterPasswordResetDialog(QWidget *parent=nullptr)
bool requestMasterPasswordReset(QString *newpass, QString *oldpass, bool *keepbackup)