20 #include <QPushButton> 31 , mAuthNotifyLayout( nullptr )
32 , mAuthNotify( nullptr )
39 mAuthNotifyLayout->
addWidget( mAuthNotify );
56 leMasterPassCurrent->setFocus();
58 bool ok = (
exec() == QDialog::Accepted );
63 *newpass = leMasterPassNew->text();
64 *oldpass = leMasterPassCurrent->text();
65 *keepbackup = chkKeepBackup->isChecked();
72 void QgsMasterPasswordResetDialog::on_leMasterPassCurrent_textChanged(
const QString& pass )
81 void QgsMasterPasswordResetDialog::on_leMasterPassNew_textChanged(
const QString& pass )
87 void QgsMasterPasswordResetDialog::on_chkPassShowCurrent_stateChanged(
int state )
89 leMasterPassCurrent->setEchoMode(( state > 0 ) ? QLineEdit::Normal : QLineEdit::Password );
92 void QgsMasterPasswordResetDialog::on_chkPassShowNew_stateChanged(
int state )
94 leMasterPassNew->setEchoMode(( state > 0 ) ? QLineEdit::Normal : QLineEdit::Password );
97 void QgsMasterPasswordResetDialog::validatePasswords()
101 leMasterPassCurrent->setStyleSheet( ss1 );
104 leMasterPassNew->setStyleSheet( ss2 );
105 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( mPassCurOk && mPassNewOk );
static QgsAuthManager * instance()
Enforce singleton pattern.
QgsMasterPasswordResetDialog(QWidget *parent=nullptr)
static QString greenTextStyleSheet(const QString &selector="*")
Green text stylesheet representing valid, trusted, etc.
~QgsMasterPasswordResetDialog()
bool requestMasterPasswordReset(QString *newpass, QString *oldpass, bool *keepbackup)
bool blockSignals(bool block)
static QString redTextStyleSheet(const QString &selector="*")
Red text stylesheet representing invalid, untrusted, etc.