Show password check boxes implemented in 802.1x security

main
Aaron Rainbolt 12 months ago
parent bc06fb5639
commit dfdd2737ff

@ -24,6 +24,12 @@ Security802_1xTab::Security802_1xTab(QWidget *parent) :
ui->ttlsInnerAuthenticationComboBox->addItems(QStringList() << tr("PAP") << tr("CHAP") << tr("MSCHAP") << tr("MSCHAPv2"));
ui->peapVersionComboBox->addItems(QStringList() << tr("Automatic") << tr ("Zero") << tr("One"));
ui->peapInnerAuthenticationComboBox->addItems(QStringList() << tr("MSCHAPv2") << tr("MD5") << tr("GTC"));
connect(ui->md5ShowPasswordCheckBox, &QCheckBox::stateChanged, this, &Security802_1xTab::onMd5ShowPasswordCheckBoxToggled);
connect(ui->tlsShowPasswordCheckBox, &QCheckBox::stateChanged, this, &Security802_1xTab::onTlsShowPasswordCheckBoxToggled);
connect(ui->pwdShowPasswordCheckBox, &QCheckBox::stateChanged, this, &Security802_1xTab::onPwdShowPasswordCheckBoxToggled);
connect(ui->fastShowPasswordCheckBox, &QCheckBox::stateChanged, this, &Security802_1xTab::onFastShowPasswordCheckBoxToggled);
connect(ui->ttlsShowPasswordCheckBox, &QCheckBox::stateChanged, this, &Security802_1xTab::onTtlsShowPasswordCheckBoxToggled);
connect(ui->peapShowPasswordCheckBox, &QCheckBox::stateChanged, this, &Security802_1xTab::onPeapShowPasswordCheckBoxToggled);
}
Security802_1xTab::~Security802_1xTab()
@ -402,3 +408,75 @@ void Security802_1xTab::onEnable802_1xCheckBoxToggled(int state)
break;
}
}
void Security802_1xTab::onMd5ShowPasswordCheckBoxToggled(int state)
{
switch (state) {
case Qt::Checked:
ui->md5PasswordLineEdit->setEchoMode(QLineEdit::Normal);
break;
case Qt::Unchecked:
ui->md5PasswordLineEdit->setEchoMode(QLineEdit::Password);
break;
}
}
void Security802_1xTab::onTlsShowPasswordCheckBoxToggled(int state)
{
switch (state) {
case Qt::Checked:
ui->tlsUserKeyPasswordLineEdit->setEchoMode(QLineEdit::Normal);
break;
case Qt::Unchecked:
ui->tlsUserKeyPasswordLineEdit->setEchoMode(QLineEdit::Password);
break;
}
}
void Security802_1xTab::onPwdShowPasswordCheckBoxToggled(int state)
{
switch (state) {
case Qt::Checked:
ui->pwdPasswordLineEdit->setEchoMode(QLineEdit::Normal);
break;
case Qt::Unchecked:
ui->pwdPasswordLineEdit->setEchoMode(QLineEdit::Password);
break;
}
}
void Security802_1xTab::onFastShowPasswordCheckBoxToggled(int state)
{
switch (state) {
case Qt::Checked:
ui->fastPasswordLineEdit->setEchoMode(QLineEdit::Normal);
break;
case Qt::Unchecked:
ui->fastPasswordLineEdit->setEchoMode(QLineEdit::Password);
break;
}
}
void Security802_1xTab::onTtlsShowPasswordCheckBoxToggled(int state)
{
switch (state) {
case Qt::Checked:
ui->ttlsPasswordLineEdit->setEchoMode(QLineEdit::Normal);
break;
case Qt::Unchecked:
ui->ttlsPasswordLineEdit->setEchoMode(QLineEdit::Password);
break;
}
}
void Security802_1xTab::onPeapShowPasswordCheckBoxToggled(int state)
{
switch (state) {
case Qt::Checked:
ui->peapPasswordLineEdit->setEchoMode(QLineEdit::Normal);
break;
case Qt::Unchecked:
ui->peapPasswordLineEdit->setEchoMode(QLineEdit::Password);
break;
}
}

@ -21,6 +21,12 @@ public:
private slots:
void onEnable802_1xCheckBoxToggled(int state);
void onMd5ShowPasswordCheckBoxToggled(int state);
void onTlsShowPasswordCheckBoxToggled(int state);
void onPwdShowPasswordCheckBoxToggled(int state);
void onFastShowPasswordCheckBoxToggled(int state);
void onTtlsShowPasswordCheckBoxToggled(int state);
void onPeapShowPasswordCheckBoxToggled(int state);
private:
Ui::Security802_1xTab *ui;

@ -31,7 +31,7 @@
<item>
<widget class="QTabWidget" name="authenticationModeTabs">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="md5Tab">
<attribute name="title">
@ -39,7 +39,11 @@
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QLineEdit" name="md5PasswordLineEdit"/>
<widget class="QLineEdit" name="md5PasswordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
@ -170,9 +174,9 @@
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="tlsShowPasswordsCheckBox">
<widget class="QCheckBox" name="tlsShowPasswordCheckBox">
<property name="text">
<string>Show passwords</string>
<string>Show password</string>
</property>
</widget>
</item>
@ -194,7 +198,11 @@
<widget class="QLineEdit" name="tlsIdentityLineEdit"/>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="tlsUserKeyPasswordLineEdit"/>
<widget class="QLineEdit" name="tlsUserKeyPasswordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
@ -242,7 +250,11 @@
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="1">
<widget class="QLineEdit" name="pwdPasswordLineEdit"/>
<widget class="QLineEdit" name="pwdPasswordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_13">
@ -335,7 +347,11 @@
</layout>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="fastPasswordLineEdit"/>
<widget class="QLineEdit" name="fastPasswordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="fastAnonymousIdentityLineEdit"/>
@ -440,7 +456,11 @@
</spacer>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="ttlsPasswordLineEdit"/>
<widget class="QLineEdit" name="ttlsPasswordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_20">
@ -652,7 +672,11 @@
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="peapPasswordLineEdit"/>
<widget class="QLineEdit" name="peapPasswordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="peapVersionComboBox"/>

Loading…
Cancel
Save