3#include "DlgSettingsLibVnc.h"
4#include "ui_DlgSettingsLibVnc.h"
6#include <QLoggingCategory>
7static Q_LOGGING_CATEGORY(log,
"LibVNCServer.Setting.Dialog")
15 setAttribute(Qt::WA_DeleteOnClose);
19 ui->leName->setText(m_pPara->GetName());
20 ui->wNet->SetParameter(&m_pPara->m_Net);
22 ui->cbShowServerName->setChecked(m_pPara->GetShowServerName());
24 ui->cbShared->setChecked(m_pPara->GetShared());
25 ui->cbOnlyView->setChecked(m_pPara->GetOnlyView());
26 ui->cbLocalCursor->setChecked(m_pPara->GetLocalCursor());
27 ui->cbClipboard->setChecked(m_pPara->GetClipboard());
30 m_pProxyUI->SetParameter(&m_pPara->m_Proxy);
31 ui->tabWidget->insertTab(1, m_pProxyUI, tr(
"Proxy"));
61 ui->cbCompress->setChecked(m_pPara->GetEnableCompressLevel());
62 ui->spCompressLevel->setEnabled(m_pPara->GetEnableCompressLevel());
63 ui->spCompressLevel->setValue(m_pPara->GetCompressLevel());
64 ui->spJPEGLevel->setEnabled(m_pPara->GetJpeg());
65 ui->cbJPEG->setChecked(m_pPara->GetJpeg());
66 ui->spJPEGLevel->setValue(m_pPara->GetQualityLevel());
70CDlgSettingsLibVnc::~CDlgSettingsLibVnc()
72 qDebug(log) <<
"CDlgSettingsLibVnc::~CDlgSettingsLibVnc()";
76void CDlgSettingsLibVnc::on_pbOk_clicked()
83 if(!ui->wNet->CheckValidity(
true)) {
84 ui->tabWidget->setCurrentIndex(0);
88 ui->tabWidget->setCurrentWidget(m_pProxyUI);
93 m_pPara->SetName(ui->leName->text());
95 nRet = ui->wNet->Accept();
98 m_pPara->SetShowServerName(ui->cbShowServerName->isChecked());
99 m_pPara->SetShared(ui->cbShared->isChecked());
100 m_pPara->SetOnlyView(ui->cbOnlyView->isChecked());
101 m_pPara->SetLocalCursor(ui->cbLocalCursor->isChecked());
102 m_pPara->SetClipboard(ui->cbClipboard->isChecked());
104 nRet = m_pProxyUI->
Accept();
120 m_pPara->SetEnableCompressLevel(ui->cbCompress->isChecked());
121 m_pPara->SetCompressLevel(ui->spCompressLevel->value());
122 m_pPara->SetJpeg(ui->cbJPEG->isChecked());
123 m_pPara->SetQualityLevel(ui->spJPEGLevel->value());
128void CDlgSettingsLibVnc::on_pbCancel_clicked()
133void CDlgSettingsLibVnc::on_cbCompress_stateChanged(
int arg1)
135 m_pPara->SetEnableCompressLevel(arg1);
136 ui->spCompressLevel->setEnabled(arg1);
139void CDlgSettingsLibVnc::on_cbJPEG_stateChanged(
int arg1)
141 m_pPara->SetJpeg(arg1);
142 ui->spJPEGLevel->setEnabled(m_pPara->GetJpeg());
bool CheckValidity(bool validity=false)
Check parameters validity.
int Accept()
Accept parameters.