refactor: SettingsDialog, use standard object names

This commit is contained in:
sithlord48
2025-02-26 22:16:54 -05:00
committed by Nick Bolton
parent 63744ddbd6
commit 088d69fec8
2 changed files with 292 additions and 285 deletions

View File

@ -36,21 +36,21 @@ SettingsDialog::SettingsDialog(
ui->setupUi(this);
ui->m_pComboBoxTlsKeyLength->setItemIcon(0, QIcon::fromTheme(QIcon::ThemeIcon::SecurityLow));
ui->m_pComboBoxTlsKeyLength->setItemIcon(1, QIcon::fromTheme(QStringLiteral("security-medium")));
ui->m_pComboBoxTlsKeyLength->setItemIcon(2, QIcon::fromTheme(QIcon::ThemeIcon::SecurityHigh));
ui->comboTlsKeyLength->setItemIcon(0, QIcon::fromTheme(QIcon::ThemeIcon::SecurityLow));
ui->comboTlsKeyLength->setItemIcon(1, QIcon::fromTheme(QStringLiteral("security-medium")));
ui->comboTlsKeyLength->setItemIcon(2, QIcon::fromTheme(QIcon::ThemeIcon::SecurityHigh));
ui->m_pPushButtonTlsRegenCert->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::ViewRefresh));
ui->btnTlsRegenCert->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::ViewRefresh));
ui->m_pPushButtonTlsCertPath->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen));
ui->m_pButtonBrowseLog->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen));
ui->btnTlsCertPath->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen));
ui->btnBrowseLog->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen));
ui->rb_icon_mono->setIcon(QIcon::fromTheme(QStringLiteral("deskflow-symbolic")));
ui->rb_icon_colorful->setIcon(QIcon::fromTheme(QStringLiteral("deskflow")));
ui->rbIconMono->setIcon(QIcon::fromTheme(QStringLiteral("deskflow-symbolic")));
ui->rbIconColorful->setIcon(QIcon::fromTheme(QStringLiteral("deskflow")));
// force the first tab, since qt creator sets the active tab as the last one
// the developer was looking at, and it's easy to accidentally save that.
ui->m_pTabWidget->setCurrentIndex(0);
ui->tabWidget->setCurrentIndex(0);
loadFromConfig();
m_wasOriginallySystemScope = m_appConfig.isActiveScopeSystem();
@ -71,15 +71,15 @@ void SettingsDialog::initConnections()
connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &SettingsDialog::accept);
connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &SettingsDialog::reject);
connect(ui->m_pCheckBoxEnableTls, &QCheckBox::toggled, this, &SettingsDialog::updateTlsControlsEnabled);
connect(ui->m_pCheckBoxServiceEnabled, &QCheckBox::toggled, this, &SettingsDialog::updateControls);
connect(ui->m_pPushButtonTlsRegenCert, &QPushButton::clicked, this, &SettingsDialog::regenCertificates);
connect(ui->m_pPushButtonTlsCertPath, &QPushButton::clicked, this, &SettingsDialog::browseCertificatePath);
connect(ui->m_pButtonBrowseLog, &QPushButton::clicked, this, &SettingsDialog::browseLogPath);
connect(ui->m_pCheckBoxLogToFile, &QCheckBox::toggled, this, &SettingsDialog::setLogToFile);
connect(ui->cbEnableTls, &QCheckBox::toggled, this, &SettingsDialog::updateTlsControlsEnabled);
connect(ui->cbServiceEnabled, &QCheckBox::toggled, this, &SettingsDialog::updateControls);
connect(ui->btnTlsRegenCert, &QPushButton::clicked, this, &SettingsDialog::regenCertificates);
connect(ui->btnTlsCertPath, &QPushButton::clicked, this, &SettingsDialog::browseCertificatePath);
connect(ui->btnBrowseLog, &QPushButton::clicked, this, &SettingsDialog::browseLogPath);
connect(ui->cbLogToFile, &QCheckBox::toggled, this, &SettingsDialog::setLogToFile);
// We only need to test the System scoped Radio as they are connected
connect(ui->m_pRadioSystemScope, &QRadioButton::toggled, this, &SettingsDialog::setSystemScope);
connect(ui->rbScopeSystem, &QRadioButton::toggled, this, &SettingsDialog::setSystemScope);
}
void SettingsDialog::regenCertificates()
@ -92,12 +92,12 @@ void SettingsDialog::regenCertificates()
void SettingsDialog::browseCertificatePath()
{
QString fileName = QFileDialog::getSaveFileName(
this, tr("Select a TLS certificate to use..."), ui->m_pLineEditTlsCertPath->text(), "Cert (*.pem)", nullptr,
this, tr("Select a TLS certificate to use..."), ui->lineTlsCertPath->text(), "Cert (*.pem)", nullptr,
QFileDialog::DontConfirmOverwrite
);
if (!fileName.isEmpty()) {
ui->m_pLineEditTlsCertPath->setText(fileName);
ui->lineTlsCertPath->setText(fileName);
if (QFile(fileName).exists()) {
updateKeyLengthOnFile(fileName);
@ -109,20 +109,17 @@ void SettingsDialog::browseCertificatePath()
void SettingsDialog::browseLogPath()
{
QString fileName = QFileDialog::getSaveFileName(
this, tr("Save log file to..."), ui->m_pLineEditLogFilename->text(), "Logs (*.log *.txt)"
);
QString fileName =
QFileDialog::getSaveFileName(this, tr("Save log file to..."), ui->lineLogFilename->text(), "Logs (*.log *.txt)");
if (!fileName.isEmpty()) {
ui->m_pLineEditLogFilename->setText(fileName);
ui->lineLogFilename->setText(fileName);
}
}
void SettingsDialog::setLogToFile(bool logToFile)
{
ui->m_pLabelLogPath->setEnabled(logToFile);
ui->m_pLineEditLogFilename->setEnabled(logToFile);
ui->m_pButtonBrowseLog->setEnabled(logToFile);
ui->widgetLogFilename->setEnabled(logToFile);
}
void SettingsDialog::setSystemScope(bool systemScope)
@ -152,25 +149,25 @@ void SettingsDialog::showReadOnlyMessage()
void SettingsDialog::accept()
{
m_appConfig.setLoadFromSystemScope(ui->m_pRadioSystemScope->isChecked());
m_appConfig.setPort(ui->m_pSpinBoxPort->value());
m_appConfig.setNetworkInterface(ui->m_pLineEditInterface->text());
m_appConfig.setLogLevel(ui->m_pComboLogLevel->currentIndex());
m_appConfig.setLogToFile(ui->m_pCheckBoxLogToFile->isChecked());
m_appConfig.setLogFilename(ui->m_pLineEditLogFilename->text());
m_appConfig.setElevateMode(static_cast<ElevateMode>(ui->m_pComboElevate->currentIndex()));
m_appConfig.setAutoHide(ui->m_pCheckBoxAutoHide->isChecked());
m_appConfig.setEnableUpdateCheck(ui->m_pCheckBoxAutoUpdate->isChecked());
m_appConfig.setPreventSleep(ui->m_pCheckBoxPreventSleep->isChecked());
m_appConfig.setTlsCertPath(ui->m_pLineEditTlsCertPath->text());
m_appConfig.setTlsKeyLength(ui->m_pComboBoxTlsKeyLength->currentText().toInt());
m_appConfig.setTlsEnabled(ui->m_pCheckBoxEnableTls->isChecked());
m_appConfig.setLanguageSync(ui->m_pCheckBoxLanguageSync->isChecked());
m_appConfig.setInvertScrollDirection(ui->m_pCheckBoxScrollDirection->isChecked());
m_appConfig.setEnableService(ui->m_pCheckBoxServiceEnabled->isChecked());
m_appConfig.setCloseToTray(ui->m_pCheckBoxCloseToTray->isChecked());
m_appConfig.setColorfulTrayIcon(ui->rb_icon_colorful->isChecked());
m_appConfig.setRequireClientCerts(ui->chkRequireClientCert->isChecked());
m_appConfig.setLoadFromSystemScope(ui->rbScopeSystem->isChecked());
m_appConfig.setPort(ui->sbPort->value());
m_appConfig.setNetworkInterface(ui->lineInterface->text());
m_appConfig.setLogLevel(ui->comboLogLevel->currentIndex());
m_appConfig.setLogToFile(ui->cbLogToFile->isChecked());
m_appConfig.setLogFilename(ui->lineLogFilename->text());
m_appConfig.setElevateMode(static_cast<ElevateMode>(ui->comboElevate->currentIndex()));
m_appConfig.setAutoHide(ui->cbAutoHide->isChecked());
m_appConfig.setEnableUpdateCheck(ui->cbAutoUpdate->isChecked());
m_appConfig.setPreventSleep(ui->cbPreventSleep->isChecked());
m_appConfig.setTlsCertPath(ui->lineTlsCertPath->text());
m_appConfig.setTlsKeyLength(ui->comboTlsKeyLength->currentText().toInt());
m_appConfig.setTlsEnabled(ui->cbEnableTls->isChecked());
m_appConfig.setLanguageSync(ui->cbLanguageSync->isChecked());
m_appConfig.setInvertScrollDirection(ui->cbScrollDirection->isChecked());
m_appConfig.setEnableService(ui->cbServiceEnabled->isChecked());
m_appConfig.setCloseToTray(ui->cbCloseToTray->isChecked());
m_appConfig.setColorfulTrayIcon(ui->rbIconColorful->isChecked());
m_appConfig.setRequireClientCerts(ui->cbRequireClientCert->isChecked());
QDialog::accept();
}
@ -188,35 +185,35 @@ void SettingsDialog::reject()
void SettingsDialog::loadFromConfig()
{
ui->m_pSpinBoxPort->setValue(m_appConfig.port());
ui->m_pLineEditInterface->setText(m_appConfig.networkInterface());
ui->m_pComboLogLevel->setCurrentIndex(m_appConfig.logLevel());
ui->m_pCheckBoxLogToFile->setChecked(m_appConfig.logToFile());
ui->m_pLineEditLogFilename->setText(m_appConfig.logFilename());
ui->m_pCheckBoxAutoHide->setChecked(m_appConfig.autoHide());
ui->m_pCheckBoxPreventSleep->setChecked(m_appConfig.preventSleep());
ui->m_pCheckBoxLanguageSync->setChecked(m_appConfig.languageSync());
ui->m_pCheckBoxScrollDirection->setChecked(m_appConfig.invertScrollDirection());
ui->m_pCheckBoxServiceEnabled->setChecked(m_appConfig.enableService());
ui->m_pCheckBoxCloseToTray->setChecked(m_appConfig.closeToTray());
ui->m_pComboElevate->setCurrentIndex(static_cast<int>(m_appConfig.elevateMode()));
ui->sbPort->setValue(m_appConfig.port());
ui->lineInterface->setText(m_appConfig.networkInterface());
ui->comboLogLevel->setCurrentIndex(m_appConfig.logLevel());
ui->cbLogToFile->setChecked(m_appConfig.logToFile());
ui->lineLogFilename->setText(m_appConfig.logFilename());
ui->cbAutoHide->setChecked(m_appConfig.autoHide());
ui->cbPreventSleep->setChecked(m_appConfig.preventSleep());
ui->cbLanguageSync->setChecked(m_appConfig.languageSync());
ui->cbScrollDirection->setChecked(m_appConfig.invertScrollDirection());
ui->cbServiceEnabled->setChecked(m_appConfig.enableService());
ui->cbCloseToTray->setChecked(m_appConfig.closeToTray());
ui->comboElevate->setCurrentIndex(static_cast<int>(m_appConfig.elevateMode()));
if (m_appConfig.enableUpdateCheck().has_value()) {
ui->m_pCheckBoxAutoUpdate->setChecked(m_appConfig.enableUpdateCheck().value());
ui->cbAutoUpdate->setChecked(m_appConfig.enableUpdateCheck().value());
} else {
ui->m_pCheckBoxAutoUpdate->setChecked(false);
ui->cbAutoUpdate->setChecked(false);
}
if (m_appConfig.isActiveScopeSystem()) {
ui->m_pRadioSystemScope->setChecked(true);
ui->rbScopeSystem->setChecked(true);
} else {
ui->m_pRadioUserScope->setChecked(true);
ui->rbScopeUser->setChecked(true);
}
if (m_appConfig.colorfulTrayIcon())
ui->rb_icon_colorful->setChecked(true);
ui->rbIconColorful->setChecked(true);
else
ui->rb_icon_mono->setChecked(true);
ui->rbIconMono->setChecked(true);
qDebug() << "load from config done";
updateTlsControls();
@ -229,38 +226,38 @@ void SettingsDialog::updateTlsControls()
updateKeyLengthOnFile(m_appConfig.tlsCertPath());
} else {
const auto keyLengthText = QString::number(m_appConfig.tlsKeyLength());
ui->m_pComboBoxTlsKeyLength->setCurrentIndex(ui->m_pComboBoxTlsKeyLength->findText(keyLengthText));
ui->comboTlsKeyLength->setCurrentIndex(ui->comboTlsKeyLength->findText(keyLengthText));
}
const auto tlsEnabled = m_tlsUtility.isEnabled();
const auto writable = m_appConfig.isActiveScopeWritable();
const auto enabled = writable && tlsEnabled;
ui->m_pLineEditTlsCertPath->setText(m_appConfig.tlsCertPath());
ui->chkRequireClientCert->setChecked(m_appConfig.requireClientCerts());
ui->m_pCheckBoxEnableTls->setChecked(tlsEnabled);
ui->lineTlsCertPath->setText(m_appConfig.tlsCertPath());
ui->cbRequireClientCert->setChecked(m_appConfig.requireClientCerts());
ui->cbEnableTls->setChecked(tlsEnabled);
ui->m_pCheckBoxEnableTls->setEnabled(writable);
ui->m_pComboBoxTlsKeyLength->setEnabled(enabled);
ui->cbEnableTls->setEnabled(writable);
ui->comboTlsKeyLength->setEnabled(enabled);
ui->widgetTlsCert->setEnabled(enabled);
ui->m_pLabelTlsKeyLength->setEnabled(enabled);
ui->m_pPushButtonTlsRegenCert->setEnabled(enabled);
ui->chkRequireClientCert->setEnabled(enabled);
ui->lblTlsKeyLength->setEnabled(enabled);
ui->btnTlsRegenCert->setEnabled(enabled);
ui->cbRequireClientCert->setEnabled(enabled);
}
void SettingsDialog::updateTlsControlsEnabled()
{
const auto writable = m_appConfig.isActiveScopeWritable();
const auto clientMode = m_appConfig.clientGroupChecked();
const auto tlsChecked = ui->m_pCheckBoxEnableTls->isChecked();
const auto tlsChecked = ui->cbEnableTls->isChecked();
auto enabled = writable && tlsChecked && !clientMode;
ui->m_pLabelTlsKeyLength->setEnabled(enabled);
ui->m_pComboBoxTlsKeyLength->setEnabled(enabled);
ui->m_pLabelTlsCert->setEnabled(enabled);
ui->lblTlsKeyLength->setEnabled(enabled);
ui->comboTlsKeyLength->setEnabled(enabled);
ui->lblTlsCert->setEnabled(enabled);
ui->widgetTlsCert->setEnabled(enabled);
ui->m_pPushButtonTlsRegenCert->setEnabled(enabled);
ui->chkRequireClientCert->setEnabled(enabled);
ui->btnTlsRegenCert->setEnabled(enabled);
ui->cbRequireClientCert->setEnabled(enabled);
}
bool SettingsDialog::isClientMode() const
@ -276,8 +273,8 @@ void SettingsDialog::updateKeyLengthOnFile(const QString &path)
}
auto length = ssl.getCertKeyLength(path);
auto index = ui->m_pComboBoxTlsKeyLength->findText(QString::number(length));
ui->m_pComboBoxTlsKeyLength->setCurrentIndex(index);
auto index = ui->comboTlsKeyLength->findText(QString::number(length));
ui->comboTlsKeyLength->setCurrentIndex(index);
m_appConfig.setTlsKeyLength(length);
}
@ -289,34 +286,31 @@ void SettingsDialog::updateControls()
#else
// service not supported on unix yet, so always disable.
const auto serviceAvailable = false;
ui->m_pGroupService->setTitle("Service (Windows only)");
ui->groupService->setTitle("Service (Windows only)");
#endif
const bool writable = m_appConfig.isActiveScopeWritable();
const bool serviceChecked = ui->m_pCheckBoxServiceEnabled->isChecked();
const bool logToFile = ui->m_pCheckBoxLogToFile->isChecked();
const bool serviceChecked = ui->cbServiceEnabled->isChecked();
const bool logToFile = ui->cbLogToFile->isChecked();
ui->m_pSpinBoxPort->setEnabled(writable);
ui->m_pLineEditInterface->setEnabled(writable);
ui->m_pComboLogLevel->setEnabled(writable);
ui->m_pCheckBoxLogToFile->setEnabled(writable);
ui->m_pCheckBoxAutoHide->setEnabled(writable);
ui->m_pCheckBoxAutoUpdate->setEnabled(writable);
ui->m_pCheckBoxPreventSleep->setEnabled(writable);
ui->m_pLineEditTlsCertPath->setEnabled(writable);
ui->m_pComboBoxTlsKeyLength->setEnabled(writable);
ui->m_pCheckBoxCloseToTray->setEnabled(writable);
ui->sbPort->setEnabled(writable);
ui->lineInterface->setEnabled(writable);
ui->comboLogLevel->setEnabled(writable);
ui->cbLogToFile->setEnabled(writable);
ui->cbAutoHide->setEnabled(writable);
ui->cbAutoUpdate->setEnabled(writable);
ui->cbPreventSleep->setEnabled(writable);
ui->lineTlsCertPath->setEnabled(writable);
ui->comboTlsKeyLength->setEnabled(writable);
ui->cbCloseToTray->setEnabled(writable);
ui->m_pCheckBoxServiceEnabled->setEnabled(writable && serviceAvailable);
ui->m_pLabelElevate->setEnabled(writable && serviceChecked && serviceAvailable);
ui->m_pComboElevate->setEnabled(writable && serviceChecked && serviceAvailable);
ui->cbServiceEnabled->setEnabled(writable && serviceAvailable);
ui->widgetElevate->setEnabled(writable && serviceChecked && serviceAvailable);
ui->m_pCheckBoxLanguageSync->setEnabled(writable && isClientMode());
ui->m_pCheckBoxScrollDirection->setEnabled(writable && isClientMode());
ui->cbLanguageSync->setEnabled(writable && isClientMode());
ui->cbScrollDirection->setEnabled(writable && isClientMode());
ui->m_pLabelLogPath->setEnabled(writable && logToFile);
ui->m_pLineEditLogFilename->setEnabled(writable && logToFile);
ui->m_pButtonBrowseLog->setEnabled(writable && logToFile);
ui->widgetLogFilename->setEnabled(writable && logToFile);
updateTlsControls();
}

View File

@ -21,14 +21,11 @@
<number>20</number>
</property>
<item>
<widget class="QTabWidget" name="m_pTabWidget">
<widget class="QTabWidget" name="tabWidget">
<property name="tabPosition">
<enum>QTabWidget::TabPosition::North</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="m_pTabRegular">
<widget class="QWidget" name="tabRegular">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -43,7 +40,7 @@
<number>15</number>
</property>
<item>
<widget class="QGroupBox" name="m_pGroupBasics">
<widget class="QGroupBox" name="groupBasics">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -55,21 +52,21 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="m_pCheckBoxPreventSleep">
<widget class="QCheckBox" name="cbPreventSleep">
<property name="text">
<string>Prevent this computer from going to sleep</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="m_pCheckBoxLanguageSync">
<widget class="QCheckBox" name="cbLanguageSync">
<property name="text">
<string>Use server's keyboard language on this computer (client mode)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="m_pCheckBoxScrollDirection">
<widget class="QCheckBox" name="cbScrollDirection">
<property name="text">
<string>Invert scroll direction on this computer (client mode)</string>
</property>
@ -79,7 +76,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="m_pGroupApp">
<widget class="QGroupBox" name="groupApp">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -91,21 +88,21 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QCheckBox" name="m_pCheckBoxAutoUpdate">
<widget class="QCheckBox" name="cbAutoUpdate">
<property name="text">
<string>Check for updates on startup </string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="m_pCheckBoxCloseToTray">
<widget class="QCheckBox" name="cbCloseToTray">
<property name="text">
<string>Leave app running in notification area when the window is closed</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="m_pCheckBoxAutoHide">
<widget class="QCheckBox" name="cbAutoHide">
<property name="text">
<string>Hide the window when the app starts</string>
</property>
@ -121,14 +118,14 @@
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_icon_colorful">
<widget class="QRadioButton" name="rbIconColorful">
<property name="text">
<string>Colorful</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_icon_mono">
<widget class="QRadioButton" name="rbIconMono">
<property name="text">
<string>Monocolor</string>
</property>
@ -140,7 +137,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="m_pGroupSecurity">
<widget class="QGroupBox" name="groupSecurity">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -166,7 +163,7 @@
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="m_pCheckBoxEnableTls">
<widget class="QCheckBox" name="cbEnableTls">
<property name="enabled">
<bool>true</bool>
</property>
@ -189,7 +186,7 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="m_pLabelTlsKeyLength">
<widget class="QLabel" name="lblTlsKeyLength">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -202,7 +199,7 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="m_pComboBoxTlsKeyLength">
<widget class="QComboBox" name="comboTlsKeyLength">
<property name="currentText">
<string>1024</string>
</property>
@ -232,7 +229,7 @@
<number>1</number>
</property>
<item>
<widget class="QLabel" name="m_pLabelTlsCert">
<widget class="QLabel" name="lblTlsCert">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -261,7 +258,7 @@
</spacer>
</item>
<item>
<widget class="QLineEdit" name="m_pLineEditTlsCertPath">
<widget class="QLineEdit" name="lineTlsCertPath">
<property name="minimumSize">
<size>
<width>0</width>
@ -271,7 +268,7 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="m_pPushButtonTlsCertPath">
<widget class="QPushButton" name="btnTlsCertPath">
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
@ -305,7 +302,7 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="m_pPushButtonTlsRegenCert">
<widget class="QPushButton" name="btnTlsRegenCert">
<property name="text">
<string>Regenerate certificate</string>
</property>
@ -314,7 +311,7 @@
</layout>
</item>
<item>
<widget class="QCheckBox" name="chkRequireClientCert">
<widget class="QCheckBox" name="cbRequireClientCert">
<property name="text">
<string>Require client certificates</string>
</property>
@ -325,7 +322,7 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="m_pTabAdvanced">
<widget class="QWidget" name="tabAdvanced">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -340,7 +337,7 @@
<number>15</number>
</property>
<item>
<widget class="QGroupBox" name="m_pGroupNetworking">
<widget class="QGroupBox" name="groupNetworking">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -357,7 +354,7 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="m_pLabel_20">
<widget class="QLabel" name="lblPort">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -370,7 +367,7 @@
</widget>
</item>
<item>
<widget class="QSpinBox" name="m_pSpinBoxPort">
<widget class="QSpinBox" name="sbPort">
<property name="enabled">
<bool>true</bool>
</property>
@ -389,7 +386,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="m_pLabel_21">
<widget class="QLabel" name="lblNetworkIp">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -402,7 +399,7 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="m_pLineEditInterface">
<widget class="QLineEdit" name="lineInterface">
<property name="enabled">
<bool>true</bool>
</property>
@ -414,7 +411,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="m_pGroupLogs">
<widget class="QGroupBox" name="groupLogs">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -448,14 +445,14 @@
</spacer>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="m_pCheckBoxLogToFile">
<widget class="QCheckBox" name="cbLogToFile">
<property name="text">
<string>Log to file</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QComboBox" name="m_pComboLogLevel">
<widget class="QComboBox" name="comboLogLevel">
<item>
<property name="text">
<string>Info</string>
@ -479,7 +476,7 @@
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="m_pLabel_3">
<widget class="QLabel" name="lblLogLevel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -498,78 +495,86 @@
</widget>
</item>
<item row="1" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>3</number>
<widget class="QWidget" name="widgetLogFilename" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="m_pLabelLogPath">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Log path</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLineEdit" name="m_pLineEditLogFilename">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="m_pButtonBrowseLog">
<property name="enabled">
<bool>false</bool>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string/>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>3</number>
</property>
<property name="topMargin">
<number>1</number>
</property>
<item>
<widget class="QLabel" name="labelLogPath">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Log path</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLineEdit" name="lineLogFilename">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnBrowseLog">
<property name="enabled">
<bool>true</bool>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string/>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="m_pGroupService">
<widget class="QGroupBox" name="groupService">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -580,75 +585,8 @@
<string>Service</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="m_pLabelElevate">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Launch with elevated privileges</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="m_pComboElevate">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Specify when the Windows background service should run the server or client
process at an elevated privilege level.</string>
</property>
<property name="whatsThis">
<string>
&lt;p&gt;You may want to alter whether or not the privilege level of the server or client
process is automatically changed depending on your use case. In some cases it can help
to diagnose or solve some problems related to elevated processes in Windows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automatic: Elevate when the window session changes to secure mode&lt;/li&gt;
&lt;li&gt;Always elevate: Always run in elevated mode (could be unsafe)&lt;/li&gt;
&lt;li&gt;Never elevate: Turn off compatibility with login screen and UAC&lt;/li&gt;
&lt;/ul&gt;
</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Automatic (as needed)</string>
</property>
</item>
<item>
<property name="text">
<string>Always elevate</string>
</property>
</item>
<item>
<property name="text">
<string>Never elevate</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="m_pCheckBoxServiceEnabled">
<widget class="QCheckBox" name="cbServiceEnabled">
<property name="toolTip">
<string>Whether to launch the server or client process through the Windows background
service or direct from the GUI.</string>
@ -668,11 +606,86 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QWidget" name="widgetElevate" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="lblElevate">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Launch with elevated privileges</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboElevate">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Specify when the Windows background service should run the server or client
process at an elevated privilege level.</string>
</property>
<property name="whatsThis">
<string>
&lt;p&gt;You may want to alter whether or not the privilege level of the server or client
process is automatically changed depending on your use case. In some cases it can help
to diagnose or solve some problems related to elevated processes in Windows.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automatic: Elevate when the window session changes to secure mode&lt;/li&gt;
&lt;li&gt;Always elevate: Always run in elevated mode (could be unsafe)&lt;/li&gt;
&lt;li&gt;Never elevate: Turn off compatibility with login screen and UAC&lt;/li&gt;
&lt;/ul&gt;
</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Automatic (as needed)</string>
</property>
</item>
<item>
<property name="text">
<string>Always elevate</string>
</property>
</item>
<item>
<property name="text">
<string>Never elevate</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="m_pGroupScope">
<widget class="QGroupBox" name="groupScope">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@ -684,7 +697,7 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QRadioButton" name="m_pRadioUserScope">
<widget class="QRadioButton" name="rbScopeUser">
<property name="text">
<string>Current user</string>
</property>
@ -694,7 +707,7 @@
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_pRadioSystemScope">
<widget class="QRadioButton" name="rbScopeSystem">
<property name="text">
<string>All users</string>
</property>
@ -723,20 +736,20 @@
</layout>
</widget>
<tabstops>
<tabstop>m_pSpinBoxPort</tabstop>
<tabstop>m_pLineEditInterface</tabstop>
<tabstop>m_pCheckBoxEnableTls</tabstop>
<tabstop>m_pComboBoxTlsKeyLength</tabstop>
<tabstop>m_pLineEditTlsCertPath</tabstop>
<tabstop>m_pPushButtonTlsCertPath</tabstop>
<tabstop>m_pPushButtonTlsRegenCert</tabstop>
<tabstop>m_pCheckBoxLogToFile</tabstop>
<tabstop>m_pComboLogLevel</tabstop>
<tabstop>m_pLineEditLogFilename</tabstop>
<tabstop>m_pButtonBrowseLog</tabstop>
<tabstop>m_pRadioUserScope</tabstop>
<tabstop>m_pRadioSystemScope</tabstop>
<tabstop>m_pComboElevate</tabstop>
<tabstop>sbPort</tabstop>
<tabstop>lineInterface</tabstop>
<tabstop>cbEnableTls</tabstop>
<tabstop>comboTlsKeyLength</tabstop>
<tabstop>lineTlsCertPath</tabstop>
<tabstop>btnTlsCertPath</tabstop>
<tabstop>btnTlsRegenCert</tabstop>
<tabstop>cbLogToFile</tabstop>
<tabstop>comboLogLevel</tabstop>
<tabstop>lineLogFilename</tabstop>
<tabstop>btnBrowseLog</tabstop>
<tabstop>rbScopeUser</tabstop>
<tabstop>rbScopeSystem</tabstop>
<tabstop>comboElevate</tabstop>
</tabstops>
<resources/>
<connections/>