2020-04-29 14:47:40 +08:00
|
|
|
|
#include "mf_uid_parameterdialog.h"
|
2020-04-25 00:57:28 +08:00
|
|
|
|
#include "ui_mf_uid_parameterdialog.h"
|
|
|
|
|
|
2021-09-19 21:00:23 +08:00
|
|
|
|
MF_UID_parameterDialog::MF_UID_parameterDialog(const QString& uid, const QString& atqa, const QString& sak, const QVariantMap& config, QWidget *parent) :
|
2020-04-25 00:57:28 +08:00
|
|
|
|
QDialog(parent),
|
|
|
|
|
ui(new Ui::MF_UID_parameterDialog)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
2020-04-29 14:47:40 +08:00
|
|
|
|
ui->UIDLineEdit->setText(uid);
|
|
|
|
|
ui->ATQALineEdit->setText(atqa);
|
|
|
|
|
ui->SAKLineEdit->setText(sak);
|
2021-09-19 21:00:23 +08:00
|
|
|
|
this->config = config;
|
2020-04-25 00:57:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MF_UID_parameterDialog::~MF_UID_parameterDialog()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
2020-04-29 14:47:40 +08:00
|
|
|
|
|
|
|
|
|
void MF_UID_parameterDialog::on_buttonBox_accepted()
|
|
|
|
|
{
|
2021-09-19 21:00:23 +08:00
|
|
|
|
QString cmd = config["cmd"].toString();
|
|
|
|
|
cmd.replace("<uid>", ui->UIDLineEdit->text());
|
|
|
|
|
cmd.replace("<atqa>", ui->ATQALineEdit->text());
|
|
|
|
|
cmd.replace("<sak>", ui->SAKLineEdit->text());
|
|
|
|
|
emit sendCMD(cmd);
|
2020-04-29 14:47:40 +08:00
|
|
|
|
}
|