コード例 #1
0
ファイル: GameCubePane.cpp プロジェクト: aldelaro5/dolphin
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); });
  }
}
コード例 #2
0
ファイル: GameCubePane.cpp プロジェクト: MerryMage/dolphin
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); });
    }
  }
}