1#include "DlgSettingsTelnet.h"
2#include "ui_DlgSettingsTelnet.h"
11 ui->leName->setText(m_pPara->GetName());
12 ui->leHost->setText(m_pPara->GetHost());
13 ui->spPort->setValue(m_pPara->GetPort());
15 m_pFrmParaAppearance =
17 if(m_pFrmParaAppearance)
18 ui->tabWidget->addTab(m_pFrmParaAppearance,
19 m_pFrmParaAppearance->windowTitle());
22 if(m_pFrmParaBehavior)
23 ui->tabWidget->addTab(m_pFrmParaBehavior, m_pFrmParaBehavior->windowTitle());
26CDlgSettingsTelnet::~CDlgSettingsTelnet()
31void CDlgSettingsTelnet::on_pbOK_clicked()
33 m_pPara->SetName(ui->leHost->text());
34 m_pPara->SetHost(ui->leHost->text());
35 m_pPara->SetPort(ui->spPort->value());
37 if(m_pFrmParaAppearance)
38 m_pFrmParaAppearance->AcceptSettings();
39 if(m_pFrmParaBehavior)
40 m_pFrmParaBehavior->AcceptSettings();
44void CDlgSettingsTelnet::on_pbCancel_clicked()
49void CDlgSettingsTelnet::on_leHost_editingFinished()
51 auto s = ui->leHost->text().split(
":");
54 ui->spPort->setValue(s[1].toUInt());
55 ui->leHost->setText(s[0]);