#6587 Added signal when auto config is changed to update UI
This commit is contained in:
parent
edbeb325bb
commit
fdd09d0f5d
4 changed files with 17 additions and 0 deletions
|
|
@ -244,6 +244,7 @@ void AppConfig::setElevateMode(ElevateMode em) { m_ElevateMode = em; }
|
||||||
void AppConfig::setAutoConfig(bool autoConfig)
|
void AppConfig::setAutoConfig(bool autoConfig)
|
||||||
{
|
{
|
||||||
m_AutoConfig = autoConfig;
|
m_AutoConfig = autoConfig;
|
||||||
|
emit zeroConfToggled();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppConfig::setAutoConfigServer(QString autoConfigServer)
|
void AppConfig::setAutoConfigServer(QString autoConfigServer)
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,7 @@ protected:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sslToggled(bool enabled);
|
void sslToggled(bool enabled);
|
||||||
|
void zeroConfToggled();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,9 @@ MainWindow::MainWindow (QSettings& settings, AppConfig& appConfig,
|
||||||
connect (m_AppConfig, SIGNAL(sslToggled(bool)),
|
connect (m_AppConfig, SIGNAL(sslToggled(bool)),
|
||||||
this, SLOT(sslToggled(bool)), Qt::QueuedConnection);
|
this, SLOT(sslToggled(bool)), Qt::QueuedConnection);
|
||||||
|
|
||||||
|
connect (m_AppConfig, SIGNAL(zeroConfToggled()),
|
||||||
|
this, SLOT(zeroConfToggled()), Qt::QueuedConnection);
|
||||||
|
|
||||||
#ifdef SYNERGY_ENTERPRISE
|
#ifdef SYNERGY_ENTERPRISE
|
||||||
setWindowTitle ("Synergy 1 Enterprise");
|
setWindowTitle ("Synergy 1 Enterprise");
|
||||||
#else
|
#else
|
||||||
|
|
@ -355,6 +358,15 @@ void MainWindow::saveSettings()
|
||||||
settings().sync();
|
settings().sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::zeroConfToggled() {
|
||||||
|
#ifndef SYNERGY_ENTERPRISE
|
||||||
|
updateZeroconfService();
|
||||||
|
|
||||||
|
addZeroconfServer(m_AppConfig->autoConfigServer());
|
||||||
|
|
||||||
|
updateAutoConfigWidgets();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
void MainWindow::setIcon(qSynergyState state)
|
void MainWindow::setIcon(qSynergyState state)
|
||||||
{
|
{
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,9 @@ public slots:
|
||||||
void updateFound(const QString& version);
|
void updateFound(const QString& version);
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
|
||||||
|
/// @brief Receives the signal that the auto config option has changed
|
||||||
|
void zeroConfToggled();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QSettings& settings() { return m_Settings; }
|
QSettings& settings() { return m_Settings; }
|
||||||
AppConfig& appConfig() { return *m_AppConfig; }
|
AppConfig& appConfig() { return *m_AppConfig; }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue