18#include "moc_qgsauthmasterpassresetdialog.cpp"
34 mAuthNotifyLayout =
new QVBoxLayout;
35 this->setLayout( mAuthNotifyLayout );
37 mAuthNotifyLayout->addWidget( mAuthNotify );
42 connect( leMasterPassCurrent, &QgsPasswordLineEdit::textChanged,
this, &QgsMasterPasswordResetDialog::leMasterPassCurrent_textChanged );
43 connect( leMasterPassNew, &QgsPasswordLineEdit::textChanged,
this, &QgsMasterPasswordResetDialog::leMasterPassNew_textChanged );
52 leMasterPassCurrent->setFocus();
54 const bool ok = ( exec() == QDialog::Accepted );
59 *newpass = leMasterPassNew->text();
60 *oldpass = leMasterPassCurrent->text();
61 *keepbackup = chkKeepBackup->isChecked();
68void QgsMasterPasswordResetDialog::leMasterPassCurrent_textChanged(
const QString &pass )
72 mPassCurOk = !pass.isEmpty();
77void QgsMasterPasswordResetDialog::leMasterPassNew_textChanged(
const QString &pass )
79 mPassNewOk = !pass.isEmpty();
83void QgsMasterPasswordResetDialog::validatePasswords()
87 leMasterPassCurrent->setStyleSheet( ss1 );
90 leMasterPassNew->setStyleSheet( ss2 );
91 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)