AdvancedSettings::AdvancedSettings() { ui.setupUi (this); resize (0, 0); /* Main dialog buttons */ connect (ui.ApplyButton, SIGNAL (clicked()), this, SLOT (onApplyClicked())); connect (ui.ResetButton, SIGNAL (clicked()), this, SLOT (onResetClicked())); connect (ui.CancelButton, SIGNAL (clicked()), this, SLOT (onCancelClicked())); /* Appearance tab */ connect (ui.BaseButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked())); connect (ui.HighlightButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked())); connect (ui.BackgroundButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked())); connect (ui.ForegroundButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked())); connect (ui.BaseEdit, SIGNAL (textChanged (QString)), this, SLOT (onColorChanged (QString))); connect (ui.HighlightEdit, SIGNAL (textChanged (QString)), this, SLOT (onColorChanged (QString))); connect (ui.BackgroundEdit, SIGNAL (textChanged (QString)), this, SLOT (onColorChanged (QString))); connect (ui.ForegroundEdit, SIGNAL (textChanged (QString)), this, SLOT (onColorChanged (QString))); readSettings(); }
void SettingsWindow::connectSlots() { connect (m_ok, SIGNAL (clicked()), this, SLOT (apply())); connect (m_reset, SIGNAL (clicked()), this, SLOT (reset())); connect (m_cancel, SIGNAL (clicked()), this, SLOT (cancel())); connect (DS(), SIGNAL (teamChanged (int)), this, SLOT (updateTeam (int))); connect (DS(), SIGNAL (protocolChanged()), this, SLOT (readSettings())); connect (m_useCustomAddress, SIGNAL (toggled (bool)), m_robotAddress, SLOT (setEnabled (bool))); connect (m_baseButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked())); connect (m_highlightButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked())); connect (m_backgroundButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked())); connect (m_foregroundButton, SIGNAL (clicked()), this, SLOT (onSelectorClicked())); connect (m_baseEdit, SIGNAL (textChanged (QString)), this, SLOT (onColorChanged (QString))); connect (m_highlightEdit, SIGNAL (textChanged (QString)), this, SLOT (onColorChanged (QString))); connect (m_backgroundEdit, SIGNAL (textChanged (QString)), this, SLOT (onColorChanged (QString))); connect (m_foregroundEdit, SIGNAL (textChanged (QString)), this, SLOT (onColorChanged (QString))); }