diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt index 0beb5bed99..757a62294e 100644 --- a/pcsx2-qt/CMakeLists.txt +++ b/pcsx2-qt/CMakeLists.txt @@ -39,6 +39,9 @@ target_sources(pcsx2-qt PRIVATE Settings/AdvancedSystemSettingsWidget.cpp Settings/AdvancedSystemSettingsWidget.h Settings/AdvancedSystemSettingsWidget.ui + Settings/AudioSettingsWidget.cpp + Settings/AudioSettingsWidget.h + Settings/AudioSettingsWidget.ui Settings/BIOSSettingsWidget.cpp Settings/BIOSSettingsWidget.h Settings/BIOSSettingsWidget.ui @@ -61,6 +64,9 @@ target_sources(pcsx2-qt PRIVATE Settings/GameListSettingsWidget.cpp Settings/GameListSettingsWidget.h Settings/GameListSettingsWidget.ui + Settings/GameSummaryWidget.cpp + Settings/GameSummaryWidget.h + Settings/GameSummaryWidget.ui Settings/GraphicsSettingsWidget.cpp Settings/GraphicsSettingsWidget.h Settings/GraphicsSettingsWidget.ui @@ -74,6 +80,9 @@ target_sources(pcsx2-qt PRIVATE Settings/InterfaceSettingsWidget.cpp Settings/InterfaceSettingsWidget.h Settings/InterfaceSettingsWidget.ui + Settings/MemoryCardSettingsWidget.cpp + Settings/MemoryCardSettingsWidget.h + Settings/MemoryCardSettingsWidget.ui Settings/SettingsDialog.cpp Settings/SettingsDialog.h Settings/SettingsDialog.ui diff --git a/pcsx2-qt/Settings/AudioSettingsWidget.cpp b/pcsx2-qt/Settings/AudioSettingsWidget.cpp new file mode 100644 index 0000000000..27e758fb81 --- /dev/null +++ b/pcsx2-qt/Settings/AudioSettingsWidget.cpp @@ -0,0 +1,35 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2022 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#include "PrecompiledHeader.h" + +#include +#include + +#include "AudioSettingsWidget.h" +#include "EmuThread.h" +#include "QtUtils.h" +#include "SettingWidgetBinder.h" +#include "SettingsDialog.h" + +AudioSettingsWidget::AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent) + : QWidget(parent) +{ + SettingsInterface* sif = dialog->getSettingsInterface(); + + m_ui.setupUi(this); +} + +AudioSettingsWidget::~AudioSettingsWidget() = default; diff --git a/pcsx2-qt/Settings/AudioSettingsWidget.h b/pcsx2-qt/Settings/AudioSettingsWidget.h new file mode 100644 index 0000000000..206adf15bd --- /dev/null +++ b/pcsx2-qt/Settings/AudioSettingsWidget.h @@ -0,0 +1,34 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2022 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#pragma once + +#include + +#include "ui_AudioSettingsWidget.h" + +class SettingsDialog; + +class AudioSettingsWidget : public QWidget +{ + Q_OBJECT + +public: + AudioSettingsWidget(SettingsDialog* dialog, QWidget* parent); + ~AudioSettingsWidget(); + +private: + Ui::AudioSettingsWidget m_ui; +}; diff --git a/pcsx2-qt/Settings/AudioSettingsWidget.ui b/pcsx2-qt/Settings/AudioSettingsWidget.ui new file mode 100644 index 0000000000..c77b0aae97 --- /dev/null +++ b/pcsx2-qt/Settings/AudioSettingsWidget.ui @@ -0,0 +1,19 @@ + + + AudioSettingsWidget + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + diff --git a/pcsx2-qt/Settings/GameSummaryWidget.cpp b/pcsx2-qt/Settings/GameSummaryWidget.cpp new file mode 100644 index 0000000000..0333603c4d --- /dev/null +++ b/pcsx2-qt/Settings/GameSummaryWidget.cpp @@ -0,0 +1,41 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2022 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#include "PrecompiledHeader.h" + +#include "common/StringUtil.h" + +#include "Frontend/GameList.h" + +#include "GameSummaryWidget.h" + +GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsDialog* dialog, QWidget* parent) +{ + m_ui.setupUi(this); + populateUi(entry); +} + +GameSummaryWidget::~GameSummaryWidget() = default; + +void GameSummaryWidget::populateUi(const GameList::Entry* entry) +{ + m_ui.title->setText(QString::fromStdString(entry->title)); + m_ui.path->setText(QString::fromStdString(entry->path)); + m_ui.serial->setText(QString::fromStdString(entry->serial)); + m_ui.crc->setText(QString::fromStdString(StringUtil::StdStringFromFormat("%08X", entry->crc))); + m_ui.type->setCurrentIndex(static_cast(entry->type)); + m_ui.region->setCurrentIndex(static_cast(entry->region)); + m_ui.compatibility->setCurrentIndex(static_cast(entry->compatibility_rating)); +} diff --git a/pcsx2-qt/Settings/GameSummaryWidget.h b/pcsx2-qt/Settings/GameSummaryWidget.h new file mode 100644 index 0000000000..e1809c850c --- /dev/null +++ b/pcsx2-qt/Settings/GameSummaryWidget.h @@ -0,0 +1,41 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2022 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#pragma once + +#include + +#include "ui_GameSummaryWidget.h" + +namespace GameList +{ + struct Entry; +} + +class SettingsDialog; + +class GameSummaryWidget : public QWidget +{ + Q_OBJECT + +public: + GameSummaryWidget(const GameList::Entry* entry, SettingsDialog* dialog, QWidget* parent); + ~GameSummaryWidget(); + +private: + void populateUi(const GameList::Entry* entry); + + Ui::GameSummaryWidget m_ui; +}; diff --git a/pcsx2-qt/Settings/GameSummaryWidget.ui b/pcsx2-qt/Settings/GameSummaryWidget.ui new file mode 100644 index 0000000000..8bb47a868a --- /dev/null +++ b/pcsx2-qt/Settings/GameSummaryWidget.ui @@ -0,0 +1,278 @@ + + + GameSummaryWidget + + + + 0 + 0 + 692 + 562 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Title: + + + + + + + true + + + + + + + Path: + + + + + + + true + + + + + + + Serial: + + + + + + + true + + + + + + + CRC: + + + + + + + true + + + + + + + Region: + + + + + + + false + + + true + + + + NTSC-U/C (US/Canada) + + + + :/icons/flag-us.png:/icons/flag-us.png + + + + + NTSC-J (Japan) + + + + :/icons/flag-jp.png:/icons/flag-jp.png + + + + + PAL (Europe/Australia) + + + + :/icons/flag-eu.png:/icons/flag-eu.png + + + + + Other + + + + :/icons/flag-other.png:/icons/flag-other.png + + + + + + + + Compatibility: + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + false + + + true + + + + Unknown + + + + :/icons/star-0.png:/icons/star-0.png + + + + + Not Bootable + + + + :/icons/star-1.png:/icons/star-1.png + + + + + Reaches Intro + + + + :/icons/star-2.png:/icons/star-2.png + + + + + Reaches Menu + + + + :/icons/star-3.png:/icons/star-3.png + + + + + In-Game + + + + :/icons/star-4.png:/icons/star-4.png + + + + + Perfect + + + + :/icons/star-5.png:/icons/star-5.png + + + + + + + + Type: + + + + + + + false + + + true + + + + PS2 Disc + + + + :/icons/media-optical-24.png:/icons/media-optical-24.png + + + + + PS1 Disc + + + + :/icons/media-optical-24.png:/icons/media-optical-24.png + + + + + ELF (PS2 Executable) + + + + :/icons/applications-system-24.png:/icons/applications-system-24.png + + + + + Playlist + + + + :/icons/address-book-new-22.png:/icons/address-book-new-22.png + + + + + + + + + + + diff --git a/pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp b/pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp new file mode 100644 index 0000000000..255705f03e --- /dev/null +++ b/pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp @@ -0,0 +1,35 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2022 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#include "PrecompiledHeader.h" + +#include +#include + +#include "MemoryCardSettingsWidget.h" +#include "EmuThread.h" +#include "QtUtils.h" +#include "SettingWidgetBinder.h" +#include "SettingsDialog.h" + +MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsDialog* dialog, QWidget* parent) + : QWidget(parent) +{ + SettingsInterface* sif = dialog->getSettingsInterface(); + + m_ui.setupUi(this); +} + +MemoryCardSettingsWidget::~MemoryCardSettingsWidget() = default; diff --git a/pcsx2-qt/Settings/MemoryCardSettingsWidget.h b/pcsx2-qt/Settings/MemoryCardSettingsWidget.h new file mode 100644 index 0000000000..ea1efd4f68 --- /dev/null +++ b/pcsx2-qt/Settings/MemoryCardSettingsWidget.h @@ -0,0 +1,34 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2022 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#pragma once + +#include + +#include "ui_MemoryCardSettingsWidget.h" + +class SettingsDialog; + +class MemoryCardSettingsWidget : public QWidget +{ + Q_OBJECT + +public: + MemoryCardSettingsWidget(SettingsDialog* dialog, QWidget* parent); + ~MemoryCardSettingsWidget(); + +private: + Ui::MemoryCardSettingsWidget m_ui; +}; diff --git a/pcsx2-qt/Settings/MemoryCardSettingsWidget.ui b/pcsx2-qt/Settings/MemoryCardSettingsWidget.ui new file mode 100644 index 0000000000..cc3ea4d760 --- /dev/null +++ b/pcsx2-qt/Settings/MemoryCardSettingsWidget.ui @@ -0,0 +1,19 @@ + + + MemoryCardSettingsWidget + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + diff --git a/pcsx2-qt/Settings/SettingsDialog.cpp b/pcsx2-qt/Settings/SettingsDialog.cpp index 9d305ed06b..4d37d9091d 100644 --- a/pcsx2-qt/Settings/SettingsDialog.cpp +++ b/pcsx2-qt/Settings/SettingsDialog.cpp @@ -28,6 +28,7 @@ #include "AdvancedSystemSettingsWidget.h" #include "BIOSSettingsWidget.h" #include "EmulationSettingsWidget.h" +#include "GameSummaryWidget.h" #include "GameFixSettingsWidget.h" #include "GameListSettingsWidget.h" #include "GraphicsSettingsWidget.h" @@ -80,7 +81,11 @@ void SettingsDialog::setupUi(const GameList::Entry* game) } else { - // TODO: Summary page. + if (game) + { + addWidget(new GameSummaryWidget(game, this, m_ui.settingsContainer), tr("Summary"), QStringLiteral("file-list-line"), + tr("Summary
Eventually this will be where we can see patches and compute hashes/verify dumps/etc.")); + } // remove the preset buttons. but we might want to enable these in the future. m_ui.restoreDefaultsButton->setVisible(false); diff --git a/pcsx2-qt/pcsx2-qt.vcxproj b/pcsx2-qt/pcsx2-qt.vcxproj index b88ff9cc02..822a289be8 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj +++ b/pcsx2-qt/pcsx2-qt.vcxproj @@ -164,6 +164,9 @@ + + + @@ -193,6 +196,9 @@ + + + @@ -228,6 +234,9 @@ + + + @@ -285,6 +294,15 @@ Document + + Document + + + Document + + + Document + diff --git a/pcsx2-qt/pcsx2-qt.vcxproj.filters b/pcsx2-qt/pcsx2-qt.vcxproj.filters index 18273a68dc..b539830e13 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj.filters +++ b/pcsx2-qt/pcsx2-qt.vcxproj.filters @@ -173,9 +173,27 @@ Settings - + moc + + moc + + + moc + + + moc + + + Settings + + + Settings + + + Settings + @@ -247,6 +265,15 @@ Settings + + Settings + + + Settings + + + Settings + @@ -297,5 +324,14 @@ Settings + + Settings + + + Settings + + + Settings + \ No newline at end of file