1#include "DlgGetUserPasswordFreeRDP.h"
2#include "ui_DlgGetUserPasswordFreeRDP.h"
3#include "ParameterNetUI.h"
5static int g_CDlgGetUserPasswordFreeRDP = qRegisterMetaType<CDlgGetUserPasswordFreeRDP>();
7CDlgGetUserPasswordFreeRDP::CDlgGetUserPasswordFreeRDP(QWidget *parent) :
10 m_pConnecter(nullptr),
18 m_pConnecter = dlg.m_pConnecter;
19 m_pParameter = dlg.m_pParameter;
22CDlgGetUserPasswordFreeRDP::~CDlgGetUserPasswordFreeRDP()
27void CDlgGetUserPasswordFreeRDP::SetContext(
void *pContext)
31void CDlgGetUserPasswordFreeRDP::SetConnecter(
CConnecter *pConnecter)
33 m_pConnecter = qobject_cast<CConnecterFreeRDP*>(pConnecter);
34 if(!m_pConnecter)
return;
36 m_pParameter = qobject_cast<CParameterFreeRDP*>(m_pConnecter->
GetParameter());
37 Q_ASSERT(m_pParameter);
38 if(!m_pParameter)
return;
40 ui->lbText->setText(tr(
"Set password for %1").arg(m_pConnecter->
Name()));
41 ui->leDomain->setText(m_pParameter->GetDomain());
42 ui->wUser->SetParameter(&m_pParameter->m_Net.
m_User);
45void CDlgGetUserPasswordFreeRDP::on_pbOK_clicked()
47 Q_ASSERT(m_pParameter);
49 m_pParameter->SetDomain(ui->leDomain->text().toStdString().c_str());
54void CDlgGetUserPasswordFreeRDP::on_pbCancel_clicked()
virtual CParameterBase * GetParameter()
Get parameter.
virtual const QString Name() override
Display order:
void sigUpdateParameters(CConnecter *pConnecter)
Update parameters, notify application to save or show parameters.
CParameterUser m_User
[Instance user]