20 #include <QPushButton> 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 bool ok = ( exec() == QDialog::Accepted );
58 *newpass = leMasterPassNew->text();
59 *oldpass = leMasterPassCurrent->text();
60 *keepbackup = chkKeepBackup->isChecked();
67 void QgsMasterPasswordResetDialog::leMasterPassCurrent_textChanged(
const QString &pass )
71 mPassCurOk = !pass.isEmpty();
76 void QgsMasterPasswordResetDialog::leMasterPassNew_textChanged(
const QString &pass )
78 mPassNewOk = !pass.isEmpty();
82 void QgsMasterPasswordResetDialog::validatePasswords()
86 leMasterPassCurrent->setStyleSheet( ss1 );
89 leMasterPassNew->setStyleSheet( ss2 );
90 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( mPassCurOk && mPassNewOk );
QgsMasterPasswordResetDialog(QWidget *parent=nullptr)
static QString greenTextStyleSheet(const QString &selector="*")
Green text stylesheet representing valid, trusted, etc. certificate.
bool requestMasterPasswordReset(QString *newpass, QString *oldpass, bool *keepbackup)
static QgsAuthManager * authManager()
Returns the application's authentication manager instance.
static QString redTextStyleSheet(const QString &selector="*")
Red text stylesheet representing invalid, untrusted, etc. certificate.