From 5057dfedbaa7d25550dd0518a8d87a41e33a27a5 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 4 Jul 2023 20:51:56 +1000 Subject: [PATCH] Qt: Rename CreateMemoryCardDialog to MemoryCardCreateDialog Consistency. --- pcsx2-qt/CMakeLists.txt | 6 ++--- ...dDialog.cpp => MemoryCardCreateDialog.cpp} | 24 +++++++++---------- ...yCardDialog.h => MemoryCardCreateDialog.h} | 10 ++++---- ...ardDialog.ui => MemoryCardCreateDialog.ui} | 8 +++---- .../Settings/MemoryCardSettingsWidget.cpp | 4 ++-- pcsx2-qt/pcsx2-qt.vcxproj | 8 +++---- pcsx2-qt/pcsx2-qt.vcxproj.filters | 8 +++---- 7 files changed, 34 insertions(+), 34 deletions(-) rename pcsx2-qt/Settings/{CreateMemoryCardDialog.cpp => MemoryCardCreateDialog.cpp} (86%) rename pcsx2-qt/Settings/{CreateMemoryCardDialog.h => MemoryCardCreateDialog.h} (83%) rename pcsx2-qt/Settings/{CreateMemoryCardDialog.ui => MemoryCardCreateDialog.ui} (97%) diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt index e7a4a11b5c..17b8dcc9a8 100644 --- a/pcsx2-qt/CMakeLists.txt +++ b/pcsx2-qt/CMakeLists.txt @@ -68,9 +68,6 @@ target_sources(pcsx2-qt PRIVATE Settings/ControllerSettingsDialog.h Settings/ControllerSettingsDialog.ui Settings/ControllerSettingWidgetBinder.h - Settings/CreateMemoryCardDialog.cpp - Settings/CreateMemoryCardDialog.h - Settings/CreateMemoryCardDialog.ui Settings/DebugSettingsWidget.cpp Settings/DebugSettingsWidget.h Settings/DebugSettingsWidget.ui @@ -114,6 +111,9 @@ target_sources(pcsx2-qt PRIVATE Settings/MemoryCardConvertDialog.ui Settings/MemoryCardConvertWorker.cpp Settings/MemoryCardConvertWorker.h + Settings/MemoryCardCreateDialog.cpp + Settings/MemoryCardCreateDialog.h + Settings/MemoryCardCreateDialog.ui Settings/MemoryCardSettingsWidget.cpp Settings/MemoryCardSettingsWidget.h Settings/MemoryCardSettingsWidget.ui diff --git a/pcsx2-qt/Settings/CreateMemoryCardDialog.cpp b/pcsx2-qt/Settings/MemoryCardCreateDialog.cpp similarity index 86% rename from pcsx2-qt/Settings/CreateMemoryCardDialog.cpp rename to pcsx2-qt/Settings/MemoryCardCreateDialog.cpp index 542d09242e..939805cf43 100644 --- a/pcsx2-qt/Settings/CreateMemoryCardDialog.cpp +++ b/pcsx2-qt/Settings/MemoryCardCreateDialog.cpp @@ -22,12 +22,12 @@ #include #include -#include "Settings/CreateMemoryCardDialog.h" +#include "Settings/MemoryCardCreateDialog.h" #include "pcsx2/MemoryCardFile.h" #include "pcsx2/System.h" -CreateMemoryCardDialog::CreateMemoryCardDialog(QWidget* parent /* = nullptr */) +MemoryCardCreateDialog::MemoryCardCreateDialog(QWidget* parent /* = nullptr */) : QDialog(parent) { m_ui.setupUi(this); @@ -35,7 +35,7 @@ CreateMemoryCardDialog::CreateMemoryCardDialog(QWidget* parent /* = nullptr */) setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); - connect(m_ui.name, &QLineEdit::textChanged, this, &CreateMemoryCardDialog::nameTextChanged); + connect(m_ui.name, &QLineEdit::textChanged, this, &MemoryCardCreateDialog::nameTextChanged); connect(m_ui.size8MB, &QRadioButton::clicked, this, [this]() { setType(MemoryCardType::File, MemoryCardFileType::PS2_8MB); }); connect(m_ui.size16MB, &QRadioButton::clicked, this, [this]() { setType(MemoryCardType::File, MemoryCardFileType::PS2_16MB); }); @@ -46,9 +46,9 @@ CreateMemoryCardDialog::CreateMemoryCardDialog(QWidget* parent /* = nullptr */) disconnect(m_ui.buttonBox, &QDialogButtonBox::accepted, this, nullptr); - connect(m_ui.buttonBox->button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &CreateMemoryCardDialog::createCard); - connect(m_ui.buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, &CreateMemoryCardDialog::close); - connect(m_ui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &CreateMemoryCardDialog::restoreDefaults); + connect(m_ui.buttonBox->button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &MemoryCardCreateDialog::createCard); + connect(m_ui.buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, &MemoryCardCreateDialog::close); + connect(m_ui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &MemoryCardCreateDialog::restoreDefaults); #ifndef _WIN32 m_ui.ntfsCompression->setEnabled(false); @@ -57,9 +57,9 @@ CreateMemoryCardDialog::CreateMemoryCardDialog(QWidget* parent /* = nullptr */) updateState(); } -CreateMemoryCardDialog::~CreateMemoryCardDialog() = default; +MemoryCardCreateDialog::~MemoryCardCreateDialog() = default; -void CreateMemoryCardDialog::nameTextChanged() +void MemoryCardCreateDialog::nameTextChanged() { QString controlName(m_ui.name->text()); const int cursorPos = m_ui.name->cursorPosition(); @@ -76,14 +76,14 @@ void CreateMemoryCardDialog::nameTextChanged() updateState(); } -void CreateMemoryCardDialog::setType(MemoryCardType type, MemoryCardFileType fileType) +void MemoryCardCreateDialog::setType(MemoryCardType type, MemoryCardFileType fileType) { m_type = type; m_fileType = fileType; updateState(); } -void CreateMemoryCardDialog::restoreDefaults() +void MemoryCardCreateDialog::restoreDefaults() { setType(MemoryCardType::File, MemoryCardFileType::PS2_8MB); m_ui.size8MB->setChecked(true); @@ -94,7 +94,7 @@ void CreateMemoryCardDialog::restoreDefaults() m_ui.sizeFolder->setChecked(false); } -void CreateMemoryCardDialog::updateState() +void MemoryCardCreateDialog::updateState() { const bool okay = (m_ui.name->text().length() > 0); @@ -104,7 +104,7 @@ void CreateMemoryCardDialog::updateState() #endif } -void CreateMemoryCardDialog::createCard() +void MemoryCardCreateDialog::createCard() { QString name(m_ui.name->text()); std::string nameStr; diff --git a/pcsx2-qt/Settings/CreateMemoryCardDialog.h b/pcsx2-qt/Settings/MemoryCardCreateDialog.h similarity index 83% rename from pcsx2-qt/Settings/CreateMemoryCardDialog.h rename to pcsx2-qt/Settings/MemoryCardCreateDialog.h index 7c8461f120..a8831789e6 100644 --- a/pcsx2-qt/Settings/CreateMemoryCardDialog.h +++ b/pcsx2-qt/Settings/MemoryCardCreateDialog.h @@ -17,17 +17,17 @@ #include -#include "ui_CreateMemoryCardDialog.h" +#include "ui_MemoryCardCreateDialog.h" #include "pcsx2/Config.h" -class CreateMemoryCardDialog final : public QDialog +class MemoryCardCreateDialog final : public QDialog { Q_OBJECT public: - explicit CreateMemoryCardDialog(QWidget* parent = nullptr); - ~CreateMemoryCardDialog(); + explicit MemoryCardCreateDialog(QWidget* parent = nullptr); + ~MemoryCardCreateDialog(); private Q_SLOTS: void nameTextChanged(); @@ -38,7 +38,7 @@ private: void restoreDefaults(); void updateState(); - Ui::CreateMemoryCardDialog m_ui; + Ui::MemoryCardCreateDialog m_ui; MemoryCardType m_type = MemoryCardType::File; MemoryCardFileType m_fileType = MemoryCardFileType::PS2_8MB; diff --git a/pcsx2-qt/Settings/CreateMemoryCardDialog.ui b/pcsx2-qt/Settings/MemoryCardCreateDialog.ui similarity index 97% rename from pcsx2-qt/Settings/CreateMemoryCardDialog.ui rename to pcsx2-qt/Settings/MemoryCardCreateDialog.ui index e3503c5ab1..c0d7815674 100644 --- a/pcsx2-qt/Settings/CreateMemoryCardDialog.ui +++ b/pcsx2-qt/Settings/MemoryCardCreateDialog.ui @@ -1,7 +1,7 @@ - CreateMemoryCardDialog - + MemoryCardCreateDialog + 0 @@ -285,7 +285,7 @@ buttonBox accepted() - CreateMemoryCardDialog + MemoryCardCreateDialog accept() @@ -301,7 +301,7 @@ buttonBox rejected() - CreateMemoryCardDialog + MemoryCardCreateDialog reject() diff --git a/pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp b/pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp index cdc1317ecc..98566cbbd6 100644 --- a/pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp +++ b/pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp @@ -24,8 +24,8 @@ #include "common/StringUtil.h" -#include "CreateMemoryCardDialog.h" #include "MemoryCardConvertDialog.h" +#include "MemoryCardCreateDialog.h" #include "MemoryCardSettingsWidget.h" #include "QtHost.h" #include "QtUtils.h" @@ -186,7 +186,7 @@ void MemoryCardSettingsWidget::ejectSlot(u32 slot) void MemoryCardSettingsWidget::createCard() { - CreateMemoryCardDialog dialog(QtUtils::GetRootWidget(this)); + MemoryCardCreateDialog dialog(QtUtils::GetRootWidget(this)); if (dialog.exec() == QDialog::Accepted) refresh(); } diff --git a/pcsx2-qt/pcsx2-qt.vcxproj b/pcsx2-qt/pcsx2-qt.vcxproj index 24233b0a6b..2c2dc0ccf4 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj +++ b/pcsx2-qt/pcsx2-qt.vcxproj @@ -105,7 +105,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -312,7 +312,7 @@ Document - + Document diff --git a/pcsx2-qt/pcsx2-qt.vcxproj.filters b/pcsx2-qt/pcsx2-qt.vcxproj.filters index 1e3e8af277..43154da722 100644 --- a/pcsx2-qt/pcsx2-qt.vcxproj.filters +++ b/pcsx2-qt/pcsx2-qt.vcxproj.filters @@ -190,10 +190,10 @@ Settings - + moc - + Settings @@ -423,7 +423,7 @@ Settings - + Settings @@ -549,7 +549,7 @@ Settings - + Settings