Qt: use Settings::EmulationStateChanged

This commit is contained in:
Michael M
2017-09-04 11:12:13 -07:00
parent 8e805dcbf4
commit 3e1072b24d
22 changed files with 97 additions and 160 deletions

View File

@ -40,15 +40,9 @@ SettingsWindow::SettingsWindow(QWidget* parent) : QDialog(parent)
AddTab(m_tabs, tr("General"), new GeneralPane(), "config");
AddTab(m_tabs, tr("Interface"), new InterfacePane(), "browse");
auto* audio_pane = new AudioPane;
m_audio_pane_index = AddTab(m_tabs, tr("Audio"), audio_pane, "play");
m_audio_pane_index = AddTab(m_tabs, tr("Audio"), new AudioPane(), "play");
AddTab(m_tabs, tr("Paths"), new PathPane(), "browse");
connect(this, &SettingsWindow::EmulationStarted,
[audio_pane] { audio_pane->OnEmulationStateChanged(true); });
connect(this, &SettingsWindow::EmulationStopped,
[audio_pane] { audio_pane->OnEmulationStateChanged(false); });
// Dialog box buttons
QDialogButtonBox* ok_box = new QDialogButtonBox(QDialogButtonBox::Ok);
connect(ok_box, &QDialogButtonBox::accepted, this, &SettingsWindow::accept);