void GameCubePane::ConnectWidgets() { // IPL Settings connect(m_skip_main_menu, &QCheckBox::stateChanged, this, &GameCubePane::SaveSettings); connect(m_language_combo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GameCubePane::SaveSettings); connect(m_override_language_ntsc, &QCheckBox::stateChanged, this, &GameCubePane::SaveSettings); // Device Settings for (int i = 0; i < SLOT_COUNT; i++) { connect(m_slot_combos[i], QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this, i] { UpdateButton(i); }); connect(m_slot_combos[i], QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GameCubePane::SaveSettings); connect(m_slot_buttons[i], &QPushButton::pressed, this, [this, i] { OnConfigPressed(i); }); } }
void GameCubePane::ConnectWidgets() { // IPL Settings connect(m_skip_main_menu, &QCheckBox::stateChanged, this, &GameCubePane::SaveSettings); connect(m_language_combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &GameCubePane::SaveSettings); connect(m_override_language_ntsc, &QCheckBox::stateChanged, this, &GameCubePane::SaveSettings); // Device Settings for (int i = 0; i < SLOT_COUNT; i++) { connect(m_slot_combos[i], static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &GameCubePane::SaveSettings); if (i <= SLOT_B_INDEX) { connect(m_slot_buttons[i], &QPushButton::pressed, this, [this, i] { OnConfigPressed(i); }); } } }