pineapple/src/yuzu/configuration/configure_debug_tab.cpp

46 lines
1.3 KiB
C++
Raw Normal View History

2022-04-23 20:49:07 +02:00
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2021-07-09 03:27:40 +02:00
2021-10-09 02:29:53 +02:00
#include <memory>
2021-07-09 03:27:40 +02:00
#include "ui_configure_debug_tab.h"
2021-10-09 02:29:53 +02:00
#include "yuzu/configuration/configure_cpu_debug.h"
#include "yuzu/configuration/configure_debug.h"
2021-07-09 03:27:40 +02:00
#include "yuzu/configuration/configure_debug_tab.h"
2021-10-09 02:29:53 +02:00
ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent)
2021-10-16 02:35:29 +02:00
: QWidget(parent), ui{std::make_unique<Ui::ConfigureDebugTab>()},
debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
2021-10-09 02:29:53 +02:00
cpu_debug_tab{std::make_unique<ConfigureCpuDebug>(system_, this)} {
2021-07-09 03:27:40 +02:00
ui->setupUi(this);
2021-10-09 02:29:53 +02:00
ui->tabWidget->addTab(debug_tab.get(), tr("Debug"));
ui->tabWidget->addTab(cpu_debug_tab.get(), tr("CPU"));
2021-07-09 03:27:40 +02:00
SetConfiguration();
}
ConfigureDebugTab::~ConfigureDebugTab() = default;
void ConfigureDebugTab::ApplyConfiguration() {
2021-10-09 02:29:53 +02:00
debug_tab->ApplyConfiguration();
cpu_debug_tab->ApplyConfiguration();
2021-07-09 03:27:40 +02: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() {}