2021-07-08 21:56:44 +01:00
|
|
|
// Copyright 2021 yuzu Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2021-09-03 02:40:55 +01:00
|
|
|
#include <memory>
|
2021-07-08 21:56:44 +01:00
|
|
|
#include "ui_configure_debug_tab.h"
|
2021-09-03 02:40:55 +01:00
|
|
|
#include "yuzu/configuration/configure_cpu_debug.h"
|
|
|
|
#include "yuzu/configuration/configure_debug.h"
|
2021-07-08 21:56:44 +01:00
|
|
|
#include "yuzu/configuration/configure_debug_tab.h"
|
|
|
|
|
2021-07-30 15:07:32 +01:00
|
|
|
ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent)
|
2021-09-03 02:40:55 +01:00
|
|
|
: QWidget(parent),
|
2021-07-30 15:07:32 +01:00
|
|
|
ui(new Ui::ConfigureDebugTab), debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
|
2021-09-03 02:40:55 +01:00
|
|
|
cpu_debug_tab{std::make_unique<ConfigureCpuDebug>(system_, this)} {
|
2021-07-08 21:56:44 +01:00
|
|
|
ui->setupUi(this);
|
|
|
|
|
2021-09-03 02:40:55 +01:00
|
|
|
ui->tabWidget->addTab(debug_tab.get(), tr("Debug"));
|
|
|
|
ui->tabWidget->addTab(cpu_debug_tab.get(), tr("CPU"));
|
|
|
|
|
2021-07-08 21:56:44 +01:00
|
|
|
SetConfiguration();
|
|
|
|
}
|
|
|
|
|
|
|
|
ConfigureDebugTab::~ConfigureDebugTab() = default;
|
|
|
|
|
|
|
|
void ConfigureDebugTab::ApplyConfiguration() {
|
2021-09-03 02:40:55 +01:00
|
|
|
debug_tab->ApplyConfiguration();
|
|
|
|
cpu_debug_tab->ApplyConfiguration();
|
2021-07-08 21:56:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ConfigureDebugTab::SetCurrentIndex(int index) {
|
|
|
|
ui->tabWidget->setCurrentIndex(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ConfigureDebugTab::changeEvent(QEvent* event) {
|
|
|
|
if (event->type() == QEvent::LanguageChange) {
|
|
|
|
RetranslateUI();
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget::changeEvent(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ConfigureDebugTab::RetranslateUI() {
|
|
|
|
ui->retranslateUi(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ConfigureDebugTab::SetConfiguration() {}
|