forked from mss/securepoint-openvpn-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pkcs_auth.cpp
40 lines (35 loc) · 798 Bytes
/
pkcs_auth.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "pkcs_auth.h"
#include "ui_pkcs_auth.h"
pkcs_auth::pkcs_auth(QWidget *parent) :
QDialog(parent),
m_ui(new Ui::pkcs_auth)
{
m_ui->setupUi(this);
m_ui->txtPKCSPwd->setEchoMode(QLineEdit::Password);
}
pkcs_auth::~pkcs_auth()
{
delete m_ui;
}
void pkcs_auth::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
m_ui->retranslateUi(this);
break;
default:
break;
}
}
void pkcs_auth::clearFields() {
m_ui->txtPKCSPwd->setText("");
m_ui->txtPKCSPwd->setFocus();
}
void pkcs_auth::on_cmdOK_clicked()
{
QByteArray ba;
ba.append(m_ui->txtPKCSPwd->text().trimmed() + "\n");
this->parentProc->write(ba);
this->close();
}