Added AchievementSettingsWidget

AchievementSettingsWidget is a dialog widget in AchievementsWindow for handling RetroAchievements settings in the user interface. This class contains the physical layout, widget connections, load/save functions and button responses. AchievementsWindow now has a tabbed list that this is inserted into; other tabs will be in a later pull request.
This commit is contained in:
LillyJadeKatrin
2023-05-26 18:29:22 -04:00
committed by Admiral H. Curtiss
parent e1e662b86a
commit df38573ff6
7 changed files with 321 additions and 1 deletions

View File

@ -4,9 +4,11 @@
#ifdef USE_RETRO_ACHIEVEMENTS
#include "DolphinQt/Achievements/AchievementsWindow.h"
#include <QVBoxLayout>
#include <QDialogButtonBox>
#include <QTabWidget>
#include <QVBoxLayout>
#include "DolphinQt/Achievements/AchievementSettingsWidget.h"
#include "DolphinQt/QtUtils/WrapInScrollArea.h"
AchievementsWindow::AchievementsWindow(QWidget* parent) : QDialog(parent)
@ -28,8 +30,14 @@ void AchievementsWindow::CreateMainLayout()
{
auto* layout = new QVBoxLayout();
m_tab_widget = new QTabWidget();
m_tab_widget->addTab(
GetWrappedWidget(new AchievementSettingsWidget(m_tab_widget, this), this, 125, 100),
tr("Settings"));
m_button_box = new QDialogButtonBox(QDialogButtonBox::Close);
layout->addWidget(m_tab_widget);
layout->addWidget(m_button_box);
WrapInScrollArea(this, layout);