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

Public Slots

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

Public Member Functions

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

Private Slots

void on_cbSystemCredential_checkStateChanged (const Qt::CheckState &state)
 
void on_pbDesktopShortcutsDisable_clicked ()
 
void on_pbDesktopShortcutsRestore_clicked ()
 
void on_cbCaptureAllKeyboard_checkStateChanged (const Qt::CheckState &arg1)
 

Private Attributes

Ui::CParameterPluginUI * ui
 
CParameterPluginm_pPara
 

Detailed Description

Definition at line 11 of file ParameterPluginUI.h.

Constructor & Destructor Documentation

◆ ~CParameterPluginUI()

CParameterPluginUI::~CParameterPluginUI ( )
virtual

Definition at line 31 of file ParameterPluginUI.cpp.

Member Function Documentation

◆ Accept()

int CParameterPluginUI::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 44 of file ParameterPluginUI.cpp.

◆ CheckValidity()

bool CParameterPluginUI::CheckValidity ( bool  validity)
overridevirtual

Check parameters validity.

Parameters
validity
  • true: Check parameters
  • false: Not check parameters

Reimplemented from CParameterUI.

Definition at line 36 of file ParameterPluginUI.cpp.

◆ on_cbCaptureAllKeyboard_checkStateChanged

void CParameterPluginUI::on_cbCaptureAllKeyboard_checkStateChanged ( const Qt::CheckState &  arg1)
privateslot

Definition at line 188 of file ParameterPluginUI.cpp.

◆ on_cbEnableViewPassword_clicked

void CParameterPluginUI::on_cbEnableViewPassword_clicked ( bool  checked)
slot

Definition at line 80 of file ParameterPluginUI.cpp.

◆ on_cbSystemCredential_checkStateChanged

void CParameterPluginUI::on_cbSystemCredential_checkStateChanged ( const Qt::CheckState &  state)
privateslot

Definition at line 161 of file ParameterPluginUI.cpp.

◆ on_pbDesktopShortcutsDisable_clicked

void CParameterPluginUI::on_pbDesktopShortcutsDisable_clicked ( )
privateslot

Definition at line 166 of file ParameterPluginUI.cpp.

◆ on_pbDesktopShortcutsRestore_clicked

void CParameterPluginUI::on_pbDesktopShortcutsRestore_clicked ( )
privateslot

Definition at line 177 of file ParameterPluginUI.cpp.

◆ on_pbEncryptKey_clicked

void CParameterPluginUI::on_pbEncryptKey_clicked ( )
slot

Definition at line 85 of file ParameterPluginUI.cpp.

◆ SetParameter()

int CParameterPluginUI::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 102 of file ParameterPluginUI.cpp.

Member Data Documentation

◆ m_pPara

CParameterPlugin* CParameterPluginUI::m_pPara
private

Definition at line 25 of file ParameterPluginUI.h.

◆ ui

Ui::CParameterPluginUI* CParameterPluginUI::ui
private

Definition at line 24 of file ParameterPluginUI.h.


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