configure_debug_tab.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include <memory>
  4. #include "ui_configure_debug_tab.h"
  5. #include "yuzu/configuration/configure_cpu_debug.h"
  6. #include "yuzu/configuration/configure_debug.h"
  7. #include "yuzu/configuration/configure_debug_tab.h"
  8. ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent)
  9. : QWidget(parent), ui{std::make_unique<Ui::ConfigureDebugTab>()},
  10. debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
  11. cpu_debug_tab{std::make_unique<ConfigureCpuDebug>(system_, this)} {
  12. ui->setupUi(this);
  13. ui->tabWidget->addTab(debug_tab.get(), tr("Debug"));
  14. ui->tabWidget->addTab(cpu_debug_tab.get(), tr("CPU"));
  15. SetConfiguration();
  16. }
  17. ConfigureDebugTab::~ConfigureDebugTab() = default;
  18. void ConfigureDebugTab::ApplyConfiguration() {
  19. debug_tab->ApplyConfiguration();
  20. cpu_debug_tab->ApplyConfiguration();
  21. }
  22. void ConfigureDebugTab::SetCurrentIndex(int index) {
  23. ui->tabWidget->setCurrentIndex(index);
  24. }
  25. void ConfigureDebugTab::changeEvent(QEvent* event) {
  26. if (event->type() == QEvent::LanguageChange) {
  27. RetranslateUI();
  28. }
  29. QWidget::changeEvent(event);
  30. }
  31. void ConfigureDebugTab::RetranslateUI() {
  32. ui->retranslateUi(this);
  33. }
  34. void ConfigureDebugTab::SetConfiguration() {}