Rabbit Remote Control 0.1.0-bate8
Loading...
Searching...
No Matches
Public Member Functions | Private Slots | Private Attributes | List of all members
CParameterTerminalUI Class Reference
Inheritance diagram for CParameterTerminalUI:
Inheritance graph
[legend]
Collaboration diagram for CParameterTerminalUI:
Collaboration graph
[legend]

Public Member Functions

 CParameterTerminalUI (QWidget *parent=nullptr)
 
virtual int SetParameter (CParameter *pParameter) override
 [override functions]
 
virtual int Accept () override
 Accept parameters.
 
- Public Member Functions inherited from CParameterUI
 CParameterUI (QWidget *parent=nullptr)
 
virtual Q_INVOKABLE bool CheckValidity (bool validity=false)
 Check parameters validity.
 

Private Slots

void on_fontComboBox_currentFontChanged (const QFont &f)
 
void on_spFontSize_valueChanged (int size)
 
void on_pbBrowser_clicked ()
 

Private Attributes

Ui::CParameterTerminalUI * ui
 
CParameterTerminalm_pPara
 

Additional Inherited Members

- Public Slots inherited from CParameterUI
virtual void slotSetParameter (CParameter *pParameter)
 [override functions]
 
virtual void slotAccept ()
 Accept parameters.
 

Detailed Description

Definition at line 12 of file ParameterTerminalUI.h.

Constructor & Destructor Documentation

◆ ~CParameterTerminalUI()

CParameterTerminalUI::~CParameterTerminalUI ( )
overridevirtual

Definition at line 26 of file ParameterTerminalUI.cpp.

Member Function Documentation

◆ Accept()

int CParameterTerminalUI::Accept ( )
overridevirtual

Accept parameters.

If necessary, you can call CheckValidity first.

void CDlgSetFreeRDP::on_pbOk_clicked()
{
int nRet = 0;
if(!ui->wNet->CheckValidity(true)) {
ui->tabWidget->setCurrentIndex(0);
return;
}
if(!m_pProxyUI->CheckValidity(true)) {
ui->tabWidget->setCurrentWidget(m_pProxyUI);
return;
}
if(!m_pRecordUI->CheckValidity(true)) {
ui->tabWidget->setCurrentWidget(m_pRecordUI);
return;
}
m_pSettings->SetName(ui->leName->text());
// Server
m_pSettings->SetDomain(ui->leDomain->text());
nRet = ui->wNet->Accept();
if(nRet) return;
nRet = m_pProxyUI->Accept();
if(nRet) return;
nRet = m_pRecordUI->Accept();
if(nRet) return;
m_pSettings->SetOnlyView(ui->cbOnlyView->isChecked());
m_pSettings->SetClipboard(ui->cbClipboard->isChecked());
m_pSettings->SetShowServerName(ui->cbShowServerName->isChecked());
// Display
m_pSettings->SetUseMultimon(ui->cbAllMonitor->isChecked());
QString szSize = ui->cbDesktopSize->currentText();
int index = szSize.indexOf("×");
if(-1 < index)
{
UINT32 width = szSize.left(index).toInt();
UINT32 height = szSize.right(szSize.length() - index - 1).toInt();
m_pSettings->SetDesktopWidth(width);
m_pSettings->SetDesktopHeight(height);
}
m_pSettings->SetColorDepth(ui->cbColorDepth->currentData().toInt());
m_pSettings->SetReconnectInterval(ui->sbReconnect->value());
// Redirection
m_pSettings->SetRedirectionPrinter(ui->cbPrinter->isChecked());
m_pSettings->SetEnableLocalInputMethod(ui->cbEnableLocalInputMethod->isChecked());
if(HasAudioOutput()) {
CParameterFreeRDP::RedirecionSoundType tRdirectionSound
= CParameterFreeRDP::RedirecionSoundType::Disable;
if(ui->rbAudioDisable->isChecked())
tRdirectionSound = CParameterFreeRDP::RedirecionSoundType::Disable;
else if(ui->rbAudioLocal->isChecked())
tRdirectionSound = CParameterFreeRDP::RedirecionSoundType::Local;
else if(ui->rbAudioRemote->isChecked())
tRdirectionSound = CParameterFreeRDP::RedirecionSoundType::Remote;
m_pSettings->SetRedirectionSound(tRdirectionSound);
} else {
m_pSettings->SetRedirectionSound(
CParameterFreeRDP::RedirecionSoundType::Disable);
}
m_pSettings->SetRedirectionSoundParameters(ui->leRdpSnd->text());
if(HasAudioInput())
m_pSettings->SetRedirectionMicrophone(ui->cbAudin->isChecked());
else
m_pSettings->SetRedirectionMicrophone(false);
m_pSettings->SetRedirectionMicrophoneParameters(ui->leAudin->text());
QStringList lstDrives;
//获取选中的行,默认获取选中行的第一列数据(0),列的索引值和上面一样0、1、2、3......
QModelIndexList selected = ui->tvDrive->selectionModel()->selectedRows(0);
QList<QModelIndex>::iterator it;
QModelIndex modelIndex;
QString szPath;
for (it = selected.begin(); it != selected.end(); ++it)
{
modelIndex = *it;
szPath = m_pFileModel->filePath(modelIndex);
if(!szPath.isEmpty())
lstDrives.append(szPath);
}
m_pSettings->SetRedirectionDrives(lstDrives);
// Security
m_pSettings->SetNegotiateSecurityLayer(ui->cbSecurityEnable->isChecked());
uint security = 0;
if(ui->cbSecurityRDP->isChecked())
security |= CParameterFreeRDP::Security::RDP;
if(ui->cbSecurityTls->isChecked())
security |= CParameterFreeRDP::Security::TLS;
if(ui->cbSecurityNLA->isChecked())
security |= CParameterFreeRDP::Security::NLA;
if(ui->cbSecurityNlaExt->isChecked())
security |= CParameterFreeRDP::Security::NLA_Ext;
if(ui->cbSecurityRDSTLS->isChecked())
security |= CParameterFreeRDP::Security::RDSTLS;
if(ui->cbSecurityRDSAAD->isChecked())
security |= CParameterFreeRDP::Security::RDSAAD;
m_pSettings->SetSecurity((CParameterFreeRDP::Security)security);
// Tls version
if(ui->rbTls1_0->isChecked())
m_pSettings->SetTlsVersion(TLS1_VERSION);
else if(ui->rbTls1_1->isChecked())
m_pSettings->SetTlsVersion(TLS1_1_VERSION);
else if(ui->rbTls1_2->isChecked())
m_pSettings->SetTlsVersion(TLS1_2_VERSION);
else if(ui->rbTls1_3->isChecked())
m_pSettings->SetTlsVersion(TLS1_3_VERSION);
// Connect type
m_pSettings->SetConnectType(ui->cbConnectType->currentData().toUInt());
// Performance flags
UINT32 performanceFlags = 0;
if(!ui->cbDesktopBackground->isChecked())
performanceFlags |= PERF_DISABLE_WALLPAPER;
if(!ui->cbWindowDrag->isChecked())
performanceFlags |= PERF_DISABLE_FULLWINDOWDRAG;
if(!ui->cbMenuAnims->isChecked())
performanceFlags |= PERF_DISABLE_MENUANIMATIONS;
if(!ui->cbThemes->isChecked())
performanceFlags |= PERF_DISABLE_THEMING;
if(ui->cbFontSmoothing->isChecked())
performanceFlags |= PERF_ENABLE_FONT_SMOOTHING;
if(ui->cbDesktopCompositing->isChecked())
performanceFlags |= PERF_ENABLE_DESKTOP_COMPOSITION;
m_pSettings->SetPerformanceFlags(performanceFlags);
accept();
}
Returns
0 is success. otherwise is fail

Implements CParameterUI.

Definition at line 47 of file ParameterTerminalUI.cpp.

◆ on_fontComboBox_currentFontChanged

void CParameterTerminalUI::on_fontComboBox_currentFontChanged ( const QFont &  f)
privateslot

Definition at line 31 of file ParameterTerminalUI.cpp.

◆ on_pbBrowser_clicked

void CParameterTerminalUI::on_pbBrowser_clicked ( )
privateslot

Definition at line 72 of file ParameterTerminalUI.cpp.

◆ on_spFontSize_valueChanged

void CParameterTerminalUI::on_spFontSize_valueChanged ( int  size)
privateslot

Definition at line 39 of file ParameterTerminalUI.cpp.

◆ SetParameter()

int CParameterTerminalUI::SetParameter ( CParameter pParameter)
overridevirtual

[override functions]

Set the parameters and initialize the user interface

Parameters
pParameterRelated parameters. Convert to the appropriate type in the overloaded function.

Implements CParameterUI.

Definition at line 81 of file ParameterTerminalUI.cpp.

Member Data Documentation

◆ m_pPara

CParameterTerminal* CParameterTerminalUI::m_pPara
private

Definition at line 31 of file ParameterTerminalUI.h.

◆ ui

Ui::CParameterTerminalUI* CParameterTerminalUI::ui
private

Definition at line 30 of file ParameterTerminalUI.h.


The documentation for this class was generated from the following files: