@@ -42,28 +42,46 @@
#include "rpcs3_version.h"
+#include "ui_main_window.h"
+
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
-main_window::main_window(QWidget *parent) : QMainWindow(parent), m_sys_menu_opened(false)
+main_window::main_window(QWidget *parent) : QMainWindow(parent), m_sys_menu_opened(false), ui(new Ui::main_window)
{
+ ui->setupUi(this);
+
guiSettings.reset(new gui_settings());
- setDockNestingEnabled(true);
-
- //Load Icons: This needs to happen before any actions or buttons are created
+ // Load Icons: This needs to happen before any actions or buttons are created
icon_play = QIcon(":/Icons/play.png");
icon_pause = QIcon(":/Icons/pause.png");
icon_stop = QIcon(":/Icons/stop.png");
icon_restart = QIcon(":/Icons/restart.png");
appIcon = QIcon(":/rpcs3.ico");
+ // add toolbar widgets (crappy Qt designer is not able to)
+ ui->sizeSlider->setRange(0, GUI::gl_icon_size.size() - 1);
+ // get icon size from list
+ int icon_size_index = 0;
+ QString icon_Size_Str = guiSettings->GetValue(GUI::gl_iconSize).toString();
+ for (int i = 0; i < GUI::gl_icon_size.count(); i++)
+ {
+ if (GUI::gl_icon_size.at(i).first == icon_Size_Str)
+ {
+ icon_size_index = i;
+ break;
+ }
+ }
+ ui->sizeSlider->setSliderPosition(icon_size_index);
+ ui->toolBar->addWidget(ui->sizeSlider);
+ ui->toolBar->addSeparator();
+ ui->toolBar->addWidget(ui->searchBar);
+
CreateActions();
- CreateMenus();
CreateDockWindows();
setMinimumSize(350, minimumSizeHint().height()); // seems fine on win 10
- ConfigureGuiFromSettings(true);
CreateConnects();
setWindowTitle(QString::fromStdString("RPCS3 v" + rpcs3::version.to_string()));
@@ -73,6 +91,7 @@ main_window::main_window(QWidget *parent) : QMainWindow(parent), m_sys_menu_open
// Need to have this happen fast, but not now because connects aren't created yet.
// So, a tricky balance in terms of time but this works.
RequestGlobalStylesheetChange(guiSettings->GetCurrentStylesheetPath());
+ ConfigureGuiFromSettings(true);
});
}
@@ -91,22 +110,27 @@ auto Pause = []()
void main_window::CreateThumbnailToolbar()
{
#ifdef _WIN32
+ icon_thumb_play = QIcon(":/Icons/play_blue.png");
+ icon_thumb_pause = QIcon(":/Icons/pause_blue.png");
+ icon_thumb_stop = QIcon(":/Icons/stop_blue.png");
+ icon_thumb_restart = QIcon(":/Icons/restart_blue.png");
+
thumb_bar = new QWinThumbnailToolBar(this);
thumb_bar->setWindow(windowHandle());
thumb_playPause = new QWinThumbnailToolButton(thumb_bar);
- thumb_playPause->setToolTip(tr("Start"));
- thumb_playPause->setIcon(icon_play);
+ thumb_playPause->setToolTip(tr("Pause"));
+ thumb_playPause->setIcon(icon_thumb_pause);
thumb_playPause->setEnabled(false);
thumb_stop = new QWinThumbnailToolButton(thumb_bar);
thumb_stop->setToolTip(tr("Stop"));
- thumb_stop->setIcon(icon_stop);
+ thumb_stop->setIcon(icon_thumb_stop);
thumb_stop->setEnabled(false);
thumb_restart = new QWinThumbnailToolButton(thumb_bar);
thumb_restart->setToolTip(tr("Restart"));
- thumb_restart->setIcon(icon_restart);
+ thumb_restart->setIcon(icon_thumb_restart);
thumb_restart->setEnabled(false);
thumb_bar->addButton(thumb_playPause);
@@ -572,97 +596,6 @@ void main_window::DecryptSPRXLibraries()
LOG_NOTICE(GENERAL, "Finished decrypting all SPRX libraries.");
}
-void main_window::About()
-{
- QDialog* about = new QDialog(this);
-
- QPushButton* gitHub = new QPushButton(tr("GitHub"), about);
- QPushButton* website = new QPushButton(tr("Website"), about);
- QPushButton* forum = new QPushButton(tr("Forum"), about);
- QPushButton* patreon = new QPushButton(tr("Patreon"), about);
- QPushButton* close = new QPushButton(tr("Close"), about);
- close->setDefault(true);
-
- QLabel* icon = new QLabel(this);
- icon->setPixmap(QIcon(":/rpcs3.ico").pixmap(96, 96));
-
- QLabel* caption = new QLabel(tr(
- "RPCS3
"
- "A PlayStation 3 emulator and debugger.
"
- "RPCS3 Version: %1").arg(qstr(rpcs3::version.to_string())
- ));
- QLabel* developers = new QLabel(tr(
- "Developers:
¬DH
¬AlexAltea
¬Hykem
Oil
Nekotekina
Bigpet
¬gopalsr83
¬tambry
"
- "vlj
kd-11
jarveson
raven02
AniLeo
cornytrace
ssshadow
Numan
"
- ));
- QLabel* contributors = new QLabel(tr(
- "Contributors:
BlackDaemon
elisha464
Aishou
krofna
xsacha
danilaml
unknownbrackets
Zangetsu38
"
- "lioncash
achurch
darkf
Syphurith
Blaypeg
Survanium90
georgemoralis
ikki84
hcorion
Megamouse
flash-fire
"
- ));
- QLabel* supporters = new QLabel(tr(
- "Supporters:
Howard Garrison
EXPotemkin
Marko V.
danhp
Jake (5315825)
Ian Reid
Tad Sherlock
Tyler Friesen
"
- "Folzar
Payton Williams
RedPill Australia
yanghong
Mohammed El-Serougi
Дима ~Ximer13~ Кулин
James Reed
BaroqueSonata
"
- "Bonzay0
Henrijs Kons
Davide Balbi
Lena Stöffler
"
- ));
- icon->setAlignment(Qt::AlignLeft);
- caption->setAlignment(Qt::AlignLeft);
- developers->setAlignment(Qt::AlignTop);
- contributors->setAlignment(Qt::AlignTop);
- supporters->setAlignment(Qt::AlignTop);
-
- // Caption Layout
- QVBoxLayout* caption_layout = new QVBoxLayout();
- caption_layout->setAlignment(Qt::AlignLeft);
- caption_layout->addSpacing(15);
- caption_layout->addWidget(caption);
-
- // Header Section
- QHBoxLayout* header_layout = new QHBoxLayout();
- header_layout->setAlignment(Qt::AlignCenter);
- header_layout->addLayout(caption_layout);
- header_layout->addStretch();
- header_layout->addWidget(icon);
- header_layout->addStretch();
-
- // Names Section
- QHBoxLayout* text_layout = new QHBoxLayout();
- text_layout->setAlignment(Qt::AlignTop);
- text_layout->addWidget(developers);
- text_layout->addWidget(contributors);
- text_layout->addWidget(supporters);
-
- // Button Section
- QHBoxLayout* button_layout = new QHBoxLayout();
- button_layout->addWidget(gitHub);
- button_layout->addWidget(website);
- button_layout->addWidget(forum);
- button_layout->addWidget(patreon);
- button_layout->addStretch();
- button_layout->addWidget(close);
-
- // Main Layout
- QVBoxLayout* layout = new QVBoxLayout();
- layout->addLayout(header_layout);
- layout->addLayout(text_layout);
- layout->addSpacing(20);
- layout->addLayout(button_layout);
-
- // Events
- connect(gitHub, &QAbstractButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://www.github.com/RPCS3")); });
- connect(website, &QAbstractButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://www.rpcs3.net")); });
- connect(forum, &QAbstractButton::clicked, [] { QDesktopServices::openUrl(QUrl("http://www.emunewz.net/forum/forumdisplay.php?fid=172")); });
- connect(patreon, &QAbstractButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://www.patreon.com/Nekotekina")); });
- connect(close, &QAbstractButton::clicked, about, &QWidget::close);
-
- // Create About Dialog
- about->setWindowTitle(tr("About RPCS3"));
- about->setWindowFlags(about->windowFlags() & ~Qt::WindowContextHelpButtonHint);
- about->setMinimumWidth(500);
- about->setLayout(layout);
- about->setFixedSize(about->sizeHint());
- about->exec();
-}
-
/** Needed so that when a backup occurs of window state in guisettings, the state is current.
* Also, so that on close, the window state is preserved.
*/
@@ -671,6 +604,7 @@ void main_window::SaveWindowState()
// Save gui settings
guiSettings->SetValue(GUI::mw_geometry, saveGeometry());
guiSettings->SetValue(GUI::mw_windowState, saveState());
+ guiSettings->SetValue(GUI::mw_mwState, m_mw->saveState());
// Save column settings
gameListFrame->SaveSettings();
@@ -680,64 +614,64 @@ void main_window::OnEmuRun()
{
debuggerFrame->EnableButtons(true);
#ifdef _WIN32
- thumb_playPause->setToolTip(tr("Pause"));
- thumb_playPause->setIcon(icon_pause);
+ thumb_playPause->setToolTip(tr("Pause emulation"));
+ thumb_playPause->setIcon(icon_thumb_pause);
#endif
- sysPauseAct->setText(tr("&Pause\tCtrl+P"));
- sysPauseAct->setIcon(icon_pause);
- menu_run->setText(tr("&Pause"));
- menu_run->setIcon(icon_pause);
+ ui->sysPauseAct->setText(tr("&Pause\tCtrl+P"));
+ ui->sysPauseAct->setIcon(icon_pause);
+ ui->toolbar_start->setIcon(icon_pause);
+ ui->toolbar_start->setToolTip(tr("Pause emulation"));
EnableMenus(true);
}
void main_window::OnEmuResume()
{
#ifdef _WIN32
- thumb_playPause->setToolTip(tr("Pause"));
- thumb_playPause->setIcon(icon_pause);
+ thumb_playPause->setToolTip(tr("Pause emulation"));
+ thumb_playPause->setIcon(icon_thumb_pause);
#endif
- sysPauseAct->setText(tr("&Pause\tCtrl+P"));
- sysPauseAct->setIcon(icon_pause);
- menu_run->setText(tr("&Pause"));
- menu_run->setIcon(icon_pause);
+ ui->sysPauseAct->setText(tr("&Pause\tCtrl+P"));
+ ui->sysPauseAct->setIcon(icon_pause);
+ ui->toolbar_start->setIcon(icon_pause);
+ ui->toolbar_start->setToolTip(tr("Pause emulation"));
}
void main_window::OnEmuPause()
{
#ifdef _WIN32
- thumb_playPause->setToolTip(tr("Resume"));
- thumb_playPause->setIcon(icon_play);
+ thumb_playPause->setToolTip(tr("Resume emulation"));
+ thumb_playPause->setIcon(icon_thumb_play);
#endif
- sysPauseAct->setText(tr("&Resume\tCtrl+E"));
- sysPauseAct->setIcon(icon_play);
- menu_run->setText(tr("&Resume"));
- menu_run->setIcon(icon_play);
+ ui->sysPauseAct->setText(tr("&Resume\tCtrl+E"));
+ ui->sysPauseAct->setIcon(icon_play);
+ ui->toolbar_start->setIcon(icon_play);
+ ui->toolbar_start->setToolTip(tr("Resume emulation"));
}
void main_window::OnEmuStop()
{
debuggerFrame->EnableButtons(false);
+ ui->sysPauseAct->setText(Emu.IsReady() ? tr("&Start\tCtrl+E") : tr("&Resume\tCtrl+E"));
+ ui->sysPauseAct->setIcon(icon_play);
#ifdef _WIN32
- thumb_playPause->setToolTip(Emu.IsReady() ? tr("Start") : tr("Resume"));
- thumb_playPause->setIcon(icon_play);
+ thumb_playPause->setToolTip(Emu.IsReady() ? tr("Start emulation") : tr("Resume emulation"));
+ thumb_playPause->setIcon(icon_thumb_play);
#endif
- menu_run->setText(Emu.IsReady() ? tr("&Start") : tr("&Resume"));
- menu_run->setIcon(icon_play);
EnableMenus(false);
if (!Emu.GetPath().empty())
{
- sysPauseAct->setText(tr("&Restart\tCtrl+E"));
- sysPauseAct->setIcon(icon_restart);
- sysPauseAct->setEnabled(true);
- menu_restart->setEnabled(true);
+ ui->toolbar_start->setEnabled(true);
+ ui->toolbar_start->setIcon(icon_restart);
+ ui->toolbar_start->setToolTip(tr("Restart emulation"));
+ ui->sysRebootAct->setEnabled(true);
#ifdef _WIN32
thumb_restart->setEnabled(true);
#endif
}
else
{
- sysPauseAct->setText(Emu.IsReady() ? tr("&Start\tCtrl+E") : tr("&Resume\tCtrl+E"));
- sysPauseAct->setIcon(icon_play);
+ ui->toolbar_start->setIcon(icon_play);
+ ui->toolbar_start->setToolTip(Emu.IsReady() ? tr("Start emulation") : tr("Resume emulation"));
}
}
@@ -745,13 +679,13 @@ void main_window::OnEmuReady()
{
debuggerFrame->EnableButtons(true);
#ifdef _WIN32
- thumb_playPause->setToolTip(Emu.IsReady() ? tr("Start") : tr("Resume"));
- thumb_playPause->setIcon(icon_play);
+ thumb_playPause->setToolTip(Emu.IsReady() ? tr("Start emulation") : tr("Resume emulation"));
+ thumb_playPause->setIcon(icon_thumb_play);
#endif
- sysPauseAct->setText(Emu.IsReady() ? tr("&Start\tCtrl+E") : tr("&Resume\tCtrl+E"));
- sysPauseAct->setIcon(icon_play);
- menu_run->setText(Emu.IsReady() ? tr("&Start") : tr("&Resume"));
- menu_run->setIcon(icon_play);
+ ui->sysPauseAct->setText(Emu.IsReady() ? tr("&Start\tCtrl+E") : tr("&Resume\tCtrl+E"));
+ ui->sysPauseAct->setIcon(icon_play);
+ ui->toolbar_start->setIcon(icon_play);
+ ui->toolbar_start->setToolTip(Emu.IsReady() ? tr("Start emulation") : tr("Resume emulation"));
EnableMenus(true);
}
@@ -766,24 +700,24 @@ void main_window::EnableMenus(bool enabled)
thumb_restart->setEnabled(enabled);
#endif
- // Buttons
- menu_run->setEnabled(enabled);
- menu_stop->setEnabled(enabled);
- menu_restart->setEnabled(enabled);
+ // Toolbar
+ ui->toolbar_start->setEnabled(enabled);
+ ui->toolbar_stop->setEnabled(enabled);
// Emulation
- sysPauseAct->setEnabled(enabled);
- sysStopAct->setEnabled(enabled);
+ ui->sysPauseAct->setEnabled(enabled);
+ ui->sysStopAct->setEnabled(enabled);
+ ui->sysRebootAct->setEnabled(enabled);
// PS3 Commands
- sysSendOpenMenuAct->setEnabled(enabled);
- sysSendExitAct->setEnabled(enabled);
+ ui->sysSendOpenMenuAct->setEnabled(enabled);
+ ui->sysSendExitAct->setEnabled(enabled);
// Tools
- toolskernel_explorerAct->setEnabled(enabled);
- toolsmemory_viewerAct->setEnabled(enabled);
- toolsRsxDebuggerAct->setEnabled(enabled);
- toolsStringSearchAct->setEnabled(enabled);
+ ui->toolskernel_explorerAct->setEnabled(enabled);
+ ui->toolsmemory_viewerAct->setEnabled(enabled);
+ ui->toolsRsxDebuggerAct->setEnabled(enabled);
+ ui->toolsStringSearchAct->setEnabled(enabled);
}
void main_window::BootRecentAction(const QAction* act)
@@ -816,7 +750,7 @@ void main_window::BootRecentAction(const QAction* act)
// clear menu of actions
for (auto act : m_recentGameActs)
{
- m_bootRecentMenu->removeAction(act);
+ ui->bootRecentMenu->removeAction(act);
}
// remove action from list
@@ -832,7 +766,7 @@ void main_window::BootRecentAction(const QAction* act)
{
m_recentGameActs[i]->setShortcut(tr("Ctrl+%1").arg(i + 1));
m_recentGameActs[i]->setToolTip(m_rg_entries.at(i).second);
- m_bootRecentMenu->addAction(m_recentGameActs[i]);
+ ui->bootRecentMenu->addAction(m_recentGameActs[i]);
}
LOG_WARNING(GENERAL, "Boot Recent list refreshed");
@@ -905,7 +839,7 @@ QAction* main_window::CreateRecentAction(const q_string_pair& entry, const uint&
void main_window::AddRecentAction(const q_string_pair& entry)
{
// don't change list on freeze
- if (freezeRecentAct->isChecked())
+ if (ui->freezeRecentAct->isChecked())
{
return;
}
@@ -920,7 +854,7 @@ void main_window::AddRecentAction(const q_string_pair& entry)
// clear menu of actions
for (auto act : m_recentGameActs)
{
- m_bootRecentMenu->removeAction(act);
+ ui->bootRecentMenu->removeAction(act);
}
// if path already exists, remove it in order to get it to beginning
@@ -954,7 +888,7 @@ void main_window::AddRecentAction(const q_string_pair& entry)
{
m_recentGameActs[i]->setShortcut(tr("Ctrl+%1").arg(i+1));
m_recentGameActs[i]->setToolTip(m_rg_entries.at(i).second);
- m_bootRecentMenu->addAction(m_recentGameActs[i]);
+ ui->bootRecentMenu->addAction(m_recentGameActs[i]);
}
guiSettings->SetValue(GUI::rg_entries, guiSettings->List2Var(m_rg_entries));
@@ -962,252 +896,149 @@ void main_window::AddRecentAction(const q_string_pair& entry)
void main_window::CreateActions()
{
- bootElfAct = new QAction(tr("Boot (S)ELF file"), this);
- bootGameAct = new QAction(tr("Boot &Game"), this);
- bootInstallPkgAct = new QAction(tr("&Install PKG"), this);
- bootInstallPupAct = new QAction(tr("&Install Firmware"), this);
+ ui->exitAct->setShortcuts(QKeySequence::Quit);
- clearRecentAct = new QAction(tr("&Clear List"), this);
- freezeRecentAct = new QAction(tr("&Freeze List"), this);
- freezeRecentAct->setCheckable(true);
-
- exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcuts(QKeySequence::Quit);
- exitAct->setStatusTip(tr("Exit the application"));
-
- sysPauseAct = new QAction(tr("&Pause"), this);
- sysPauseAct->setEnabled(false);
- sysPauseAct->setIcon(icon_pause);
-
- sysStopAct = new QAction(tr("&Stop"), this);
- sysStopAct->setEnabled(false);
- sysStopAct->setIcon(icon_stop);
-
- sysSendOpenMenuAct = new QAction(tr("Send &open system menu cmd"), this);
- sysSendOpenMenuAct->setEnabled(false);
-
- sysSendExitAct = new QAction(tr("Send &exit cmd"), this);
- sysSendExitAct->setEnabled(false);
-
- confSettingsAct = new QAction(tr("&Settings"), this);
- confPadAct = new QAction(tr("&Keyboard Settings"), this);
-
- confAutopauseManagerAct = new QAction(tr("&Auto Pause Settings"), this);
- confAutopauseManagerAct->setEnabled(false);
-
- confVFSDialogAct = new QAction(tr("Virtual File System"), this);
-
- confSavedataManagerAct = new QAction(tr("Save &Data Utility"), this);
- confSavedataManagerAct->setEnabled(false);
-
- toolsCgDisasmAct = new QAction(tr("&Cg Disasm"), this);
- toolsCgDisasmAct->setEnabled(true);
-
- toolskernel_explorerAct = new QAction(tr("&Kernel Explorer"), this);
- toolskernel_explorerAct->setEnabled(false);
-
- toolsmemory_viewerAct = new QAction(tr("&Memory Viewer"), this);
- toolsmemory_viewerAct->setEnabled(false);
-
- toolsRsxDebuggerAct = new QAction(tr("&RSX Debugger"), this);
- toolsRsxDebuggerAct->setEnabled(false);
-
- toolsStringSearchAct = new QAction(tr("&String Search"), this);
- toolsStringSearchAct->setEnabled(false);
-
- toolsDecryptSprxLibsAct = new QAction(tr("SPRX &Decryption"), this);
-
- showDebuggerAct = new QAction(tr("Show Debugger"), this);
- showDebuggerAct->setCheckable(true);
-
- showLogAct = new QAction(tr("Show Log/TTY"), this);
- showLogAct->setCheckable(true);
-
- showGameListAct = new QAction(tr("Show Game List"), this);
- showGameListAct->setCheckable(true);
-
- showControlsAct = new QAction(tr("Show Controls"), this);
- showControlsAct->setCheckable(true);
-
- showGameListToolBarAct = new QAction(tr("Show Tool Bar"), this);
- showGameListToolBarAct->setCheckable(true);
-
- refreshGameListAct = new QAction(tr("&Refresh Game List"), this);
-
- showCatHDDGameAct = new QAction(category::hdd_Game, this);
- showCatHDDGameAct->setCheckable(true);
-
- showCatDiscGameAct = new QAction(category::disc_Game, this);
- showCatDiscGameAct->setCheckable(true);
-
- showCatHomeAct = new QAction(tr("Home"), this);
- showCatHomeAct->setCheckable(true);
-
- showCatAudioVideoAct = new QAction(tr("Audio/Video"), this);
- showCatAudioVideoAct->setCheckable(true);
-
- showCatGameDataAct = new QAction(tr("GameData"), this);
- showCatGameDataAct->setCheckable(true);
-
- showCatUnknownAct = new QAction(category::unknown, this);
- showCatUnknownAct->setCheckable(true);
-
- showCatOtherAct = new QAction(category::other, this);
- showCatOtherAct->setCheckable(true);
+ ui->toolbar_start->setEnabled(false);
+ ui->toolbar_stop->setEnabled(false);
categoryVisibleActGroup = new QActionGroup(this);
- categoryVisibleActGroup->addAction(showCatHDDGameAct);
- categoryVisibleActGroup->addAction(showCatDiscGameAct);
- categoryVisibleActGroup->addAction(showCatHomeAct);
- categoryVisibleActGroup->addAction(showCatAudioVideoAct);
- categoryVisibleActGroup->addAction(showCatGameDataAct);
- categoryVisibleActGroup->addAction(showCatUnknownAct);
- categoryVisibleActGroup->addAction(showCatOtherAct);
+ categoryVisibleActGroup->addAction(ui->showCatHDDGameAct);
+ categoryVisibleActGroup->addAction(ui->showCatDiscGameAct);
+ categoryVisibleActGroup->addAction(ui->showCatHomeAct);
+ categoryVisibleActGroup->addAction(ui->showCatAudioVideoAct);
+ categoryVisibleActGroup->addAction(ui->showCatGameDataAct);
+ categoryVisibleActGroup->addAction(ui->showCatUnknownAct);
+ categoryVisibleActGroup->addAction(ui->showCatOtherAct);
categoryVisibleActGroup->setExclusive(false);
- setIconSizeTinyAct = new QAction(tr("Tiny"), this);
- setIconSizeTinyAct->setCheckable(true);
-
- setIconSizeSmallAct = new QAction(tr("Small"), this);
- setIconSizeSmallAct->setCheckable(true);
-
- setIconSizeMediumAct = new QAction(tr("Medium"), this);
- setIconSizeMediumAct->setCheckable(true);
-
- setIconSizeLargeAct = new QAction(tr("Large"), this);
- setIconSizeLargeAct->setCheckable(true);
-
iconSizeActGroup = new QActionGroup(this);
- iconSizeActGroup->addAction(setIconSizeTinyAct);
- iconSizeActGroup->addAction(setIconSizeSmallAct);
- iconSizeActGroup->addAction(setIconSizeMediumAct);
- iconSizeActGroup->addAction(setIconSizeLargeAct);
- setIconSizeSmallAct->setChecked(true);
-
- setlistModeListAct = new QAction(tr("List"), this);
- setlistModeListAct->setCheckable(true);
-
- setlistModeGridAct = new QAction(tr("Grid"), this);
- setlistModeGridAct->setCheckable(true);
+ iconSizeActGroup->addAction(ui->setIconSizeTinyAct);
+ iconSizeActGroup->addAction(ui->setIconSizeSmallAct);
+ iconSizeActGroup->addAction(ui->setIconSizeMediumAct);
+ iconSizeActGroup->addAction(ui->setIconSizeLargeAct);
listModeActGroup = new QActionGroup(this);
- listModeActGroup->addAction(setlistModeListAct);
- listModeActGroup->addAction(setlistModeGridAct);
- setlistModeListAct->setChecked(true);
-
- aboutAct = new QAction(tr("&About"), this);
- aboutAct->setStatusTip(tr("Show the application's About box"));
-
- aboutQtAct = new QAction(tr("About &Qt"), this);
- aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
+ listModeActGroup->addAction(ui->setlistModeListAct);
+ listModeActGroup->addAction(ui->setlistModeGridAct);
}
void main_window::CreateConnects()
{
- connect(bootElfAct, &QAction::triggered, this, &main_window::BootElf);
- connect(bootGameAct, &QAction::triggered, this, &main_window::BootGame);
- connect(m_bootRecentMenu, &QMenu::aboutToShow, [=]() {
+ connect(ui->bootElfAct, &QAction::triggered, this, &main_window::BootElf);
+ connect(ui->bootGameAct, &QAction::triggered, this, &main_window::BootGame);
+ connect(ui->bootRecentMenu, &QMenu::aboutToShow, [=]() {
// Enable/Disable Recent Games List
const bool stopped = Emu.IsStopped();
- for (auto act : m_bootRecentMenu->actions())
+ for (auto act : ui->bootRecentMenu->actions())
{
- if (act != freezeRecentAct && act != clearRecentAct)
+ if (act != ui->freezeRecentAct && act != ui->clearRecentAct)
{
act->setEnabled(stopped);
}
}
});
- connect(clearRecentAct, &QAction::triggered, [this](){
- if (freezeRecentAct->isChecked()) { return; }
+ connect(ui->clearRecentAct, &QAction::triggered, [this](){
+ if (ui->freezeRecentAct->isChecked()) { return; }
m_rg_entries.clear();
for (auto act : m_recentGameActs)
{
- m_bootRecentMenu->removeAction(act);
+ ui->bootRecentMenu->removeAction(act);
}
m_recentGameActs.clear();
guiSettings->SetValue(GUI::rg_entries, guiSettings->List2Var(q_pair_list()));
});
- connect(freezeRecentAct, &QAction::triggered, [=](bool checked) {
+ connect(ui->freezeRecentAct, &QAction::triggered, [=](bool checked) {
guiSettings->SetValue(GUI::rg_freeze, checked);
});
- connect(bootInstallPkgAct, &QAction::triggered, this, &main_window::InstallPkg);
- connect(bootInstallPupAct, &QAction::triggered, this, &main_window::InstallPup);
- connect(exitAct, &QAction::triggered, this, &QWidget::close);
- connect(sysPauseAct, &QAction::triggered, Pause);
- connect(sysStopAct, &QAction::triggered, [=]() { Emu.Stop(); });
- connect(sysSendOpenMenuAct, &QAction::triggered, [=](){
+ connect(ui->bootInstallPkgAct, &QAction::triggered, this, &main_window::InstallPkg);
+ connect(ui->bootInstallPupAct, &QAction::triggered, this, &main_window::InstallPup);
+ connect(ui->exitAct, &QAction::triggered, this, &QWidget::close);
+ connect(ui->sysPauseAct, &QAction::triggered, Pause);
+ connect(ui->sysStopAct, &QAction::triggered, [=]() { Emu.Stop(); });
+ connect(ui->sysRebootAct, &QAction::triggered, [=]() { Emu.Stop(); Emu.Load(); });
+ connect(ui->captureFrame, &QAction::triggered, [=]() { user_asked_for_frame_capture = true; });
+ connect(ui->sysSendOpenMenuAct, &QAction::triggered, [=](){
sysutil_send_system_cmd(m_sys_menu_opened ? 0x0132 /* CELL_SYSUTIL_SYSTEM_MENU_CLOSE */ : 0x0131 /* CELL_SYSUTIL_SYSTEM_MENU_OPEN */, 0);
m_sys_menu_opened = !m_sys_menu_opened;
- sysSendOpenMenuAct->setText(tr("Send &%0 system menu cmd").arg(m_sys_menu_opened ? tr("close") : tr("open")));
+ ui->sysSendOpenMenuAct->setText(tr("Send &%0 system menu cmd").arg(m_sys_menu_opened ? tr("close") : tr("open")));
});
- connect(sysSendExitAct, &QAction::triggered, [=](){
+ connect(ui->sysSendExitAct, &QAction::triggered, [=](){
sysutil_send_system_cmd(0x0101 /* CELL_SYSUTIL_REQUEST_EXITGAME */, 0);
});
- connect(confSettingsAct, &QAction::triggered, [=](){
+
+ auto openSettings = [=](int index)
+ {
settings_dialog dlg(guiSettings, m_Render_Creator, this);
connect(&dlg, &settings_dialog::GuiSettingsSaveRequest, this, &main_window::SaveWindowState);
connect(&dlg, &settings_dialog::GuiSettingsSyncRequest, [=]() {ConfigureGuiFromSettings(true); });
connect(&dlg, &settings_dialog::GuiStylesheetRequest, this, &main_window::RequestGlobalStylesheetChange);
+ dlg.SetActiveTab(index);
dlg.exec();
- });
- connect(confPadAct, &QAction::triggered, this, [=](){
+ };
+ connect(ui->confCPUAct, &QAction::triggered, [=]() { openSettings(0); });
+ connect(ui->confGPUAct, &QAction::triggered, [=]() { openSettings(1); });
+ connect(ui->confAudioAct, &QAction::triggered, [=]() { openSettings(2); });
+ connect(ui->confIOAct, &QAction::triggered, [=]() { openSettings(3); });
+ connect(ui->confSystemAct, &QAction::triggered, [=]() { openSettings(4); });
+
+ connect(ui->confPadAct, &QAction::triggered, this, [=](){
pad_settings_dialog dlg(this);
dlg.exec();
});
- connect(confAutopauseManagerAct, &QAction::triggered, [=](){
+ connect(ui->confAutopauseManagerAct, &QAction::triggered, [=](){
auto_pause_settings_dialog dlg(this);
dlg.exec();
});
- connect(confVFSDialogAct, &QAction::triggered, [=]() {
+ connect(ui->confVFSDialogAct, &QAction::triggered, [=]() {
vfs_dialog dlg(this);
dlg.exec();
gameListFrame->Refresh(true); // dev-hdd0 may have changed. Refresh just in case.
});
- connect(confSavedataManagerAct, &QAction::triggered, [=](){
+ connect(ui->confSavedataManagerAct, &QAction::triggered, [=](){
save_data_list_dialog* sdid = new save_data_list_dialog({}, 0, false, this);
sdid->show();
});
- connect(toolsCgDisasmAct, &QAction::triggered, [=](){
+ connect(ui->toolsCgDisasmAct, &QAction::triggered, [=](){
cg_disasm_window* cgdw = new cg_disasm_window(guiSettings, this);
cgdw->show();
});
- connect(toolskernel_explorerAct, &QAction::triggered, [=](){
+ connect(ui->toolskernel_explorerAct, &QAction::triggered, [=](){
kernel_explorer* kernelExplorer = new kernel_explorer(this);
kernelExplorer->show();
});
- connect(toolsmemory_viewerAct, &QAction::triggered, [=](){
+ connect(ui->toolsmemory_viewerAct, &QAction::triggered, [=](){
memory_viewer_panel* mvp = new memory_viewer_panel(this);
mvp->show();
});
- connect(toolsRsxDebuggerAct, &QAction::triggered, [=](){
+ connect(ui->toolsRsxDebuggerAct, &QAction::triggered, [=](){
rsx_debugger* rsx = new rsx_debugger(this);
rsx->show();
});
- connect(toolsStringSearchAct, &QAction::triggered, [=](){
+ connect(ui->toolsStringSearchAct, &QAction::triggered, [=](){
memory_string_searcher* mss = new memory_string_searcher(this);
mss->show();
});
- connect(toolsDecryptSprxLibsAct, &QAction::triggered, this, &main_window::DecryptSPRXLibraries);
- connect(showDebuggerAct, &QAction::triggered, [=](bool checked){
+ connect(ui->toolsDecryptSprxLibsAct, &QAction::triggered, this, &main_window::DecryptSPRXLibraries);
+ connect(ui->showDebuggerAct, &QAction::triggered, [=](bool checked){
checked ? debuggerFrame->show() : debuggerFrame->hide();
guiSettings->SetValue(GUI::mw_debugger, checked);
});
- connect(showLogAct, &QAction::triggered, [=](bool checked){
+ connect(ui->showLogAct, &QAction::triggered, [=](bool checked){
checked ? logFrame->show() : logFrame->hide();
guiSettings->SetValue(GUI::mw_logger, checked);
});
- connect(showGameListAct, &QAction::triggered, [=](bool checked){
+ connect(ui->showGameListAct, &QAction::triggered, [=](bool checked){
checked ? gameListFrame->show() : gameListFrame->hide();
guiSettings->SetValue(GUI::mw_gamelist, checked);
});
- connect(showControlsAct, &QAction::triggered, this, [=](bool checked){
- checked ? controls->show() : controls->hide();
- guiSettings->SetValue(GUI::mw_controls, checked);
+ connect(ui->showToolBarAct, &QAction::triggered, [=](bool checked) {
+ ui->toolBar->setVisible(checked);
+ guiSettings->SetValue(GUI::mw_toolBarVisible, checked);
});
- connect(showGameListToolBarAct, &QAction::triggered, this, [=](bool checked){
+ connect(ui->showGameToolBarAct, &QAction::triggered, [=](bool checked) {
gameListFrame->SetToolBarVisible(checked);
});
- connect(refreshGameListAct, &QAction::triggered, [=](){
+ connect(ui->refreshGameListAct, &QAction::triggered, [=](){
gameListFrame->Refresh(true);
});
connect(categoryVisibleActGroup, &QActionGroup::triggered, [=](QAction* act)
@@ -1216,46 +1047,41 @@ void main_window::CreateConnects()
int id;
const bool& checked = act->isChecked();
- if (act == showCatHDDGameAct) categories += category::non_disc_games, id = Category::Non_Disc_Game;
- else if (act == showCatDiscGameAct) categories += category::disc_Game, id = Category::Disc_Game;
- else if (act == showCatHomeAct) categories += category::home, id = Category::Home;
- else if (act == showCatAudioVideoAct) categories += category::media, id = Category::Media;
- else if (act == showCatGameDataAct) categories += category::data, id = Category::Data;
- else if (act == showCatUnknownAct) categories += category::unknown, id = Category::Unknown_Cat;
- else if (act == showCatOtherAct) categories += category::others, id = Category::Others;
+ if (act == ui->showCatHDDGameAct) categories += category::non_disc_games, id = Category::Non_Disc_Game;
+ else if (act == ui->showCatDiscGameAct) categories += category::disc_Game, id = Category::Disc_Game;
+ else if (act == ui->showCatHomeAct) categories += category::home, id = Category::Home;
+ else if (act == ui->showCatAudioVideoAct) categories += category::media, id = Category::Media;
+ else if (act == ui->showCatGameDataAct) categories += category::data, id = Category::Data;
+ else if (act == ui->showCatUnknownAct) categories += category::unknown, id = Category::Unknown_Cat;
+ else if (act == ui->showCatOtherAct) categories += category::others, id = Category::Others;
else LOG_WARNING(GENERAL, "categoryVisibleActGroup: category action not found");
gameListFrame->SetCategoryActIcon(categoryVisibleActGroup->actions().indexOf(act), checked);
gameListFrame->ToggleCategoryFilter(categories, checked);
guiSettings->SetCategoryVisibility(id, checked);
});
- connect(aboutAct, &QAction::triggered, this, &main_window::About);
- connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
- connect(menu_run, &QAbstractButton::clicked, Pause);
- connect(menu_stop, &QAbstractButton::clicked, [=]() { Emu.Stop(); });
- connect(menu_restart, &QAbstractButton::clicked, [=]() { Emu.Stop(); Emu.Load(); });
- connect(menu_capture_frame, &QAbstractButton::clicked, [=](){
- user_asked_for_frame_capture = true;
+ connect(ui->aboutAct, &QAction::triggered, [this]() {
+ about_dialog dlg(this);
+ dlg.exec();
});
+ connect(ui->aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
+ auto resizeIcons = [=](const int& index){
+ if (ui->sizeSlider->value() != index)
+ {
+ ui->sizeSlider->setSliderPosition(index);
+ }
+ gameListFrame->ResizeIcons(GUI::gl_icon_size.at(index).first, GUI::gl_icon_size.at(index).second, index);
+ };
connect(iconSizeActGroup, &QActionGroup::triggered, [=](QAction* act)
{
- QString key;
+ int index;
- if (act == setIconSizeLargeAct) key = GUI::gl_icon_key_large;
- else if (act == setIconSizeMediumAct) key = GUI::gl_icon_key_medium;
- else if (act == setIconSizeSmallAct) key = GUI::gl_icon_key_small;
- else key = GUI::gl_icon_key_tiny;
+ if (act == ui->setIconSizeTinyAct) index = 0;
+ else if (act == ui->setIconSizeSmallAct) index = 1;
+ else if (act == ui->setIconSizeMediumAct) index = 2;
+ else index = 3;
- guiSettings->SetValue(GUI::gl_iconSize, key);
-
- for (int i = 0; i < GUI::gl_icon_size.count(); i++)
- {
- if (GUI::gl_icon_size.at(i).first == key)
- {
- gameListFrame->ResizeIcons(GUI::gl_icon_size.at(i).second, i);
- break;
- }
- }
+ resizeIcons(index);
});
connect (gameListFrame, &game_list_frame::RequestIconSizeActSet, [=](const int& idx)
{
@@ -1263,7 +1089,7 @@ void main_window::CreateConnects()
});
connect(gameListFrame, &game_list_frame::RequestListModeActSet, [=](const bool& isList)
{
- isList ? setlistModeListAct->trigger() : setlistModeGridAct->trigger();
+ isList ? ui->setlistModeListAct->trigger() : ui->setlistModeGridAct->trigger();
});
connect(gameListFrame, &game_list_frame::RequestCategoryActSet, [=](const int& id)
{
@@ -1271,131 +1097,78 @@ void main_window::CreateConnects()
});
connect(listModeActGroup, &QActionGroup::triggered, [=](QAction* act)
{
- bool isList = act == setlistModeListAct;
+ bool isList = act == ui->setlistModeListAct;
gameListFrame->SetListMode(isList);
categoryVisibleActGroup->setEnabled(isList);
});
-}
-
-void main_window::CreateMenus()
-{
- QMenu *bootMenu = menuBar()->addMenu(tr("&Boot"));
- bootMenu->addAction(bootElfAct);
- bootMenu->addAction(bootGameAct);
-
- m_bootRecentMenu = bootMenu->addMenu(tr("Boot Recent"));
- m_bootRecentMenu->setToolTipsVisible(true);
- m_bootRecentMenu->addAction(clearRecentAct);
- m_bootRecentMenu->addAction(freezeRecentAct);
- m_bootRecentMenu->addSeparator();
-
- bootMenu->addSeparator();
- bootMenu->addAction(bootInstallPkgAct);
- bootMenu->addAction(bootInstallPupAct);
- bootMenu->addSeparator();
- bootMenu->addAction(exitAct);
-
- QMenu *sysMenu = menuBar()->addMenu(tr("&System"));
- sysMenu->addAction(sysPauseAct);
- sysMenu->addAction(sysStopAct);
- sysMenu->addSeparator();
- sysMenu->addAction(sysSendOpenMenuAct);
- sysMenu->addAction(sysSendExitAct);
-
- QMenu *confMenu = menuBar()->addMenu(tr("&Config"));
- confMenu->addAction(confSettingsAct);
- confMenu->addAction(confPadAct);
- confMenu->addSeparator();
- confMenu->addAction(confAutopauseManagerAct);
- confMenu->addAction(confVFSDialogAct);
- confMenu->addSeparator();
- confMenu->addAction(confSavedataManagerAct);
-
- QMenu *toolsMenu = menuBar()->addMenu(tr("&Utilities"));
- toolsMenu->addAction(toolsCgDisasmAct);
- toolsMenu->addAction(toolskernel_explorerAct);
- toolsMenu->addAction(toolsmemory_viewerAct);
- toolsMenu->addAction(toolsRsxDebuggerAct);
- toolsMenu->addAction(toolsStringSearchAct);
- toolsMenu->addAction(toolsDecryptSprxLibsAct);
-
- QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
- viewMenu->addAction(showLogAct);
- viewMenu->addAction(showDebuggerAct);
- viewMenu->addAction(showControlsAct);
- viewMenu->addSeparator();
- viewMenu->addAction(showGameListAct);
- viewMenu->addAction(showGameListToolBarAct);
- viewMenu->addAction(refreshGameListAct);
-
- QMenu *categoryMenu = viewMenu->addMenu(tr("Show Categories"));
- categoryMenu->addActions(categoryVisibleActGroup->actions());
-
- QMenu *iconSizeMenu = viewMenu->addMenu(tr("Icon Size"));
- iconSizeMenu->addActions(iconSizeActGroup->actions());
-
- QMenu *listModeMenu = viewMenu->addMenu(tr("Game List Mode"));
- listModeMenu->addActions(listModeActGroup->actions());
-
- QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
- helpMenu->addAction(aboutAct);
- helpMenu->addAction(aboutQtAct);
-
- QHBoxLayout* controls_layout = new QHBoxLayout();
- menu_run = new QPushButton(tr("Start"));
- menu_stop = new QPushButton(tr("Stop"));
- menu_restart = new QPushButton(tr("Restart"));
- menu_capture_frame = new QPushButton(tr("Capture Frame"));
- menu_run->setEnabled(false);
- menu_stop->setEnabled(false);
- menu_restart->setEnabled(false);
- menu_run->setIcon(icon_play);
- menu_stop->setIcon(icon_stop);
- menu_restart->setIcon(icon_restart);
- controls_layout->addWidget(menu_run);
- controls_layout->addWidget(menu_stop);
- controls_layout->addWidget(menu_restart);
- controls_layout->addWidget(menu_capture_frame);
- controls_layout->addSpacing(5);
- controls_layout->setContentsMargins(0, 0, 0, 0);
- controls = new QWidget(this);
- controls->setLayout(controls_layout);
- menuBar()->setCornerWidget(controls, Qt::TopRightCorner);
+ connect(ui->toolBar, &QToolBar::visibilityChanged, [=](bool checked) {
+ ui->showToolBarAct->setChecked(checked);
+ guiSettings->SetValue(GUI::mw_toolBarVisible, checked);
+ });
+ connect(ui->toolbar_disc, &QAction::triggered, this, &main_window::BootGame);
+ connect(ui->toolbar_refresh, &QAction::triggered, [=]() { gameListFrame->Refresh(true); });
+ connect(ui->toolbar_stop, &QAction::triggered, [=]() { Emu.Stop(); });
+ connect(ui->toolbar_start, &QAction::triggered, Pause);
+ connect(ui->toolbar_snap, &QAction::triggered, [=]() { user_asked_for_frame_capture = true; });
+ connect(ui->toolbar_fullscreen, &QAction::triggered, [=]() {
+ if (isFullScreen())
+ {
+ showNormal();
+ ui->toolbar_fullscreen->setIcon(QIcon(":/Icons/fullscreen.png"));
+ }
+ else
+ {
+ showFullScreen();
+ ui->toolbar_fullscreen->setIcon(QIcon(":/Icons/fullscreen_invert.png"));
+ }
+ });
+ connect(ui->toolbar_controls, &QAction::triggered, [=]() { pad_settings_dialog dlg(this); dlg.exec(); });
+ connect(ui->toolbar_config, &QAction::triggered, [=]() { openSettings(0); });
+ connect(ui->toolbar_list, &QAction::triggered, [=]() { ui->setlistModeListAct->trigger(); });
+ connect(ui->toolbar_grid, &QAction::triggered, [=]() { ui->setlistModeGridAct->trigger(); });
+ //connect(ui->toolbar_sort, &QAction::triggered, gameListFrame, sort);
+ connect(ui->sizeSlider, &QSlider::valueChanged, resizeIcons);
+ connect(ui->searchBar, &QLineEdit::textChanged, gameListFrame, &game_list_frame::SetSearchText);
}
void main_window::CreateDockWindows()
{
- gameListFrame = new game_list_frame(guiSettings, m_Render_Creator, this);
+ // new mainwindow widget because existing seems to be bugged for now
+ m_mw = new QMainWindow();
+
+ gameListFrame = new game_list_frame(guiSettings, m_Render_Creator, m_mw);
gameListFrame->setObjectName("gamelist");
- debuggerFrame = new debugger_frame(this);
+ debuggerFrame = new debugger_frame(m_mw);
debuggerFrame->setObjectName("debugger");
- logFrame = new log_frame(guiSettings, this);
+ logFrame = new log_frame(guiSettings, m_mw);
logFrame->setObjectName("logger");
- addDockWidget(Qt::LeftDockWidgetArea, gameListFrame);
- addDockWidget(Qt::LeftDockWidgetArea, logFrame);
- addDockWidget(Qt::RightDockWidgetArea, debuggerFrame);
+ m_mw->addDockWidget(Qt::LeftDockWidgetArea, gameListFrame);
+ m_mw->addDockWidget(Qt::LeftDockWidgetArea, logFrame);
+ m_mw->addDockWidget(Qt::RightDockWidgetArea, debuggerFrame);
+ m_mw->setDockNestingEnabled(true);
+ setCentralWidget(m_mw);
connect(logFrame, &log_frame::log_frameClosed, [=]()
{
- if (showLogAct->isChecked())
+ if (ui->showLogAct->isChecked())
{
- showLogAct->setChecked(false);
+ ui->showLogAct->setChecked(false);
guiSettings->SetValue(GUI::mw_logger, false);
}
});
connect(debuggerFrame, &debugger_frame::DebugFrameClosed, [=](){
- if (showDebuggerAct->isChecked())
+ if (ui->showDebuggerAct->isChecked())
{
- showDebuggerAct->setChecked(false);
+ ui->showDebuggerAct->setChecked(false);
guiSettings->SetValue(GUI::mw_debugger, false);
}
});
connect(gameListFrame, &game_list_frame::game_list_frameClosed, [=]()
{
- if (showGameListAct->isChecked())
+ if (ui->showGameListAct->isChecked())
{
- showGameListAct->setChecked(false);
+ ui->showGameListAct->setChecked(false);
guiSettings->SetValue(GUI::mw_gamelist, false);
}
});
@@ -1420,14 +1193,15 @@ void main_window::ConfigureGuiFromSettings(bool configureAll)
}
restoreState(guiSettings->GetValue(GUI::mw_windowState).toByteArray());
+ m_mw->restoreState(guiSettings->GetValue(GUI::mw_mwState).toByteArray());
- freezeRecentAct->setChecked(guiSettings->GetValue(GUI::rg_freeze).toBool());
+ ui->freezeRecentAct->setChecked(guiSettings->GetValue(GUI::rg_freeze).toBool());
m_rg_entries = guiSettings->Var2List(guiSettings->GetValue(GUI::rg_entries));
// clear recent games menu of actions
for (auto act : m_recentGameActs)
{
- m_bootRecentMenu->removeAction(act);
+ ui->bootRecentMenu->removeAction(act);
}
m_recentGameActs.clear();
// Fill the recent games menu
@@ -1440,7 +1214,7 @@ void main_window::ConfigureGuiFromSettings(bool configureAll)
if (act)
{
m_recentGameActs.append(act);
- m_bootRecentMenu->addAction(act);
+ ui->bootRecentMenu->addAction(act);
}
else
{
@@ -1448,34 +1222,37 @@ void main_window::ConfigureGuiFromSettings(bool configureAll)
}
}
- showLogAct->setChecked(logFrame->isVisible() || guiSettings->GetValue(GUI::mw_logger).toBool());
- showGameListAct->setChecked(gameListFrame->isVisible() || guiSettings->GetValue(GUI::mw_gamelist).toBool());
- showDebuggerAct->setChecked(debuggerFrame->isVisible() || guiSettings->GetValue(GUI::mw_debugger).toBool());
- showControlsAct->setChecked(controls->isVisible() || guiSettings->GetValue(GUI::mw_controls).toBool());
- showGameListToolBarAct->setChecked(guiSettings->GetValue(GUI::gl_toolBarVisible).toBool());
- guiSettings->GetValue(GUI::mw_controls).toBool() ? controls->show() : controls->hide();
+ ui->showLogAct->setChecked(guiSettings->GetValue(GUI::mw_logger).toBool());
+ ui->showGameListAct->setChecked(guiSettings->GetValue(GUI::mw_gamelist).toBool());
+ ui->showDebuggerAct->setChecked(guiSettings->GetValue(GUI::mw_debugger).toBool());
+ ui->showToolBarAct->setChecked(guiSettings->GetValue(GUI::mw_toolBarVisible).toBool());
+ ui->showGameToolBarAct->setChecked(guiSettings->GetValue(GUI::gl_toolBarVisible).toBool());
- showCatHDDGameAct->setChecked(guiSettings->GetCategoryVisibility(Category::Non_Disc_Game));
- showCatDiscGameAct->setChecked(guiSettings->GetCategoryVisibility(Category::Disc_Game));
- showCatHomeAct->setChecked(guiSettings->GetCategoryVisibility(Category::Home));
- showCatAudioVideoAct->setChecked(guiSettings->GetCategoryVisibility(Category::Media));
- showCatGameDataAct->setChecked(guiSettings->GetCategoryVisibility(Category::Data));
- showCatUnknownAct->setChecked(guiSettings->GetCategoryVisibility(Category::Unknown_Cat));
- showCatOtherAct->setChecked(guiSettings->GetCategoryVisibility(Category::Others));
+ debuggerFrame->setVisible(ui->showDebuggerAct->isChecked());
+ logFrame->setVisible(ui->showLogAct->isChecked());
+ gameListFrame->setVisible(ui->showGameListAct->isChecked());
+ gameListFrame->SetToolBarVisible(ui->showGameToolBarAct->isChecked());
+ ui->toolBar->setVisible(ui->showToolBarAct->isChecked());
+
+ ui->showCatHDDGameAct->setChecked(guiSettings->GetCategoryVisibility(Category::Non_Disc_Game));
+ ui->showCatDiscGameAct->setChecked(guiSettings->GetCategoryVisibility(Category::Disc_Game));
+ ui->showCatHomeAct->setChecked(guiSettings->GetCategoryVisibility(Category::Home));
+ ui->showCatAudioVideoAct->setChecked(guiSettings->GetCategoryVisibility(Category::Media));
+ ui->showCatGameDataAct->setChecked(guiSettings->GetCategoryVisibility(Category::Data));
+ ui->showCatUnknownAct->setChecked(guiSettings->GetCategoryVisibility(Category::Unknown_Cat));
+ ui->showCatOtherAct->setChecked(guiSettings->GetCategoryVisibility(Category::Others));
QString key = guiSettings->GetValue(GUI::gl_iconSize).toString();
- if (key == GUI::gl_icon_key_large) setIconSizeLargeAct->setChecked(true);
- else if (key == GUI::gl_icon_key_medium) setIconSizeMediumAct->setChecked(true);
- else if (key == GUI::gl_icon_key_small) setIconSizeSmallAct->setChecked(true);
- else setIconSizeTinyAct->setChecked(true);
-
+ if (key == GUI::gl_icon_key_large) ui->setIconSizeLargeAct->setChecked(true);
+ else if (key == GUI::gl_icon_key_medium) ui->setIconSizeMediumAct->setChecked(true);
+ else if (key == GUI::gl_icon_key_small) ui->setIconSizeSmallAct->setChecked(true);
+ else ui->setIconSizeTinyAct->setChecked(true);
bool isListMode = guiSettings->GetValue(GUI::gl_listMode).toBool();
- if (isListMode) setlistModeListAct->setChecked(true);
- else setlistModeGridAct->setChecked(true);
+ if (isListMode) ui->setlistModeListAct->setChecked(true);
+ else ui->setlistModeGridAct->setChecked(true);
categoryVisibleActGroup->setEnabled(isListMode);
-
if (configureAll)
{
// Handle log settings
@@ -1488,7 +1265,12 @@ void main_window::ConfigureGuiFromSettings(bool configureAll)
void main_window::keyPressEvent(QKeyEvent *keyEvent)
{
- if (keyEvent->modifiers() == Qt::ControlModifier)
+ if ((keyEvent->modifiers() & Qt::AltModifier) && keyEvent->key() == Qt::Key_Return || isFullScreen() && keyEvent->key() == Qt::Key_Escape)
+ {
+ ui->toolbar_fullscreen->trigger();
+ }
+
+ if (keyEvent->modifiers() & Qt::ControlModifier)
{
switch (keyEvent->key())
{
@@ -1500,6 +1282,18 @@ void main_window::keyPressEvent(QKeyEvent *keyEvent)
}
}
+void main_window::mouseDoubleClickEvent(QMouseEvent *event)
+{
+ if (isFullScreen())
+ {
+ if (event->button() == Qt::LeftButton)
+ {
+ showNormal();
+ ui->toolbar_fullscreen->setIcon(QIcon(":/Icons/fullscreen.png"));
+ }
+ }
+}
+
/** Override the Qt close event to have the emulator stop and the application die. May add a warning dialog in future.
*/
void main_window::closeEvent(QCloseEvent* closeEvent)
@@ -1515,7 +1309,6 @@ void main_window::closeEvent(QCloseEvent* closeEvent)
setAttribute(Qt::WA_DeleteOnClose);
QMainWindow::close();
-
// It's possible to have other windows open, like games. So, force the application to die.
QApplication::quit();
}
diff --git a/rpcs3/rpcs3qt/main_window.h b/rpcs3/rpcs3qt/main_window.h
index b9ba1f0b5a..0715483ed6 100644
--- a/rpcs3/rpcs3qt/main_window.h
+++ b/rpcs3/rpcs3qt/main_window.h
@@ -18,28 +18,31 @@
#include
+namespace Ui {
+ class main_window;
+}
+
class main_window : public QMainWindow
{
Q_OBJECT
+ Ui::main_window *ui;
+
bool m_sys_menu_opened;
Render_Creator m_Render_Creator;
- QWidget* controls;
-
QIcon appIcon;
QIcon icon_play;
QIcon icon_pause;
QIcon icon_stop;
QIcon icon_restart;
- QPushButton* menu_run;
- QPushButton* menu_stop;
- QPushButton* menu_restart;
- QPushButton* menu_capture_frame;
-
#ifdef _WIN32
+ QIcon icon_thumb_play;
+ QIcon icon_thumb_pause;
+ QIcon icon_thumb_stop;
+ QIcon icon_thumb_restart;
QWinThumbnailToolBar *thumb_bar;
QWinThumbnailToolButton *thumb_playPause;
QWinThumbnailToolButton *thumb_stop;
@@ -72,7 +75,6 @@ private Q_SLOTS:
void InstallPkg();
void InstallPup();
void DecryptSPRXLibraries();
- void About();
void SaveWindowState();
@@ -82,69 +84,25 @@ protected:
private:
void CreateActions();
void CreateConnects();
- void CreateMenus();
void CreateDockWindows();
void ConfigureGuiFromSettings(bool configureAll = false);
void EnableMenus(bool enabled);
void keyPressEvent(QKeyEvent *keyEvent);
+ void mouseDoubleClickEvent(QMouseEvent *event);
QAction* CreateRecentAction(const q_string_pair& entry, const uint& sc_idx);
void BootRecentAction(const QAction* act);
void AddRecentAction(const q_string_pair& entry);
q_pair_list m_rg_entries;
- QMenu* m_bootRecentMenu;
QList m_recentGameActs;
QActionGroup* iconSizeActGroup;
QActionGroup* listModeActGroup;
QActionGroup* categoryVisibleActGroup;
- QAction *bootElfAct;
- QAction *bootGameAct;
- QAction *clearRecentAct;
- QAction *freezeRecentAct;
- QAction *bootInstallPkgAct;
- QAction *bootInstallPupAct;
- QAction *sysPauseAct;
- QAction *sysStopAct;
- QAction *sysSendOpenMenuAct;
- QAction *sysSendExitAct;
- QAction *confSettingsAct;
- QAction *confPadAct;
- QAction *confAutopauseManagerAct;
- QAction *confVFSDialogAct;
- QAction *confSavedataManagerAct;
- QAction *toolsCgDisasmAct;
- QAction *toolskernel_explorerAct;
- QAction *toolsmemory_viewerAct;
- QAction *toolsRsxDebuggerAct;
- QAction *toolsStringSearchAct;
- QAction *toolsDecryptSprxLibsAct;
- QAction *exitAct;
- QAction *showDebuggerAct;
- QAction *showLogAct;
- QAction *showGameListAct;
- QAction *showControlsAct;
- QAction *refreshGameListAct;
- QAction *showGameListToolBarAct;
- QAction* showCatHDDGameAct;
- QAction* showCatDiscGameAct;
- QAction* showCatHomeAct;
- QAction* showCatAudioVideoAct;
- QAction* showCatGameDataAct;
- QAction* showCatUnknownAct;
- QAction* showCatOtherAct;
- QAction* setIconSizeTinyAct;
- QAction* setIconSizeSmallAct;
- QAction* setIconSizeMediumAct;
- QAction* setIconSizeLargeAct;
- QAction* setlistModeListAct;
- QAction* setlistModeGridAct;
- QAction *aboutAct;
- QAction *aboutQtAct;
-
// Dockable widget frames
+ QMainWindow *m_mw;
log_frame *logFrame;
debugger_frame *debuggerFrame;
game_list_frame *gameListFrame;
diff --git a/rpcs3/rpcs3qt/main_window.ui b/rpcs3/rpcs3qt/main_window.ui
new file mode 100644
index 0000000000..c2726877e4
--- /dev/null
+++ b/rpcs3/rpcs3qt/main_window.ui
@@ -0,0 +1,945 @@
+
+
+ main_window
+
+
+
+ 0
+ 0
+ 1058
+ 580
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 4
+ 0
+
+
+
+ RPCS3
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks|QMainWindow::GroupedDragging
+
+
+
+
+ 0
+ 0
+
+
+
+
+
+ 480
+ 10
+ 251
+ 31
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 10
+ 75
+ true
+
+
+
+ Qt::ClickFocus
+
+
+ false
+
+
+ Search apps ...
+
+
+ false
+
+
+
+
+
+ 300
+ 10
+ 160
+ 31
+
+
+
+
+ 0
+ 0
+
+
+
+ Qt::ClickFocus
+
+
+ QSlider::groove:horizontal {
+ border: 0px solid #999999;
+ height: 20px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
+ background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #c4c4c4);
+ margin: 2px 0;
+}
+
+QSlider::handle:horizontal {
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
+ border: 0px solid #5c5c5c;
+ width: 15px;
+ margin: -5px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
+ border-radius: 3px;
+}
+
+
+ Qt::Horizontal
+
+
+ QSlider::NoTicks
+
+
+
+
+
+
+ Qt::PreventContextMenu
+
+
+ Show tool bar
+
+
+ background-color: rgb(227, 227, 227);
+selection-background-color: rgb(85, 170, 255);
+
+
+ false
+
+
+ Qt::TopToolBarArea
+
+
+
+ 30
+ 30
+
+
+
+ Qt::ToolButtonIconOnly
+
+
+ false
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Boot SELF/ELF
+
+
+
+
+ Boot Game
+
+
+
+
+ Install .pkg
+
+
+ Install application from pkg file
+
+
+
+
+ Install .pup
+
+
+ Install firmware from PS3UPDAT.PUP
+
+
+
+
+ false
+
+
+
+ :/Icons/pause.png:/Icons/pause.png
+
+
+ Pause
+
+
+ Start Emulation
+
+
+
+
+ false
+
+
+
+ :/Icons/stop.png:/Icons/stop.png
+
+
+ Stop
+
+
+ Stop Emulation
+
+
+
+
+ false
+
+
+ Send Open System Menu CMD
+
+
+
+
+ false
+
+
+ Send Exit CMD
+
+
+
+
+ CPU
+
+
+ Configure CPU
+
+
+
+
+ Graphics
+
+
+ Configure Graphics
+
+
+
+
+ Controls
+
+
+ Configure Controls
+
+
+
+
+ Audio
+
+
+ Configure Audio
+
+
+
+
+ Input/Output
+
+
+ Configure Input/Output
+
+
+
+
+ System
+
+
+ Configure System
+
+
+
+
+ false
+
+
+ Auto Pause
+
+
+ Configure Auto Pause
+
+
+
+
+ Exit
+
+
+ Exit RPCS3
+
+
+ Exit the application
+
+
+
+
+ false
+
+
+ Save Data
+
+
+ Manage Save Data
+
+
+
+
+ false
+
+
+ Trophies
+
+
+ Manage Trophies
+
+
+
+
+ false
+
+
+ User Accounts
+
+
+ Manage User Accounts
+
+
+
+
+ false
+
+
+ Manage .yml Patches
+
+
+
+
+ Cg Disasm
+
+
+
+
+ false
+
+
+ Kernel Explorer
+
+
+
+
+ false
+
+
+ Memory Viewer
+
+
+
+
+ false
+
+
+ RSX Debugger
+
+
+
+
+ false
+
+
+ String Search
+
+
+
+
+ Decrypt .sprx Libraries
+
+
+
+
+ true
+
+
+ Show Debugger
+
+
+
+
+ true
+
+
+ Show Log/TTY
+
+
+
+
+ About RPCS3
+
+
+
+
+ About Qt
+
+
+
+
+ Show Controls
+
+
+
+
+ true
+
+
+ Show Game List
+
+
+
+
+ true
+
+
+ Show Tool Bar
+
+
+
+
+ Game List Refresh
+
+
+
+
+ Game List Categories
+
+
+
+
+ false
+
+
+ RAP Files
+
+
+
+
+ false
+
+
+ Check for Updates
+
+
+
+
+ Virtual File System
+
+
+
+
+ List Clear
+
+
+
+
+ true
+
+
+ List Freeze
+
+
+
+
+ true
+
+
+ Tiny
+
+
+
+
+ true
+
+
+ true
+
+
+ Small
+
+
+
+
+ true
+
+
+ Medium
+
+
+
+
+ true
+
+
+ Large
+
+
+
+
+ true
+
+
+ true
+
+
+ List View
+
+
+
+
+ true
+
+
+ Grid View
+
+
+
+
+ false
+
+
+
+ :/Icons/restart.png:/Icons/restart.png
+
+
+ Restart
+
+
+
+
+ Pause
+
+
+
+
+ Save State
+
+
+
+
+ true
+
+
+ true
+
+
+ HDD Games
+
+
+
+
+ true
+
+
+ true
+
+
+ Disc Games
+
+
+
+
+ true
+
+
+ true
+
+
+ Home
+
+
+
+
+ true
+
+
+ true
+
+
+ Audio/Video
+
+
+
+
+ true
+
+
+ true
+
+
+ Game Data
+
+
+
+
+ true
+
+
+ true
+
+
+ Unknown
+
+
+
+
+ Capture Frame
+
+
+ Capture frame
+
+
+
+
+
+ :/Icons/pause.png:/Icons/pause.png
+
+
+ start
+
+
+ Pause emulation
+
+
+
+
+
+ :/Icons/stop.png:/Icons/stop.png
+
+
+ stop
+
+
+ Stop emulation
+
+
+
+
+
+ :/Icons/configure.png:/Icons/configure.png
+
+
+ config
+
+
+ Configuration
+
+
+
+
+
+ :/Icons/controls.png:/Icons/controls.png
+
+
+ controls
+
+
+ Configure controls
+
+
+
+
+
+ :/Icons/screenshot.png:/Icons/screenshot.png
+
+
+ snap
+
+
+ Capture frame
+
+
+
+
+
+ :/Icons/fullscreen.png:/Icons/fullscreen.png
+
+
+ fullscreen
+
+
+ Toggle fullscreen
+
+
+
+
+
+ :/Icons/list.png:/Icons/list.png
+
+
+ list
+
+
+ Switch to list mode
+
+
+
+
+
+ :/Icons/grid.png:/Icons/grid.png
+
+
+ grid
+
+
+ Switch to grid mode
+
+
+
+
+
+ :/Icons/sort.png:/Icons/sort.png
+
+
+ sort
+
+
+ Sort options
+
+
+
+
+
+ :/Icons/refresh.png:/Icons/refresh.png
+
+
+ refresh
+
+
+ Refresh gamelist
+
+
+
+
+
+ :/Icons/disc.png:/Icons/disc.png
+
+
+ disc
+
+
+ Boot game
+
+
+
+
+ true
+
+
+ true
+
+
+ Other
+
+
+
+
+ true
+
+
+ Show Game Tool Bar
+
+
+
+
+
+
+
+
+
+
diff --git a/rpcs3/rpcs3qt/misc_tab.cpp b/rpcs3/rpcs3qt/misc_tab.cpp
deleted file mode 100644
index 63f00bbc75..0000000000
--- a/rpcs3/rpcs3qt/misc_tab.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "misc_tab.h"
-#include "main_window.h"
-
-misc_tab::misc_tab(std::shared_ptr xemu_settings, QWidget *parent) : QWidget(parent)
-{
- // Left Widgets
- QCheckBox *exitOnStop = xemu_settings->CreateEnhancedCheckBox(emu_settings::ExitRPCS3OnFinish, this);
- QCheckBox *alwaysStart = xemu_settings->CreateEnhancedCheckBox(emu_settings::StartOnBoot, this);
- QCheckBox *startGameFullscreen = xemu_settings->CreateEnhancedCheckBox(emu_settings::StartGameFullscreen, this);
- QCheckBox *showFPSInTitle = xemu_settings->CreateEnhancedCheckBox(emu_settings::ShowFPSInTitle, this);
-
- // Left layout
- QVBoxLayout *vbox_left = new QVBoxLayout;
- vbox_left->addWidget(exitOnStop);
- vbox_left->addWidget(alwaysStart);
- vbox_left->addWidget(startGameFullscreen);
- vbox_left->addWidget(showFPSInTitle);
- vbox_left->addStretch(1);
-
- // Main Layout
- QHBoxLayout *hbox = new QHBoxLayout;
- hbox->addLayout(vbox_left);
- setLayout(hbox);
-}
diff --git a/rpcs3/rpcs3qt/misc_tab.h b/rpcs3/rpcs3qt/misc_tab.h
deleted file mode 100644
index bf50049d2c..0000000000
--- a/rpcs3/rpcs3qt/misc_tab.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-
-#include "emu_settings.h"
-
-#include
-
-#include
-
-class misc_tab : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit misc_tab(std::shared_ptr xemu_settings, QWidget *parent = 0);
-};
diff --git a/rpcs3/rpcs3qt/networking_tab.cpp b/rpcs3/rpcs3qt/networking_tab.cpp
deleted file mode 100644
index bf8e7fe264..0000000000
--- a/rpcs3/rpcs3qt/networking_tab.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include
-#include
-#include
-#include
-
-#include "networking_tab.h"
-
-networking_tab::networking_tab(std::shared_ptr xemu_settings, QWidget *parent) : QWidget(parent)
-{
- // Connection status
- QGroupBox *netStatus = new QGroupBox(tr("Connection status"));
-
- QComboBox *netStatusBox = xemu_settings->CreateEnhancedComboBox(emu_settings::ConnectionStatus, this);
-
- QVBoxLayout *netStatusVbox = new QVBoxLayout;
- netStatusVbox->addWidget(netStatusBox);
- netStatus->setLayout(netStatusVbox);
-
- // Main layout
- QVBoxLayout *vbox = new QVBoxLayout;
- vbox->addWidget(netStatus);
- vbox->addStretch();
-
- QHBoxLayout *hbox = new QHBoxLayout;
- hbox->addLayout(vbox);
- hbox->addStretch();
- setLayout(hbox);
-}
diff --git a/rpcs3/rpcs3qt/networking_tab.h b/rpcs3/rpcs3qt/networking_tab.h
deleted file mode 100644
index eca6f3be63..0000000000
--- a/rpcs3/rpcs3qt/networking_tab.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-
-#include "emu_settings.h"
-
-#include
-
-#include
-
-class networking_tab : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit networking_tab(std::shared_ptr xemu_settings, QWidget *parent = 0);
-};
diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.cpp b/rpcs3/rpcs3qt/pad_settings_dialog.cpp
index 5da4c630bf..38f1dae108 100644
--- a/rpcs3/rpcs3qt/pad_settings_dialog.cpp
+++ b/rpcs3/rpcs3qt/pad_settings_dialog.cpp
@@ -9,6 +9,7 @@
#include "stdafx.h"
#include "pad_settings_dialog.h"
+#include "ui_pad_settings_dialog.h"
// TODO: rewrite with std::chrono or QTimer
#include
@@ -17,278 +18,61 @@ static const int PadButtonWidth = 60;
extern keyboard_pad_config g_kbpad_config;
-pad_settings_dialog::pad_settings_dialog(QWidget *parent) : QDialog(parent)
+pad_settings_dialog::pad_settings_dialog(QWidget *parent) : QDialog(parent), ui(new Ui::pad_settings_dialog)
{
- // Left Analog Stick
- QGroupBox *roundStickL = new QGroupBox(tr("Left Analog Stick"));
- QVBoxLayout *roundStickLMainVBox = new QVBoxLayout;
- QVBoxLayout *roundStickLVBox = new QVBoxLayout;
- QHBoxLayout *roundStickLHBox1 = new QHBoxLayout;
- QHBoxLayout *roundStickLHBox2 = new QHBoxLayout;
- QHBoxLayout *roundStickLHBox3 = new QHBoxLayout;
- b_up_lstick = new QPushButton(tr("W"));
- b_left_lstick = new QPushButton(tr("A"));
- b_right_lstick = new QPushButton(tr("D"));
- b_down_lstick = new QPushButton(tr("S"));
- roundStickLHBox1->addWidget(b_up_lstick);
- roundStickLHBox2->addWidget(b_left_lstick);
- roundStickLHBox2->addWidget(b_right_lstick);
- roundStickLHBox3->addWidget(b_down_lstick);
- roundStickLVBox->addLayout(roundStickLHBox1);
- roundStickLVBox->addLayout(roundStickLHBox2);
- roundStickLVBox->addLayout(roundStickLHBox3);
- roundStickL->setLayout(roundStickLVBox);
- roundStickLMainVBox->addWidget(roundStickL);
- roundStickLMainVBox->addStretch();
- b_up_lstick->setFixedWidth(PadButtonWidth);
- b_left_lstick->setFixedWidth(PadButtonWidth);
- b_right_lstick->setFixedWidth(PadButtonWidth);
- b_down_lstick->setFixedWidth(PadButtonWidth);
+ ui->setupUi(this);
- // D-Pad
- QGroupBox *roundPadControls = new QGroupBox(tr("D-Pad"));
- QVBoxLayout *roundPadControlsMainVBox = new QVBoxLayout;
- QVBoxLayout *roundPadControlsVBox = new QVBoxLayout;
- QHBoxLayout *roundPadControlsHBox1 = new QHBoxLayout;
- QHBoxLayout *roundPadControlsHBox2 = new QHBoxLayout;
- QHBoxLayout *roundPadControlsHBox3 = new QHBoxLayout;
- b_up = new QPushButton(tr("Up"));
- b_left = new QPushButton(tr("Left"));
- b_right = new QPushButton(tr("Right"));
- b_down = new QPushButton(tr("Down"));
- roundPadControlsHBox1->addWidget(b_up);
- roundPadControlsHBox2->addWidget(b_left);
- roundPadControlsHBox2->addWidget(b_right);
- roundPadControlsHBox3->addWidget(b_down);
- roundPadControlsVBox->addLayout(roundPadControlsHBox1);
- roundPadControlsVBox->addLayout(roundPadControlsHBox2);
- roundPadControlsVBox->addLayout(roundPadControlsHBox3);
- roundPadControls->setLayout(roundPadControlsVBox);
- roundPadControlsMainVBox->addWidget(roundPadControls);
- roundPadControlsMainVBox->addStretch();
- b_up->setFixedWidth(PadButtonWidth);
- b_left->setFixedWidth(PadButtonWidth);
- b_right->setFixedWidth(PadButtonWidth);
- b_down->setFixedWidth(PadButtonWidth);
-
- // Left Shifts
- QGroupBox *roundPadShiftsL = new QGroupBox(tr("Left Shifts"));
- QGroupBox *roundPadL1 = new QGroupBox(tr("L1"));
- QGroupBox *roundPadL2 = new QGroupBox(tr("L2"));
- QGroupBox *roundPadL3 = new QGroupBox(tr("L3"));
- QVBoxLayout *roundPadShiftsLVbox = new QVBoxLayout;
- QVBoxLayout *roundPadL1Vbox = new QVBoxLayout;
- QVBoxLayout *roundPadL2Vbox = new QVBoxLayout;
- QVBoxLayout *roundPadL3Vbox = new QVBoxLayout;
- b_shift_l1 = new QPushButton(tr("Q"));
- b_shift_l2 = new QPushButton(tr("R"));
- b_shift_l3 = new QPushButton(tr("F"));
- roundPadL1Vbox->addWidget(b_shift_l1);
- roundPadL2Vbox->addWidget(b_shift_l2);
- roundPadL3Vbox->addWidget(b_shift_l3);
- roundPadL1->setLayout(roundPadL1Vbox);
- roundPadL2->setLayout(roundPadL2Vbox);
- roundPadL3->setLayout(roundPadL3Vbox);
- roundPadShiftsLVbox->addWidget(roundPadL1);
- roundPadShiftsLVbox->addWidget(roundPadL2);
- roundPadShiftsLVbox->addWidget(roundPadL3);
- roundPadShiftsL->setLayout(roundPadShiftsLVbox);
- b_shift_l1->setFixedWidth(PadButtonWidth);
- b_shift_l2->setFixedWidth(PadButtonWidth);
- b_shift_l3->setFixedWidth(PadButtonWidth);
-
- // Start / Select
- QGroupBox *roundPadSystem = new QGroupBox(tr("System"));
- QGroupBox *roundPadSelect = new QGroupBox(tr("Select"));
- QGroupBox *roundPadStart = new QGroupBox(tr("Start"));
- QVBoxLayout *roundPadSystemMainVbox = new QVBoxLayout;
- QVBoxLayout *roundPadSystemVbox = new QVBoxLayout;
- QVBoxLayout *roundPadSelectVbox = new QVBoxLayout;
- QVBoxLayout *roundPadStartVbox = new QVBoxLayout;
- b_select = new QPushButton(tr("Space"));
- b_start = new QPushButton(tr("Enter"));
- roundPadSelectVbox->addWidget(b_select);
- roundPadStartVbox->addWidget(b_start);
- roundPadSelect->setLayout(roundPadSelectVbox);
- roundPadStart->setLayout(roundPadStartVbox);
- roundPadSystemVbox->addWidget(roundPadSelect);
- roundPadSystemVbox->addWidget(roundPadStart);
- roundPadSystem->setLayout(roundPadSystemVbox);
- roundPadSystemMainVbox->addWidget(roundPadSystem);
- roundPadSystemMainVbox->addStretch();
- b_select->setFixedWidth(PadButtonWidth);
- b_start->setFixedWidth(PadButtonWidth);
-
- // Right Shifts
- QGroupBox *roundPadShiftsR = new QGroupBox(tr("Right Shifts"));
- QGroupBox *roundPadR1 = new QGroupBox(tr("R1"));
- QGroupBox *roundPadR2 = new QGroupBox(tr("R2"));
- QGroupBox *roundPadR3 = new QGroupBox(tr("R3"));
- QVBoxLayout *roundPadShiftsRVbox = new QVBoxLayout;
- QVBoxLayout *roundPadR1Vbox = new QVBoxLayout;
- QVBoxLayout *roundPadR2Vbox = new QVBoxLayout;
- QVBoxLayout *roundPadR3Vbox = new QVBoxLayout;
- b_shift_r1 = new QPushButton(tr("E"));
- b_shift_r2 = new QPushButton(tr("T"));
- b_shift_r3 = new QPushButton(tr("G"));
- roundPadR1Vbox->addWidget(b_shift_r1);
- roundPadR2Vbox->addWidget(b_shift_r2);
- roundPadR3Vbox->addWidget(b_shift_r3);
- roundPadR1->setLayout(roundPadR1Vbox);
- roundPadR2->setLayout(roundPadR2Vbox);
- roundPadR3->setLayout(roundPadR3Vbox);
- roundPadShiftsRVbox->addWidget(roundPadR1);
- roundPadShiftsRVbox->addWidget(roundPadR2);
- roundPadShiftsRVbox->addWidget(roundPadR3);
- roundPadShiftsR->setLayout(roundPadShiftsRVbox);
- b_shift_r1->setFixedWidth(PadButtonWidth);
- b_shift_r2->setFixedWidth(PadButtonWidth);
- b_shift_r3->setFixedWidth(PadButtonWidth);
-
- // Action buttons
- QGroupBox *roundpad_buttons = new QGroupBox(tr("Buttons"));
- QGroupBox *roundPadSquare = new QGroupBox(tr("Square"));
- QGroupBox *roundPadCross = new QGroupBox(tr("Cross"));
- QGroupBox *roundPadCircle = new QGroupBox(tr("Circle"));
- QGroupBox *roundPadTriangle = new QGroupBox(tr("Triangle"));
- QVBoxLayout *roundpad_buttonsVBox = new QVBoxLayout;
- QHBoxLayout *roundpad_buttonsHBox1 = new QHBoxLayout;
- QHBoxLayout *roundpad_buttonsHBox2 = new QHBoxLayout;
- QHBoxLayout *roundpad_buttonsHBox3 = new QHBoxLayout;
- QHBoxLayout *roundpad_buttonsHBox21 = new QHBoxLayout;
- QHBoxLayout *roundpad_buttonsHBox22 = new QHBoxLayout;
- QHBoxLayout *roundpad_buttonsHBox23 = new QHBoxLayout;
- QHBoxLayout *roundpad_buttonsHBox24 = new QHBoxLayout;
- b_triangle = new QPushButton(tr("V"));
- b_square = new QPushButton(tr("Z"));
- b_circle = new QPushButton(tr("C"));
- b_cross = new QPushButton(tr("X"));
- roundpad_buttonsHBox21->addWidget(b_triangle);
- roundpad_buttonsHBox22->addWidget(b_square);
- roundpad_buttonsHBox23->addWidget(b_circle);
- roundpad_buttonsHBox24->addWidget(b_cross);
- roundPadTriangle->setLayout(roundpad_buttonsHBox21);
- roundPadSquare->setLayout(roundpad_buttonsHBox22);
- roundPadCircle->setLayout(roundpad_buttonsHBox23);
- roundPadCross->setLayout(roundpad_buttonsHBox24);
- roundpad_buttonsHBox1->addStretch();
- roundpad_buttonsHBox1->addWidget(roundPadTriangle);
- roundpad_buttonsHBox1->addStretch();
- roundpad_buttonsHBox2->addWidget(roundPadSquare);
- roundpad_buttonsHBox2->addWidget(roundPadCircle);
- roundpad_buttonsHBox3->addStretch();
- roundpad_buttonsHBox3->addWidget(roundPadCross);
- roundpad_buttonsHBox3->addStretch();
- roundpad_buttonsVBox->addLayout(roundpad_buttonsHBox1);
- roundpad_buttonsVBox->addLayout(roundpad_buttonsHBox2);
- roundpad_buttonsVBox->addLayout(roundpad_buttonsHBox3);
- roundpad_buttons->setLayout(roundpad_buttonsVBox);
- b_triangle->setFixedWidth(PadButtonWidth);
- b_square->setFixedWidth(PadButtonWidth);
- b_circle->setFixedWidth(PadButtonWidth);
- b_cross->setFixedWidth(PadButtonWidth);
-
- // Right Analog Stick
- QGroupBox *roundStickR = new QGroupBox(tr("Right Analog Stick"));
- QVBoxLayout *roundStickRMainVBox = new QVBoxLayout;
- QVBoxLayout *roundStickRVBox = new QVBoxLayout;
- QHBoxLayout *roundStickRHBox1 = new QHBoxLayout;
- QHBoxLayout *roundStickRHBox2 = new QHBoxLayout;
- QHBoxLayout *roundStickRHBox3 = new QHBoxLayout;
- b_up_rstick = new QPushButton(tr("PgUp"));
- b_left_rstick = new QPushButton(tr("Home"));
- b_right_rstick = new QPushButton(tr("End"));
- b_down_rstick = new QPushButton(tr("PgDown"));
- roundStickRHBox1->addWidget(b_up_rstick);
- roundStickRHBox2->addWidget(b_left_rstick);
- roundStickRHBox2->addWidget(b_right_rstick);
- roundStickRHBox3->addWidget(b_down_rstick);
- roundStickRVBox->addLayout(roundStickRHBox1);
- roundStickRVBox->addLayout(roundStickRHBox2);
- roundStickRVBox->addLayout(roundStickRHBox3);
- roundStickR->setLayout(roundStickRVBox);
- roundStickRMainVBox->addWidget(roundStickR);
- roundStickRMainVBox->addStretch();
- b_up_rstick->setFixedWidth(PadButtonWidth);
- b_left_rstick->setFixedWidth(PadButtonWidth);
- b_right_rstick->setFixedWidth(PadButtonWidth);
- b_down_rstick->setFixedWidth(PadButtonWidth);
-
- // Buttons
- b_reset = new QPushButton(tr("By default"));
-
- b_ok = new QPushButton(tr("OK"));
-
- b_cancel = new QPushButton(tr("Cancel"));
- b_cancel->setDefault(true);
- connect(b_cancel, &QAbstractButton::clicked, this, &QWidget::close);
+ ui->b_cancel->setDefault(true);
+ connect(ui->b_cancel, &QAbstractButton::clicked, this, &QWidget::close);
// Handling
QButtonGroup *padButtons = new QButtonGroup(this);
- padButtons->addButton(b_left_lstick, 1);
- padButtons->addButton(b_down_lstick, 2);
- padButtons->addButton(b_right_lstick, 3);
- padButtons->addButton(b_up_lstick, 4);
+ padButtons->addButton(ui->b_left_lstick, 1);
+ padButtons->addButton(ui->b_down_lstick, 2);
+ padButtons->addButton(ui->b_right_lstick, 3);
+ padButtons->addButton(ui->b_up_lstick, 4);
- padButtons->addButton(b_left, 5);
- padButtons->addButton(b_down, 6);
- padButtons->addButton(b_right, 7);
- padButtons->addButton(b_up, 8);
+ padButtons->addButton(ui->b_left, 5);
+ padButtons->addButton(ui->b_down, 6);
+ padButtons->addButton(ui->b_right, 7);
+ padButtons->addButton(ui->b_up, 8);
- padButtons->addButton(b_shift_l1, 9);
- padButtons->addButton(b_shift_l2, 10);
- padButtons->addButton(b_shift_l3, 11);
+ padButtons->addButton(ui->b_shift_l1, 9);
+ padButtons->addButton(ui->b_shift_l2, 10);
+ padButtons->addButton(ui->b_shift_l3, 11);
- padButtons->addButton(b_start, 12);
- padButtons->addButton(b_select, 13);
+ padButtons->addButton(ui->b_start, 12);
+ padButtons->addButton(ui->b_select, 13);
- padButtons->addButton(b_shift_r1, 14);
- padButtons->addButton(b_shift_r2, 15);
- padButtons->addButton(b_shift_r3, 16);
+ padButtons->addButton(ui->b_shift_r1, 14);
+ padButtons->addButton(ui->b_shift_r2, 15);
+ padButtons->addButton(ui->b_shift_r3, 16);
- padButtons->addButton(b_square, 17);
- padButtons->addButton(b_cross, 18);
- padButtons->addButton(b_circle, 19);
- padButtons->addButton(b_triangle, 20);
+ padButtons->addButton(ui->b_square, 17);
+ padButtons->addButton(ui->b_cross, 18);
+ padButtons->addButton(ui->b_circle, 19);
+ padButtons->addButton(ui->b_triangle, 20);
- padButtons->addButton(b_left_rstick, 21);
- padButtons->addButton(b_down_rstick, 22);
- padButtons->addButton(b_right_rstick, 23);
- padButtons->addButton(b_up_rstick, 24);
+ padButtons->addButton(ui->b_left_rstick, 21);
+ padButtons->addButton(ui->b_down_rstick, 22);
+ padButtons->addButton(ui->b_right_rstick, 23);
+ padButtons->addButton(ui->b_up_rstick, 24);
- padButtons->addButton(b_reset, 25);
- padButtons->addButton(b_ok, 26);
- padButtons->addButton(b_cancel, 27);
+ padButtons->addButton(ui->b_reset, 25);
+ padButtons->addButton(ui->b_ok, 26);
+ padButtons->addButton(ui->b_cancel, 27);
connect(padButtons, SIGNAL(buttonClicked(int)), this, SLOT(OnPadButtonClicked(int)));
- // Main layout
- QHBoxLayout *hbox1 = new QHBoxLayout;
- hbox1->addLayout(roundStickLMainVBox);
- hbox1->addLayout(roundPadControlsMainVBox);
- hbox1->addWidget(roundPadShiftsL);
- hbox1->addLayout(roundPadSystemMainVbox);
- hbox1->addWidget(roundPadShiftsR);
- hbox1->addWidget(roundpad_buttons);
- hbox1->addLayout(roundStickRMainVBox);
-
- QHBoxLayout *hbox2 = new QHBoxLayout;
- hbox2->addWidget(b_reset);
- hbox2->addStretch();
- hbox2->addWidget(b_ok);
- hbox2->addWidget(b_cancel);
-
- QVBoxLayout *vbox = new QVBoxLayout;
- vbox->addLayout(hbox1);
- vbox->addLayout(hbox2);
- setLayout(vbox);
-
- setWindowTitle(tr("Input Settings"));
-
g_kbpad_config.load();
UpdateLabel();
}
+pad_settings_dialog::~pad_settings_dialog()
+{
+ delete ui;
+}
+
void pad_settings_dialog::keyPressEvent(QKeyEvent *keyEvent)
{
m_key_pressed = true;
@@ -346,36 +130,36 @@ void pad_settings_dialog::keyPressEvent(QKeyEvent *keyEvent)
void pad_settings_dialog::UpdateLabel()
{
// Get button labels from .ini
- b_up_lstick->setText(GetKeyName(g_kbpad_config.left_stick_up));
- b_down_lstick->setText(GetKeyName(g_kbpad_config.left_stick_down));
- b_left_lstick->setText(GetKeyName(g_kbpad_config.left_stick_left));
- b_right_lstick->setText(GetKeyName(g_kbpad_config.left_stick_right));
+ ui->b_up_lstick->setText(GetKeyName(g_kbpad_config.left_stick_up));
+ ui->b_down_lstick->setText(GetKeyName(g_kbpad_config.left_stick_down));
+ ui->b_left_lstick->setText(GetKeyName(g_kbpad_config.left_stick_left));
+ ui->b_right_lstick->setText(GetKeyName(g_kbpad_config.left_stick_right));
- b_up->setText(GetKeyName(g_kbpad_config.up));
- b_down->setText(GetKeyName(g_kbpad_config.down));
- b_left->setText(GetKeyName(g_kbpad_config.left));
- b_right->setText(GetKeyName(g_kbpad_config.right));
+ ui->b_up->setText(GetKeyName(g_kbpad_config.up));
+ ui->b_down->setText(GetKeyName(g_kbpad_config.down));
+ ui->b_left->setText(GetKeyName(g_kbpad_config.left));
+ ui->b_right->setText(GetKeyName(g_kbpad_config.right));
- b_shift_l1->setText(GetKeyName(g_kbpad_config.l1));
- b_shift_l2->setText(GetKeyName(g_kbpad_config.l2));
- b_shift_l3->setText(GetKeyName(g_kbpad_config.l3));
+ ui->b_shift_l1->setText(GetKeyName(g_kbpad_config.l1));
+ ui->b_shift_l2->setText(GetKeyName(g_kbpad_config.l2));
+ ui->b_shift_l3->setText(GetKeyName(g_kbpad_config.l3));
- b_start->setText(GetKeyName(g_kbpad_config.start));
- b_select->setText(GetKeyName(g_kbpad_config.select));
+ ui->b_start->setText(GetKeyName(g_kbpad_config.start));
+ ui->b_select->setText(GetKeyName(g_kbpad_config.select));
- b_shift_r1->setText(GetKeyName(g_kbpad_config.r1));
- b_shift_r2->setText(GetKeyName(g_kbpad_config.r2));
- b_shift_r3->setText(GetKeyName(g_kbpad_config.r3));
+ ui->b_shift_r1->setText(GetKeyName(g_kbpad_config.r1));
+ ui->b_shift_r2->setText(GetKeyName(g_kbpad_config.r2));
+ ui->b_shift_r3->setText(GetKeyName(g_kbpad_config.r3));
- b_square->setText(GetKeyName(g_kbpad_config.square));
- b_cross->setText(GetKeyName(g_kbpad_config.cross));
- b_circle->setText(GetKeyName(g_kbpad_config.circle));
- b_triangle->setText(GetKeyName(g_kbpad_config.triangle));
+ ui->b_square->setText(GetKeyName(g_kbpad_config.square));
+ ui->b_cross->setText(GetKeyName(g_kbpad_config.cross));
+ ui->b_circle->setText(GetKeyName(g_kbpad_config.circle));
+ ui->b_triangle->setText(GetKeyName(g_kbpad_config.triangle));
- b_up_rstick->setText(GetKeyName(g_kbpad_config.right_stick_up));
- b_down_rstick->setText(GetKeyName(g_kbpad_config.right_stick_down));
- b_left_rstick->setText(GetKeyName(g_kbpad_config.right_stick_left));
- b_right_rstick->setText(GetKeyName(g_kbpad_config.right_stick_right));
+ ui->b_up_rstick->setText(GetKeyName(g_kbpad_config.right_stick_up));
+ ui->b_down_rstick->setText(GetKeyName(g_kbpad_config.right_stick_down));
+ ui->b_left_rstick->setText(GetKeyName(g_kbpad_config.right_stick_left));
+ ui->b_right_rstick->setText(GetKeyName(g_kbpad_config.right_stick_right));
}
void pad_settings_dialog::UpdateTimerLabel(const u32 id)
@@ -387,36 +171,36 @@ void pad_settings_dialog::UpdateTimerLabel(const u32 id)
switch (id)
{
- case id_pad_lstick_left: UpdateLabel(b_left_lstick); break;
- case id_pad_lstick_down: UpdateLabel(b_down_lstick); break;
- case id_pad_lstick_right: UpdateLabel(b_right_lstick); break;
- case id_pad_lstick_up: UpdateLabel(b_up_lstick); break;
+ case id_pad_lstick_left: UpdateLabel(ui->b_left_lstick); break;
+ case id_pad_lstick_down: UpdateLabel(ui->b_down_lstick); break;
+ case id_pad_lstick_right: UpdateLabel(ui->b_right_lstick); break;
+ case id_pad_lstick_up: UpdateLabel(ui->b_up_lstick); break;
- case id_pad_left: UpdateLabel(b_left); break;
- case id_pad_down: UpdateLabel(b_down); break;
- case id_pad_right: UpdateLabel(b_right); break;
- case id_pad_up: UpdateLabel(b_up); break;
+ case id_pad_left: UpdateLabel(ui->b_left); break;
+ case id_pad_down: UpdateLabel(ui->b_down); break;
+ case id_pad_right: UpdateLabel(ui->b_right); break;
+ case id_pad_up: UpdateLabel(ui->b_up); break;
- case id_pad_l1: UpdateLabel(b_shift_l1); break;
- case id_pad_l2: UpdateLabel(b_shift_l2); break;
- case id_pad_l3: UpdateLabel(b_shift_l3); break;
+ case id_pad_l1: UpdateLabel(ui->b_shift_l1); break;
+ case id_pad_l2: UpdateLabel(ui->b_shift_l2); break;
+ case id_pad_l3: UpdateLabel(ui->b_shift_l3); break;
- case id_pad_start: UpdateLabel(b_start); break;
- case id_pad_select: UpdateLabel(b_select); break;
+ case id_pad_start: UpdateLabel(ui->b_start); break;
+ case id_pad_select: UpdateLabel(ui->b_select); break;
- case id_pad_r1: UpdateLabel(b_shift_r1); break;
- case id_pad_r2: UpdateLabel(b_shift_r2); break;
- case id_pad_r3: UpdateLabel(b_shift_r3); break;
+ case id_pad_r1: UpdateLabel(ui->b_shift_r1); break;
+ case id_pad_r2: UpdateLabel(ui->b_shift_r2); break;
+ case id_pad_r3: UpdateLabel(ui->b_shift_r3); break;
- case id_pad_square: UpdateLabel(b_square); break;
- case id_pad_cross: UpdateLabel(b_cross); break;
- case id_pad_circle: UpdateLabel(b_circle); break;
- case id_pad_triangle: UpdateLabel(b_triangle); break;
+ case id_pad_square: UpdateLabel(ui->b_square); break;
+ case id_pad_cross: UpdateLabel(ui->b_cross); break;
+ case id_pad_circle: UpdateLabel(ui->b_circle); break;
+ case id_pad_triangle: UpdateLabel(ui->b_triangle); break;
- case id_pad_rstick_left: UpdateLabel(b_left_rstick); break;
- case id_pad_rstick_down: UpdateLabel(b_down_rstick); break;
- case id_pad_rstick_right: UpdateLabel(b_right_rstick); break;
- case id_pad_rstick_up: UpdateLabel(b_up_rstick); break;
+ case id_pad_rstick_left: UpdateLabel(ui->b_left_rstick); break;
+ case id_pad_rstick_down: UpdateLabel(ui->b_down_rstick); break;
+ case id_pad_rstick_right: UpdateLabel(ui->b_right_rstick); break;
+ case id_pad_rstick_up: UpdateLabel(ui->b_up_rstick); break;
default: LOG_ERROR(HLE, "Unknown button ID: %d", id); break;
}
@@ -424,40 +208,40 @@ void pad_settings_dialog::UpdateTimerLabel(const u32 id)
void pad_settings_dialog::SwitchButtons(const bool IsEnabled)
{
- b_up_lstick->setEnabled(IsEnabled);
- b_down_lstick->setEnabled(IsEnabled);
- b_left_lstick->setEnabled(IsEnabled);
- b_right_lstick->setEnabled(IsEnabled);
+ ui->b_up_lstick->setEnabled(IsEnabled);
+ ui->b_down_lstick->setEnabled(IsEnabled);
+ ui->b_left_lstick->setEnabled(IsEnabled);
+ ui->b_right_lstick->setEnabled(IsEnabled);
- b_up->setEnabled(IsEnabled);
- b_down->setEnabled(IsEnabled);
- b_left->setEnabled(IsEnabled);
- b_right->setEnabled(IsEnabled);
+ ui->b_up->setEnabled(IsEnabled);
+ ui->b_down->setEnabled(IsEnabled);
+ ui->b_left->setEnabled(IsEnabled);
+ ui->b_right->setEnabled(IsEnabled);
- b_shift_l1->setEnabled(IsEnabled);
- b_shift_l2->setEnabled(IsEnabled);
- b_shift_l3->setEnabled(IsEnabled);
+ ui->b_shift_l1->setEnabled(IsEnabled);
+ ui->b_shift_l2->setEnabled(IsEnabled);
+ ui->b_shift_l3->setEnabled(IsEnabled);
- b_start->setEnabled(IsEnabled);
- b_select->setEnabled(IsEnabled);
+ ui->b_start->setEnabled(IsEnabled);
+ ui->b_select->setEnabled(IsEnabled);
- b_shift_r1->setEnabled(IsEnabled);
- b_shift_r2->setEnabled(IsEnabled);
- b_shift_r3->setEnabled(IsEnabled);
+ ui->b_shift_r1->setEnabled(IsEnabled);
+ ui->b_shift_r2->setEnabled(IsEnabled);
+ ui->b_shift_r3->setEnabled(IsEnabled);
- b_square->setEnabled(IsEnabled);
- b_cross->setEnabled(IsEnabled);
- b_circle->setEnabled(IsEnabled);
- b_triangle->setEnabled(IsEnabled);
+ ui->b_square->setEnabled(IsEnabled);
+ ui->b_cross->setEnabled(IsEnabled);
+ ui->b_circle->setEnabled(IsEnabled);
+ ui->b_triangle->setEnabled(IsEnabled);
- b_up_rstick->setEnabled(IsEnabled);
- b_down_rstick->setEnabled(IsEnabled);
- b_left_rstick->setEnabled(IsEnabled);
- b_right_rstick->setEnabled(IsEnabled);
+ ui->b_up_rstick->setEnabled(IsEnabled);
+ ui->b_down_rstick->setEnabled(IsEnabled);
+ ui->b_left_rstick->setEnabled(IsEnabled);
+ ui->b_right_rstick->setEnabled(IsEnabled);
- b_ok->setEnabled(IsEnabled);
- b_cancel->setEnabled(IsEnabled);
- b_reset->setEnabled(IsEnabled);
+ ui->b_ok->setEnabled(IsEnabled);
+ ui->b_cancel->setEnabled(IsEnabled);
+ ui->b_reset->setEnabled(IsEnabled);
}
void pad_settings_dialog::RunTimer(const u32 seconds, const u32 id)
diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.h b/rpcs3/rpcs3qt/pad_settings_dialog.h
index d2b69a9ff3..796a197554 100644
--- a/rpcs3/rpcs3qt/pad_settings_dialog.h
+++ b/rpcs3/rpcs3qt/pad_settings_dialog.h
@@ -1,4 +1,5 @@
-#pragma once
+#ifndef PADSETTINGSDIALOG_H
+#define PADSETTINGSDIALOG_H
#include
#include
@@ -48,49 +49,15 @@ enum button_ids
id_cancel
};
-struct pad_buttons
-{
- QPushButton* b_up_lstick;
- QPushButton* b_down_lstick;
- QPushButton* b_left_lstick;
- QPushButton* b_right_lstick;
+namespace Ui {
+ class pad_settings_dialog;
+}
- QPushButton* b_up;
- QPushButton* b_down;
- QPushButton* b_left;
- QPushButton* b_right;
-
- QPushButton* b_shift_l1;
- QPushButton* b_shift_l2;
- QPushButton* b_shift_l3;
-
- QPushButton* b_start;
- QPushButton* b_select;
-
- QPushButton* b_shift_r1;
- QPushButton* b_shift_r2;
- QPushButton* b_shift_r3;
-
- QPushButton* b_square;
- QPushButton* b_cross;
- QPushButton* b_circle;
- QPushButton* b_triangle;
-
- QPushButton* b_up_rstick;
- QPushButton* b_down_rstick;
- QPushButton* b_left_rstick;
- QPushButton* b_right_rstick;
-
- QPushButton* b_ok;
- QPushButton* b_cancel;
- QPushButton* b_reset;
-};
-
-class pad_settings_dialog : public QDialog, pad_buttons, PadHandlerBase
+class pad_settings_dialog : public QDialog, PadHandlerBase
{
Q_OBJECT
-private Q_SLOTS:
+private slots :
void OnPadButtonClicked(int id);
private:
@@ -98,11 +65,13 @@ private:
u32 m_button_id;
bool m_key_pressed;
QAction *onButtonClickedAct;
+ Ui::pad_settings_dialog *ui;
public:
// TODO get Init to work
virtual void Init(const u32 max_connect) override;
explicit pad_settings_dialog(QWidget *parent = 0);
+ ~pad_settings_dialog();
void keyPressEvent(QKeyEvent *keyEvent);
void UpdateLabel();
void UpdateTimerLabel(const u32 id);
@@ -111,3 +80,5 @@ public:
void LoadSettings();
const QString GetKeyName(const u32 keyCode);
};
+
+#endif // PADSETTINGSDIALOG_H
diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.ui b/rpcs3/rpcs3qt/pad_settings_dialog.ui
new file mode 100644
index 0000000000..f73cb86c9c
--- /dev/null
+++ b/rpcs3/rpcs3qt/pad_settings_dialog.ui
@@ -0,0 +1,1061 @@
+
+
+ pad_settings_dialog
+
+
+
+ 0
+ 0
+ 819
+ 584
+
+
+
+
+ 819
+ 584
+
+
+
+
+ 819
+ 584
+
+
+
+ Configure Controls
+
+
+
+ :/rpcs3.ico:/rpcs3.ico
+
+
+
+
+ 220
+ 150
+ 391
+ 241
+
+
+
+
+
+
+ Qt::AutoText
+
+
+ :/Icons/controller.png
+
+
+ true
+
+
+ Qt::AlignBottom|Qt::AlignHCenter
+
+
+
+
+ false
+
+
+
+ 10
+ 10
+ 171
+ 51
+
+
+
+ Controller to Configure
+
+
+
+
+ 10
+ 20
+ 151
+ 22
+
+
+
+
+
+
+
+ 190
+ 10
+ 101
+ 51
+
+
+
+ L1
+
+
+
+
+ 10
+ 20
+ 81
+ 23
+
+
+
+ Q
+
+
+ false
+
+
+
+
+
+
+ 190
+ 70
+ 101
+ 51
+
+
+
+ L2
+
+
+
+
+ 10
+ 20
+ 81
+ 23
+
+
+
+ R
+
+
+ false
+
+
+
+
+
+
+ 530
+ 10
+ 101
+ 51
+
+
+
+ R1
+
+
+
+
+ 10
+ 20
+ 81
+ 23
+
+
+
+ E
+
+
+ false
+
+
+
+
+
+
+ 530
+ 70
+ 101
+ 51
+
+
+
+ R2
+
+
+
+
+ 10
+ 20
+ 81
+ 23
+
+
+
+ T
+
+
+ false
+
+
+
+
+
+
+ 320
+ 90
+ 71
+ 51
+
+
+
+ Select
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ Space
+
+
+ false
+
+
+
+
+
+
+ 440
+ 90
+ 71
+ 51
+
+
+
+ Start
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ Enter
+
+
+ false
+
+
+
+
+
+
+ 360
+ 10
+ 101
+ 51
+
+
+
+ PS Button
+
+
+
+ false
+
+
+
+ 10
+ 20
+ 81
+ 23
+
+
+
+ Null
+
+
+ false
+
+
+
+
+
+
+ 320
+ 350
+ 71
+ 51
+
+
+
+ L3
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ F
+
+
+ false
+
+
+
+
+
+
+ 450
+ 350
+ 71
+ 51
+
+
+
+ R3
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ G
+
+
+ false
+
+
+
+
+
+
+ 10
+ 130
+ 171
+ 201
+
+
+
+ D-Pad
+
+
+
+
+ 50
+ 20
+ 71
+ 51
+
+
+
+ Up
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ W
+
+
+ false
+
+
+
+
+
+
+ 90
+ 80
+ 71
+ 51
+
+
+
+ Right
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ D
+
+
+ false
+
+
+
+
+
+
+ 10
+ 80
+ 71
+ 51
+
+
+
+ Left
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ A
+
+
+ false
+
+
+
+
+
+
+ 50
+ 140
+ 71
+ 51
+
+
+
+ Down
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ S
+
+
+ false
+
+
+
+
+
+
+
+ 640
+ 130
+ 171
+ 201
+
+
+
+ Face Buttons
+
+
+
+
+ 50
+ 20
+ 71
+ 51
+
+
+
+ Triangle
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ V
+
+
+ false
+
+
+
+
+
+
+ 90
+ 80
+ 71
+ 51
+
+
+
+ Circle
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ C
+
+
+ false
+
+
+
+
+
+
+ 10
+ 80
+ 71
+ 51
+
+
+
+ Square
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ Z
+
+
+ false
+
+
+
+
+
+
+ 50
+ 140
+ 71
+ 51
+
+
+
+ Cross
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ X
+
+
+ false
+
+
+
+
+
+
+
+ 10
+ 340
+ 171
+ 201
+
+
+
+ Left Analog
+
+
+
+
+ 50
+ 20
+ 71
+ 51
+
+
+
+ Up
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ Up
+
+
+ false
+
+
+
+
+
+
+ 90
+ 80
+ 71
+ 51
+
+
+
+ Right
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ Right
+
+
+ false
+
+
+
+
+
+
+ 10
+ 80
+ 71
+ 51
+
+
+
+ Left
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ Left
+
+
+ false
+
+
+
+
+
+
+ 50
+ 140
+ 71
+ 51
+
+
+
+ Down
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ Down
+
+
+ false
+
+
+
+
+
+
+
+ 640
+ 340
+ 171
+ 201
+
+
+
+ Right Analog
+
+
+
+
+ 50
+ 20
+ 71
+ 51
+
+
+
+ Up
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ PgUp
+
+
+ false
+
+
+
+
+
+
+ 90
+ 80
+ 71
+ 51
+
+
+
+ Right
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ End
+
+
+ false
+
+
+
+
+
+
+ 10
+ 80
+ 71
+ 51
+
+
+
+ Left
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ Home
+
+
+ false
+
+
+
+
+
+
+ 50
+ 140
+ 71
+ 51
+
+
+
+ Down
+
+
+
+
+ 10
+ 20
+ 51
+ 23
+
+
+
+ PgDown
+
+
+ false
+
+
+
+
+
+
+
+ 10
+ 550
+ 81
+ 23
+
+
+
+ Save
+
+
+ false
+
+
+
+
+
+ 100
+ 550
+ 81
+ 23
+
+
+
+ Close
+
+
+
+
+
+ 640
+ 550
+ 171
+ 23
+
+
+
+ Restore Defaults
+
+
+ false
+
+
+
+
+
+ 190
+ 460
+ 441
+ 111
+
+
+
+ Description
+
+
+
+
+ 6
+ 22
+ 431
+ 81
+
+
+
+ We currently support keyboard and mouse input devices as well as native DualShock 4, XInput and MMjoy controllers through software thanks to our core developers and contributors. Unfortunately, we currently do not natively support DualShock 3 controllers. You can however use third party tools like SCP Driver Package to allow your DualShock 3 controller to function like an XInput controller. We plan to add additional input methods in the future.
+
+
+ Qt::PlainText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+ false
+
+
+
+ 10
+ 70
+ 171
+ 51
+
+
+
+ Profiles
+
+
+
+
+ 10
+ 20
+ 151
+ 21
+
+
+
+ Manage Profiles
+
+
+
+
+
+ false
+
+
+
+ 640
+ 10
+ 171
+ 51
+
+
+
+ Controller Status
+
+
+
+
+ 10
+ 20
+ 151
+ 22
+
+
+
+
+
+
+ false
+
+
+
+ 640
+ 70
+ 171
+ 51
+
+
+
+ Features
+
+
+
+ false
+
+
+
+ 10
+ 20
+ 70
+ 17
+
+
+
+ Sixaixs
+
+
+ true
+
+
+ false
+
+
+
+
+ false
+
+
+
+ 90
+ 20
+ 70
+ 17
+
+
+
+ Vibration
+
+
+ true
+
+
+
+
+
+
+
+
+
+
diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp
index 870915ab0c..55b807eb4c 100644
--- a/rpcs3/rpcs3qt/settings_dialog.cpp
+++ b/rpcs3/rpcs3qt/settings_dialog.cpp
@@ -1,20 +1,59 @@
#include
#include
#include
+#include
+#include
+#include
+#include
+#include
+#include
-#include "core_tab.h"
-#include "graphics_tab.h"
-#include "audio_tab.h"
-#include "input_tab.h"
-#include "misc_tab.h"
-#include "gui_tab.h"
-#include "networking_tab.h"
-#include "system_tab.h"
#include "settings_dialog.h"
#include "emu_settings.h"
-settings_dialog::settings_dialog(std::shared_ptr xgui_settings, Render_Creator r_Creator, QWidget *parent, GameInfo* game) : QDialog(parent)
+#include "ui_settings_dialog.h"
+
+#include "stdafx.h"
+#include "Emu/System.h"
+#include "Crypto/unself.h"
+
+#include
+
+inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
+
+settings_dialog::settings_dialog(std::shared_ptr xSettings, Render_Creator r_Creator, QWidget *parent, GameInfo* game)
+ : QDialog(parent), xgui_settings(xSettings), ui(new Ui::settings_dialog)
{
+ ui->setupUi(this);
+ ui->cancelButton->setDefault(true);
+ ui->tabWidget->setUsesScrollButtons(false);
+
+ // read tooltips from json
+ QFile json_file(":/Json/tooltips.json");
+ json_file.open(QIODevice::ReadOnly | QIODevice::Text);
+ QJsonObject json_obj = QJsonDocument::fromJson(json_file.readAll()).object();
+ json_file.close();
+
+ QJsonObject json_cpu = json_obj.value("cpu").toObject();
+ QJsonObject json_cpu_ppu = json_cpu.value("PPU").toObject();
+ QJsonObject json_cpu_spu = json_cpu.value("SPU").toObject();
+ QJsonObject json_cpu_cbs = json_cpu.value("checkboxes").toObject();
+ QJsonObject json_cpu_lib = json_cpu.value("libraries").toObject();
+
+ QJsonObject json_gpu = json_obj.value("gpu").toObject();
+ QJsonObject json_gpu_cbs = json_gpu.value("comboboxes").toObject();
+ QJsonObject json_gpu_main = json_gpu.value("main").toObject();
+ QJsonObject json_gpu_deb = json_gpu.value("debug").toObject();
+
+ QJsonObject json_audio = json_obj.value("audio").toObject();
+ QJsonObject json_input = json_obj.value("input").toObject();
+ QJsonObject json_sys = json_obj.value("system").toObject();
+ QJsonObject json_net = json_obj.value("network").toObject();
+
+ QJsonObject json_emu = json_obj.value("emulator").toObject();
+ QJsonObject json_emu_gui = json_emu.value("gui").toObject();
+ QJsonObject json_emu_misc = json_emu.value("misc").toObject();
+
std::shared_ptr xemu_settings;
if (game)
{
@@ -26,47 +65,712 @@ settings_dialog::settings_dialog(std::shared_ptr xgui_settings, Re
xemu_settings.reset(new emu_settings(""));
setWindowTitle(tr("Settings"));
}
-
- core_tab* coreTab = new core_tab(xemu_settings, this);
-
- QPushButton *okButton = new QPushButton(tr("OK"));
- QPushButton *cancelButton = new QPushButton(tr("Cancel"));
- cancelButton->setDefault(true);
-
- tabWidget = new QTabWidget;
- tabWidget->setUsesScrollButtons(false);
- tabWidget->addTab(coreTab, tr("Core"));
- tabWidget->addTab(new graphics_tab(xemu_settings, r_Creator, this), tr("Graphics"));
- tabWidget->addTab(new audio_tab(xemu_settings, this), tr("Audio"));
- tabWidget->addTab(new input_tab(xemu_settings, this), tr("Input / Output"));
- tabWidget->addTab(new misc_tab(xemu_settings, this), tr("Misc"));
- tabWidget->addTab(new networking_tab(xemu_settings, this), tr("Networking"));
- tabWidget->addTab(new system_tab(xemu_settings, this), tr("System"));
-
- if (!game)
- { // Don't add gui tab to game settings.
- gui_tab* guiTab = new gui_tab(xgui_settings, this);
- tabWidget->addTab(guiTab, tr("GUI"));
- connect(guiTab, &gui_tab::GuiSettingsSyncRequest, this, &settings_dialog::GuiSettingsSyncRequest);
- connect(guiTab, &gui_tab::GuiSettingsSaveRequest, this, &settings_dialog::GuiSettingsSaveRequest);
- connect(guiTab, &gui_tab::GuiStylesheetRequest, this, &settings_dialog::GuiStylesheetRequest);
- connect(okButton, &QAbstractButton::clicked, guiTab, &gui_tab::Accept);
- }
// Various connects
- connect(okButton, &QAbstractButton::clicked, coreTab, &core_tab::SaveSelectedLibraries);
- connect(okButton, &QAbstractButton::clicked, xemu_settings.get(), &emu_settings::SaveSettings);
- connect(okButton, &QAbstractButton::clicked, this, &QDialog::accept);
- connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close);
- connect(tabWidget, &QTabWidget::currentChanged, [=]() {cancelButton->setFocus(); });
+ connect(ui->okButton, &QAbstractButton::clicked, ui->coreTab, [=]() {
+ std::set selectedlle;
+ for (int i = 0; illeList->count(); ++i)
+ {
+ const auto& item = ui->lleList->item(i);
+ if (item->checkState() != Qt::CheckState::Unchecked)
+ {
+ selectedlle.emplace(sstr(item->text()));
+ }
+ }
+ std::vector selected_ls = std::vector(selectedlle.begin(), selectedlle.end());
+ xemu_settings->SaveSelectedLibraries(selected_ls);
+ });
+ connect(ui->okButton, &QAbstractButton::clicked, xemu_settings.get(), &emu_settings::SaveSettings);
+ connect(ui->okButton, &QAbstractButton::clicked, this, &QDialog::accept);
+ connect(ui->cancelButton, &QAbstractButton::clicked, this, &QWidget::close);
+ connect(ui->tabWidget, &QTabWidget::currentChanged, [=]() {ui->cancelButton->setFocus(); });
- QHBoxLayout *buttonsLayout = new QHBoxLayout;
- buttonsLayout->addStretch();
- buttonsLayout->addWidget(okButton);
- buttonsLayout->addWidget(cancelButton);
+ // Cpu Tab ------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(tabWidget);
- mainLayout->addLayout(buttonsLayout);
- setLayout(mainLayout);
+ // Checkboxes
+ xemu_settings->EnhanceCheckBox(ui->hookStFunc, emu_settings::HookStaticFuncs);
+ ui->hookStFunc->setToolTip(json_cpu_cbs["hookStFunc"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->bindSPUThreads, emu_settings::BindSPUThreads);
+ ui->bindSPUThreads->setToolTip(json_cpu_cbs["bindSPUThreads"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->lowerSPUThrPrio, emu_settings::LowerSPUThreadPrio);
+ ui->lowerSPUThrPrio->setToolTip(json_cpu_cbs["lowerSPUThrPrio"].toString());
+
+ // PPU tool tips
+ ui->ppu_precise->setToolTip(json_cpu_ppu["precise"].toString());
+ ui->ppu_fast->setToolTip(json_cpu_ppu["fast"].toString());
+ ui->ppu_llvm->setToolTip(json_cpu_ppu["LLVM"].toString());
+
+ { // PPU Stuff
+ QString selectedPPU = qstr(xemu_settings->GetSetting(emu_settings::PPUDecoder));
+ for (const auto& button : ui->ppuBG->buttons())
+ {
+ QString current = button->text();
+ button->setCheckable(true);
+ if (current == selectedPPU)
+ {
+ button->setChecked(true);
+ }
+#ifndef LLVM_AVAILABLE
+ if (current == "Recompiler (LLVM)")
+ {
+ button->setEnabled(false);
+ }
+#endif
+ connect(button, &QAbstractButton::pressed, [=]() {xemu_settings->SetSetting(emu_settings::PPUDecoder, sstr(current)); });
+ }
+ }
+
+ // SPU tool tips
+ ui->spu_precise->setToolTip(json_cpu_spu["precise"].toString());
+ ui->spu_fast->setToolTip(json_cpu_spu["fast"].toString());
+ ui->spu_asmjit->setToolTip(json_cpu_spu["ASMJIT"].toString());
+ ui->spu_llvm->setToolTip(json_cpu_spu["LLVM"].toString());
+
+ { // Spu stuff
+ QString selectedSPU = qstr(xemu_settings->GetSetting(emu_settings::SPUDecoder));
+ for (const auto& button : ui->spuBG->buttons())
+ {
+ QString current = button->text();
+ if (current == "Recompiler (LLVM)")
+ {
+ button->setEnabled(false);
+ }
+ button->setCheckable(true);
+ if (current == selectedSPU)
+ {
+ button->setChecked(true);
+ }
+ connect(button, &QAbstractButton::pressed, [=]() {xemu_settings->SetSetting(emu_settings::SPUDecoder, sstr(current)); });
+ }
+ }
+
+ // lib options tool tips
+ ui->lib_auto->setToolTip(json_cpu_lib["auto"].toString());
+ ui->lib_manu->setToolTip(json_cpu_lib["manual"].toString());
+ ui->lib_both->setToolTip(json_cpu_lib["both"].toString());
+ ui->lib_lv2->setToolTip(json_cpu_lib["liblv2"].toString());
+
+ // creating this in ui file keeps scrambling the order...
+ QButtonGroup *libModeBG = new QButtonGroup(this);
+ libModeBG->addButton(ui->lib_auto, 0);
+ libModeBG->addButton(ui->lib_manu, 1);
+ libModeBG->addButton(ui->lib_both, 2);
+ libModeBG->addButton(ui->lib_lv2, 3);
+
+ {// Handle lib loading options
+ QString selectedLib = qstr(xemu_settings->GetSetting(emu_settings::LibLoadOptions));
+ for (const auto& button : libModeBG->buttons())
+ {
+ QString current = button->text();
+ button->setCheckable(true);
+ if (current == selectedLib)
+ {
+ button->setChecked(true);
+ }
+ connect(button, &QAbstractButton::pressed, [=]() {xemu_settings->SetSetting(emu_settings::LibLoadOptions, sstr(current)); });
+ }
+ }
+
+ // Sort string vector alphabetically
+ static const auto sort_string_vector = [](std::vector& vec)
+ {
+ std::sort(vec.begin(), vec.end(), [](const std::string &str1, const std::string &str2) { return str1 < str2; });
+ };
+
+ std::vector loadedLibs = xemu_settings->GetLoadedLibraries();
+
+ sort_string_vector(loadedLibs);
+
+ for (auto lib : loadedLibs)
+ {
+ QListWidgetItem* item = new QListWidgetItem(qstr(lib), ui->lleList);
+ item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag
+ item->setCheckState(Qt::Checked); // AND initialize check state
+ ui->lleList->addItem(item);
+ }
+ const std::string& lle_dir = Emu.GetLibDir(); // TODO
+
+ std::unordered_set set(loadedLibs.begin(), loadedLibs.end());
+ std::vector lle_module_list_unselected;
+
+ for (const auto& prxf : fs::dir(lle_dir))
+ {
+ // List found unselected modules
+ if (prxf.is_directory || (prxf.name.substr(std::max(size_t(3), prxf.name.length()) - 4)) != "sprx")
+ continue;
+ if (verify_npdrm_self_headers(fs::file(lle_dir + prxf.name)) && !set.count(prxf.name))
+ {
+ lle_module_list_unselected.push_back(prxf.name);
+ }
+ }
+
+ sort_string_vector(lle_module_list_unselected);
+
+ for (auto lib : lle_module_list_unselected)
+ {
+ QListWidgetItem* item = new QListWidgetItem(qstr(lib), ui->lleList);
+ item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag
+ item->setCheckState(Qt::Unchecked); // AND initialize check state
+ ui->lleList->addItem(item);
+ }
+
+ auto l_OnLibButtonClicked = [=](int ind)
+ {
+ if (ind == 1 || ind == 2)
+ {
+ ui->searchBox->setEnabled(true);
+ ui->lleList->setEnabled(true);
+ }
+ else
+ {
+ ui->searchBox->setEnabled(false);
+ ui->lleList->setEnabled(false);
+ }
+ };
+
+ auto l_OnSearchBoxTextChanged = [=](QString text)
+ {
+ QString searchTerm = text.toLower();
+ QList checked_Libs;
+ QList unchecked_Libs;
+
+ // create sublists. we need clones to preserve checkstates
+ for (int i = 0; i < ui->lleList->count(); ++i)
+ {
+ if (ui->lleList->item(i)->checkState() == Qt::Checked)
+ {
+ checked_Libs.append(ui->lleList->item(i)->clone());
+ }
+ else
+ {
+ unchecked_Libs.append(ui->lleList->item(i)->clone());
+ }
+ }
+
+ // sort sublists
+ auto qLessThan = [](QListWidgetItem *i1, QListWidgetItem *i2) { return i1->text() < i2->text(); };
+ qSort(checked_Libs.begin(), checked_Libs.end(), qLessThan);
+ qSort(unchecked_Libs.begin(), unchecked_Libs.end(), qLessThan);
+
+ // refill library list
+ ui->lleList->clear();
+
+ for (const auto& lib : checked_Libs)
+ {
+ ui->lleList->addItem(lib);
+ }
+ for (const auto& lib : unchecked_Libs)
+ {
+ ui->lleList->addItem(lib);
+ }
+
+ // only show items filtered for search text
+ for (int i = 0; i < ui->lleList->count(); i++)
+ {
+ if (ui->lleList->item(i)->text().contains(searchTerm))
+ {
+ ui->lleList->setRowHidden(i, false);
+ }
+ else
+ {
+ ui->lleList->setRowHidden(i, true);
+ }
+ }
+ };
+
+ // Events
+ connect(libModeBG, static_cast(&QButtonGroup::buttonClicked), l_OnLibButtonClicked);
+ connect(ui->searchBox, &QLineEdit::textChanged, l_OnSearchBoxTextChanged);
+
+ int buttid = libModeBG->checkedId();
+ if (buttid != -1)
+ {
+ l_OnLibButtonClicked(buttid);
+ }
+
+ // Gpu Tab -------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+
+ // Comboboxes
+ ui->graphicsAdapterBox->setToolTip(json_gpu_cbs["graphicsAdapterBox"].toString());
+
+ xemu_settings->EnhanceComboBox(ui->renderBox, emu_settings::Renderer);
+ ui->renderBox->setToolTip(json_gpu_cbs["renderBox"].toString());
+
+ xemu_settings->EnhanceComboBox(ui->resBox, emu_settings::Resolution);
+ ui->resBox->setToolTip(json_gpu_cbs["resBox"].toString());
+
+ xemu_settings->EnhanceComboBox(ui->aspectBox, emu_settings::AspectRatio);
+ ui->aspectBox->setToolTip(json_gpu_cbs["aspectBox"].toString());
+
+ xemu_settings->EnhanceComboBox(ui->frameLimitBox, emu_settings::FrameLimit);
+ ui->frameLimitBox->setToolTip(json_gpu_cbs["frameLimitBox"].toString());
+
+ // Checkboxes: main options
+ xemu_settings->EnhanceCheckBox(ui->dumpColor, emu_settings::WriteColorBuffers);
+ ui->dumpColor->setToolTip(json_gpu_main["dumpColor"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->readColor, emu_settings::ReadColorBuffers);
+ ui->readColor->setToolTip(json_gpu_main["readColor"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->dumpDepth, emu_settings::WriteDepthBuffer);
+ ui->dumpDepth->setToolTip(json_gpu_main["dumpDepth"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->readDepth, emu_settings::ReadDepthBuffer);
+ ui->readDepth->setToolTip(json_gpu_main["readDepth"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->vsync, emu_settings::VSync);
+ ui->vsync->setToolTip(json_gpu_main["vsync"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->autoInvalidateCache, emu_settings::AutoInvalidateCache);
+ ui->autoInvalidateCache->setToolTip(json_gpu_main["autoInvalidateCache"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->gpuTextureScaling, emu_settings::GPUTextureScaling);
+ ui->gpuTextureScaling->setToolTip(json_gpu_main["gpuTextureScaling"].toString());
+
+ // Checkboxes: debug options
+ xemu_settings->EnhanceCheckBox(ui->glLegacyBuffers, emu_settings::LegacyBuffers);
+ ui->glLegacyBuffers->setToolTip(json_gpu_deb["glLegacyBuffers"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->scrictModeRendering, emu_settings::StrictRenderingMode);
+ ui->scrictModeRendering->setToolTip(json_gpu_deb["scrictModeRendering"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->forceHighpZ, emu_settings::ForceHighpZ);
+ ui->forceHighpZ->setToolTip(json_gpu_deb["forceHighpZ"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->debugOutput, emu_settings::DebugOutput);
+ ui->debugOutput->setToolTip(json_gpu_deb["debugOutput"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->debugOverlay, emu_settings::DebugOverlay);
+ ui->debugOverlay->setToolTip(json_gpu_deb["debugOverlay"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->logProg, emu_settings::LogShaderPrograms);
+ ui->logProg->setToolTip(json_gpu_deb["logProg"].toString());
+
+ // Graphics Adapter
+ QStringList D3D12Adapters = r_Creator.D3D12Adapters;
+ QStringList vulkanAdapters = r_Creator.vulkanAdapters;
+ bool supportsD3D12 = r_Creator.supportsD3D12;
+ bool supportsVulkan = r_Creator.supportsVulkan;
+ QString r_D3D12 = r_Creator.render_D3D12;
+ QString r_Vulkan = r_Creator.render_Vulkan;
+ QString r_OpenGL = r_Creator.render_OpenGL;
+ QString old_D3D12;
+ QString old_Vulkan;
+
+ if (supportsD3D12)
+ {
+ old_D3D12 = qstr(xemu_settings->GetSetting(emu_settings::D3D12Adapter));
+ }
+ else
+ {
+ // Remove D3D12 option from render combobox
+ for (int i = 0; i < ui->renderBox->count(); i++)
+ {
+ if (ui->renderBox->itemText(i) == r_D3D12)
+ {
+ ui->renderBox->removeItem(i);
+ break;
+ }
+ }
+ }
+
+ if (supportsVulkan)
+ {
+ old_Vulkan = qstr(xemu_settings->GetSetting(emu_settings::VulkanAdapter));
+ }
+ else
+ {
+ // Remove Vulkan option from render combobox
+ for (int i = 0; i < ui->renderBox->count(); i++)
+ {
+ if (ui->renderBox->itemText(i) == r_Vulkan)
+ {
+ ui->renderBox->removeItem(i);
+ break;
+ }
+ }
+ }
+
+ if (supportsD3D12 || supportsVulkan)
+ {
+ QString oldRender = ui->renderBox->itemText(ui->renderBox->currentIndex());
+
+ auto switchGraphicsAdapter = [=](int index)
+ {
+ QString render = ui->renderBox->itemText(index);
+ m_isD3D12 = render == r_D3D12;
+ m_isVulkan = render == r_Vulkan;
+ ui->graphicsAdapterBox->setEnabled(m_isD3D12 || m_isVulkan);
+
+ // D3D Adapter
+ if (m_isD3D12)
+ {
+ // Reset other adapters to old config
+ if (supportsVulkan)
+ {
+ xemu_settings->SetSetting(emu_settings::VulkanAdapter, sstr(old_Vulkan));
+ }
+ // Fill combobox
+ ui->graphicsAdapterBox->clear();
+ for (const auto& adapter : D3D12Adapters)
+ {
+ ui->graphicsAdapterBox->addItem(adapter);
+ }
+ // Reset Adapter to old config
+ int idx = ui->graphicsAdapterBox->findText(old_D3D12);
+ if (idx == -1)
+ {
+ idx = 0;
+ if (old_D3D12.isEmpty())
+ {
+ LOG_WARNING(RSX, "%s adapter config empty: setting to default!", sstr(r_D3D12));
+ }
+ else
+ {
+ LOG_WARNING(RSX, "Last used %s adapter not found: setting to default!", sstr(r_D3D12));
+ }
+ }
+ ui->graphicsAdapterBox->setCurrentIndex(idx);
+ xemu_settings->SetSetting(emu_settings::D3D12Adapter, sstr(ui->graphicsAdapterBox->currentText()));
+ }
+
+ // Vulkan Adapter
+ else if (m_isVulkan)
+ {
+ // Reset other adapters to old config
+ if (supportsD3D12)
+ {
+ xemu_settings->SetSetting(emu_settings::D3D12Adapter, sstr(old_D3D12));
+ }
+ // Fill combobox
+ ui->graphicsAdapterBox->clear();
+ for (const auto& adapter : vulkanAdapters)
+ {
+ ui->graphicsAdapterBox->addItem(adapter);
+ }
+ // Reset Adapter to old config
+ int idx = ui->graphicsAdapterBox->findText(old_Vulkan);
+ if (idx == -1)
+ {
+ idx = 0;
+ if (old_Vulkan.isEmpty())
+ {
+ LOG_WARNING(RSX, "%s adapter config empty: setting to default!", sstr(r_Vulkan));
+ }
+ else
+ {
+ LOG_WARNING(RSX, "Last used %s adapter not found: setting to default!", sstr(r_Vulkan));
+ }
+ }
+ ui->graphicsAdapterBox->setCurrentIndex(idx);
+ xemu_settings->SetSetting(emu_settings::VulkanAdapter, sstr(ui->graphicsAdapterBox->currentText()));
+ }
+
+ // Other Adapter
+ else
+ {
+ // Reset Adapters to old config
+ if (supportsD3D12)
+ {
+ xemu_settings->SetSetting(emu_settings::D3D12Adapter, sstr(old_D3D12));
+ }
+ if (supportsVulkan)
+ {
+ xemu_settings->SetSetting(emu_settings::VulkanAdapter, sstr(old_Vulkan));
+ }
+
+ // Fill combobox with placeholder
+ ui->graphicsAdapterBox->clear();
+ ui->graphicsAdapterBox->addItem(tr("Not needed for %1 renderer").arg(render));
+ }
+ };
+
+ auto setAdapter = [=](QString text)
+ {
+ if (text.isEmpty()) return;
+
+ // don't set adapter if signal was created by switching render
+ QString newRender = ui->renderBox->itemText(ui->renderBox->currentIndex());
+ if (m_oldRender == newRender)
+ {
+ if (m_isD3D12 && D3D12Adapters.contains(text))
+ {
+ xemu_settings->SetSetting(emu_settings::D3D12Adapter, sstr(text));
+ }
+ else if (m_isVulkan && vulkanAdapters.contains(text))
+ {
+ xemu_settings->SetSetting(emu_settings::VulkanAdapter, sstr(text));
+ }
+ }
+ else
+ {
+ m_oldRender = newRender;
+ }
+ };
+
+ // Init
+ setAdapter(ui->graphicsAdapterBox->currentText());
+ switchGraphicsAdapter(ui->renderBox->currentIndex());
+
+ // Events
+ connect(ui->graphicsAdapterBox, &QComboBox::currentTextChanged, setAdapter);
+ connect(ui->renderBox, static_cast(&QComboBox::currentIndexChanged), switchGraphicsAdapter);
+ }
+
+ auto fixGLLegacy = [=](const QString& text) {
+ ui->glLegacyBuffers->setEnabled(text == r_OpenGL);
+ };
+
+ // Handle connects to disable specific checkboxes that depend on GUI state.
+ fixGLLegacy(ui->renderBox->currentText()); // Init
+ connect(ui->renderBox, &QComboBox::currentTextChanged, fixGLLegacy);
+
+ // Audio Tab -----------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+
+ // Comboboxes
+
+ xemu_settings->EnhanceComboBox(ui->audioOutBox, emu_settings::AudioRenderer);
+ ui->audioOutBox->setToolTip(json_audio["audioOutBox"].toString());
+
+ // Checkboxes
+
+ xemu_settings->EnhanceCheckBox(ui->audioDump, emu_settings::DumpToFile);
+ ui->audioDump->setToolTip(json_audio["audioDump"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->convert, emu_settings::ConvertTo16Bit);
+ ui->convert->setToolTip(json_audio["convert"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->downmix, emu_settings::DownmixStereo);
+ ui->downmix->setToolTip(json_audio["downmix"].toString());
+
+ // I/O Tab -------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+
+ // Comboboxes
+
+ xemu_settings->EnhanceComboBox(ui->padHandlerBox, emu_settings::PadHandler);
+ ui->padHandlerBox->setToolTip(json_input["padHandlerBox"].toString());
+
+ xemu_settings->EnhanceComboBox(ui->keyboardHandlerBox, emu_settings::KeyboardHandler);
+ ui->keyboardHandlerBox->setToolTip(json_input["keyboardHandlerBox"].toString());
+
+ xemu_settings->EnhanceComboBox(ui->mouseHandlerBox, emu_settings::MouseHandler);
+ ui->mouseHandlerBox->setToolTip(json_input["mouseHandlerBox"].toString());
+
+ xemu_settings->EnhanceComboBox(ui->cameraTypeBox, emu_settings::CameraType);
+ ui->cameraTypeBox->setToolTip(json_input["cameraTypeBox"].toString());
+
+ // Checkboxes
+
+ xemu_settings->EnhanceCheckBox(ui->useFakeCamera, emu_settings::Camera);
+ ui->useFakeCamera->setToolTip(json_input["useFakeCamera"].toString());
+
+ // System Tab ----------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+
+ // Comboboxes
+
+ xemu_settings->EnhanceComboBox(ui->sysLangBox, emu_settings::Language);
+ ui->sysLangBox->setToolTip(json_sys["sysLangBox"].toString());
+
+ // Checkboxes
+
+ xemu_settings->EnhanceCheckBox(ui->enableHostRoot, emu_settings::EnableHostRoot);
+ ui->enableHostRoot->setToolTip(json_sys["enableHostRoot"].toString());
+
+ // Network Tab ---------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+
+ // Comboboxes
+
+ xemu_settings->EnhanceComboBox(ui->netStatusBox, emu_settings::ConnectionStatus);
+ ui->netStatusBox->setToolTip(json_net["netStatusBox"].toString());
+
+ // Emulator Tab --------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+ // ---------------------------------------------------------------------------------------------------------------------
+
+ // Comboboxes
+
+ ui->combo_configs->setToolTip(json_emu_gui["configs"].toString());
+ ui->combo_stylesheets->setToolTip(json_emu_gui["stylesheets"].toString());
+
+ // Checkboxes
+
+ ui->cb_show_welcome->setToolTip(json_emu_gui["show_welcome"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->exitOnStop, emu_settings::ExitRPCS3OnFinish);
+ ui->exitOnStop->setToolTip(json_emu_misc["exitOnStop"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->alwaysStart, emu_settings::StartOnBoot);
+ ui->alwaysStart->setToolTip(json_emu_misc["alwaysStart"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->startGameFullscreen, emu_settings::StartGameFullscreen);
+ ui->startGameFullscreen->setToolTip(json_emu_misc["startGameFullscreen"].toString());
+
+ xemu_settings->EnhanceCheckBox(ui->showFPSInTitle, emu_settings::ShowFPSInTitle);
+ ui->showFPSInTitle->setToolTip(json_emu_misc["showFPSInTitle"].toString());
+
+ if (game)
+ {
+ ui->gb_stylesheets->setEnabled(false);
+ ui->gb_configs->setEnabled(false);
+ ui->gb_settings->setEnabled(false);
+ }
+ else
+ {
+ ui->cb_show_welcome->setChecked(xgui_settings->GetValue(GUI::ib_show_welcome).toBool());
+
+ connect(ui->okButton, &QAbstractButton::clicked, [this]() {
+ // Only attempt to load a config if changes occurred.
+ if (m_startingConfig != xgui_settings->GetValue(GUI::m_currentConfig).toString())
+ {
+ OnApplyConfig();
+ }
+ if (m_startingStylesheet != xgui_settings->GetValue(GUI::m_currentStylesheet).toString())
+ {
+ OnApplyStylesheet();
+ }
+ });
+ connect(ui->pb_reset_default, &QAbstractButton::clicked, [=]() {
+ if (QMessageBox::question(this, tr("Reset GUI to default?"), tr("This will include your stylesheet as well. Do you wish to proceed?"),
+ QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
+ {
+ xgui_settings->Reset(true);
+ xgui_settings->ChangeToConfig(tr("default"));
+ Q_EMIT GuiStylesheetRequest(tr("default"));
+ Q_EMIT GuiSettingsSyncRequest();
+ AddConfigs();
+ AddStylesheets();
+ }
+ });
+ connect(ui->pb_backup_config, &QAbstractButton::clicked, this, &settings_dialog::OnBackupCurrentConfig);
+ connect(ui->pb_apply_config, &QAbstractButton::clicked, this, &settings_dialog::OnApplyConfig);
+ connect(ui->pb_apply_stylesheet, &QAbstractButton::clicked, this, &settings_dialog::OnApplyStylesheet);
+ connect(ui->pb_open_folder, &QAbstractButton::clicked, [=]() {QDesktopServices::openUrl(xgui_settings->GetSettingsDir()); });
+ connect(ui->cb_show_welcome, &QCheckBox::clicked, [=](bool val) {xgui_settings->SetValue(GUI::ib_show_welcome, val); });
+
+ AddConfigs();
+ AddStylesheets();
+ }
+}
+
+void settings_dialog::AddConfigs()
+{
+ ui->combo_configs->clear();
+
+ ui->combo_configs->addItem(tr("default"));
+
+ for (QString entry : xgui_settings->GetConfigEntries())
+ {
+ if (entry != tr("default"))
+ {
+ ui->combo_configs->addItem(entry);
+ }
+ }
+
+ QString currentSelection = tr("CurrentSettings");
+ m_startingConfig = currentSelection;
+
+ int index = ui->combo_configs->findText(currentSelection);
+ if (index != -1)
+ {
+ ui->combo_configs->setCurrentIndex(index);
+ }
+ else
+ {
+ LOG_WARNING(GENERAL, "Trying to set an invalid config index ", index);
+ }
+}
+
+void settings_dialog::AddStylesheets()
+{
+ ui->combo_stylesheets->clear();
+
+ ui->combo_stylesheets->addItem(tr("default"));
+
+ for (QString entry : xgui_settings->GetStylesheetEntries())
+ {
+ if (entry != tr("default"))
+ {
+ ui->combo_stylesheets->addItem(entry);
+ }
+ }
+
+ QString currentSelection = xgui_settings->GetValue(GUI::m_currentStylesheet).toString();
+ m_startingStylesheet = currentSelection;
+
+ int index = ui->combo_stylesheets->findText(currentSelection);
+ if (index != -1)
+ {
+ ui->combo_stylesheets->setCurrentIndex(index);
+ }
+ else
+ {
+ LOG_WARNING(GENERAL, "Trying to set an invalid stylesheets index ", index);
+ }
+}
+
+void settings_dialog::OnBackupCurrentConfig()
+{
+ QInputDialog* dialog = new QInputDialog(this);
+ dialog->setWindowTitle(tr("Choose a unique name"));
+ dialog->setLabelText(tr("Configuration Name: "));
+ dialog->resize(500, 100);
+
+ while (dialog->exec() != QDialog::Rejected)
+ {
+ dialog->resize(500, 100);
+ QString friendlyName = dialog->textValue();
+ if (friendlyName == "")
+ {
+ QMessageBox::warning(this, tr("Error"), tr("Name cannot be empty"));
+ continue;
+ }
+ if (friendlyName.contains("."))
+ {
+ QMessageBox::warning(this, tr("Error"), tr("Must choose a name with no '.'"));
+ continue;
+ }
+ if (ui->combo_configs->findText(friendlyName) != -1)
+ {
+ QMessageBox::warning(this, tr("Error"), tr("Please choose a non-existing name"));
+ continue;
+ }
+ Q_EMIT GuiSettingsSaveRequest();
+ xgui_settings->SaveCurrentConfig(friendlyName);
+ ui->combo_configs->addItem(friendlyName);
+ ui->combo_configs->setCurrentIndex(ui->combo_configs->findText(friendlyName));
+ break;
+ }
+}
+
+void settings_dialog::OnApplyConfig()
+{
+ QString name = ui->combo_configs->currentText();
+ xgui_settings->SetValue(GUI::m_currentConfig, name);
+ xgui_settings->ChangeToConfig(name);
+ Q_EMIT GuiSettingsSyncRequest();
+}
+
+void settings_dialog::OnApplyStylesheet()
+{
+ xgui_settings->SetValue(GUI::m_currentStylesheet, ui->combo_stylesheets->currentText());
+ Q_EMIT GuiStylesheetRequest(xgui_settings->GetCurrentStylesheetPath());
+}
+
+void settings_dialog::SetActiveTab(int index)
+{
+ ui->tabWidget->setCurrentIndex(index);
}
diff --git a/rpcs3/rpcs3qt/settings_dialog.h b/rpcs3/rpcs3qt/settings_dialog.h
index b936ce430a..16df33509e 100644
--- a/rpcs3/rpcs3qt/settings_dialog.h
+++ b/rpcs3/rpcs3qt/settings_dialog.h
@@ -10,16 +10,36 @@
#include
+namespace Ui {
+ class settings_dialog;
+}
+
class settings_dialog : public QDialog
{
Q_OBJECT
public:
explicit settings_dialog(std::shared_ptr xSettings, Render_Creator r_Creator, QWidget *parent = 0, GameInfo *game = nullptr);
+ void SetActiveTab(int index);
+ private Q_SLOTS:
+ void OnBackupCurrentConfig();
+ void OnApplyConfig();
+ void OnApplyStylesheet();
Q_SIGNALS:
void GuiSettingsSyncRequest();
void GuiStylesheetRequest(const QString& path);
void GuiSettingsSaveRequest();
private:
- QTabWidget *tabWidget;
+ //emulator tab
+ void AddConfigs();
+ void AddStylesheets();
+ QString m_startingStylesheet;
+ QString m_startingConfig;
+ //gpu tab
+ QString m_oldRender = "";
+ bool m_isD3D12 = false;
+ bool m_isVulkan = false;
+
+ Ui::settings_dialog *ui;
+ std::shared_ptr xgui_settings;
};
diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui
new file mode 100644
index 0000000000..5506c36b42
--- /dev/null
+++ b/rpcs3/rpcs3qt/settings_dialog.ui
@@ -0,0 +1,1518 @@
+
+
+ settings_dialog
+
+
+
+ 0
+ 0
+ 516
+ 586
+
+
+
+
+ 516
+ 586
+
+
+
+
+ 516
+ 586
+
+
+
+ Settings
+
+
+
+ :/rpcs3.ico:/rpcs3.ico
+
+
+
+ true
+
+
+
+ 10
+ 10
+ 496
+ 531
+
+
+
+ 0
+
+
+
+ CPU
+
+
+
+
+ 10
+ 10
+ 221
+ 91
+
+
+
+ PPU Decoder
+
+
+
+
+ 10
+ 40
+ 171
+ 20
+
+
+
+ Interpreter (Fast)
+
+
+ ppuBG
+
+
+
+
+
+ 10
+ 60
+ 171
+ 20
+
+
+
+ Recompiler (LLVM)
+
+
+ ppuBG
+
+
+
+
+
+ 10
+ 20
+ 171
+ 20
+
+
+
+ Interpreter (Precise)
+
+
+ ppuBG
+
+
+
+
+
+
+ 10
+ 110
+ 221
+ 111
+
+
+
+ SPU Decoder
+
+
+
+
+ 10
+ 40
+ 171
+ 20
+
+
+
+ Interpreter (Fast)
+
+
+ spuBG
+
+
+
+
+
+ 10
+ 60
+ 171
+ 20
+
+
+
+ Recompiler (ASMJIT)
+
+
+ spuBG
+
+
+
+
+
+ 10
+ 20
+ 171
+ 20
+
+
+
+ Interpreter (Precise)
+
+
+ spuBG
+
+
+
+
+ false
+
+
+
+ 10
+ 80
+ 171
+ 20
+
+
+
+ Recompiler (LLVM)
+
+
+ spuBG
+
+
+
+
+
+
+ 10
+ 230
+ 221
+ 151
+
+
+
+ Additional Settings
+
+
+
+
+ 10
+ 20
+ 201
+ 16
+
+
+
+ Hook Static Functions
+
+
+
+
+
+ 10
+ 40
+ 201
+ 16
+
+
+
+ Bind SPU threads to secondary cores
+
+
+
+
+
+ 10
+ 60
+ 201
+ 16
+
+
+
+ Lower SPU thread priority
+
+
+
+
+
+
+ 240
+ 130
+ 241
+ 191
+
+
+
+ Firmware Libraries
+
+
+
+
+ 10
+ 20
+ 221
+ 161
+
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QListView::ListMode
+
+
+
+
+
+
+ 240
+ 10
+ 241
+ 111
+
+
+
+ Firmware Settings
+
+
+
+
+ 10
+ 40
+ 191
+ 20
+
+
+
+ Manually load selected libraries
+
+
+
+
+
+ 10
+ 60
+ 191
+ 20
+
+
+
+ Load automatic and manual libraries
+
+
+
+
+
+ 10
+ 20
+ 191
+ 20
+
+
+
+ Automatically load required libraries
+
+
+
+
+
+ 10
+ 80
+ 191
+ 20
+
+
+
+ Load liblv2.sprx only
+
+
+
+
+
+
+ 240
+ 330
+ 241
+ 51
+
+
+
+ Search Libraries
+
+
+
+
+ 10
+ 20
+ 221
+ 20
+
+
+
+
+
+
+
+ 10
+ 390
+ 471
+ 101
+
+
+
+ Description
+
+
+
+
+ 10
+ 20
+ 451
+ 71
+
+
+
+ Configure CPU settings.
+
+
+ Qt::PlainText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+
+ GPU
+
+
+
+
+ 10
+ 10
+ 231
+ 51
+
+
+
+ Renderer
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 250
+ 10
+ 231
+ 51
+
+
+
+ Resolution
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 70
+ 231
+ 51
+
+
+
+ Graphics Device
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+ false
+
+
+
+ 250
+ 70
+ 231
+ 51
+
+
+
+ Enhancements
+
+
+
+
+ 10
+ 20
+ 211
+ 23
+
+
+
+ Advanced Settings
+
+
+
+
+
+
+ 10
+ 130
+ 111
+ 51
+
+
+
+ Aspect Ratio
+
+
+
+
+ 10
+ 20
+ 91
+ 22
+
+
+
+
+
+
+
+ 130
+ 130
+ 111
+ 51
+
+
+
+ Framelimit
+
+
+
+
+ 10
+ 20
+ 91
+ 22
+
+
+
+
+
+
+
+ 10
+ 190
+ 231
+ 191
+
+
+
+ Additional Settings
+
+
+
+
+ 10
+ 40
+ 211
+ 17
+
+
+
+ Write Depth Buffers
+
+
+
+
+
+ 10
+ 80
+ 211
+ 17
+
+
+
+ Read Depth Buffers
+
+
+
+
+
+ 10
+ 60
+ 211
+ 17
+
+
+
+ Read Color Buffers
+
+
+
+
+
+ 10
+ 20
+ 211
+ 17
+
+
+
+ Write Color Buffers
+
+
+
+
+
+ 10
+ 140
+ 211
+ 17
+
+
+
+ Use Vertical Sync
+
+
+
+
+
+ 10
+ 100
+ 211
+ 17
+
+
+
+ Invalidate Cache Every Frame
+
+
+
+
+
+ 10
+ 120
+ 211
+ 17
+
+
+
+ Use GPU Texture Scaling
+
+
+
+
+
+
+ 10
+ 390
+ 471
+ 101
+
+
+
+ Description
+
+
+
+
+ 10
+ 20
+ 451
+ 71
+
+
+
+ Configure GPU settings.
+
+
+ Qt::PlainText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+ true
+
+
+
+ 250
+ 190
+ 231
+ 191
+
+
+
+ Debugging Settings
+
+
+
+
+ 10
+ 60
+ 211
+ 17
+
+
+
+ Debug Overlay
+
+
+
+
+
+ 10
+ 40
+ 211
+ 17
+
+
+
+ Debug Output
+
+
+
+
+
+ 10
+ 100
+ 211
+ 17
+
+
+
+ Log Shader Programs
+
+
+
+
+
+ 10
+ 80
+ 211
+ 17
+
+
+
+ Strict Rendering Mode
+
+
+
+
+ false
+
+
+
+ 10
+ 20
+ 211
+ 17
+
+
+
+ Use Legacy OpenGL Buffers
+
+
+
+
+
+ 10
+ 120
+ 211
+ 17
+
+
+
+ Use High Precision Z-buffer
+
+
+
+
+
+
+ Audio
+
+
+
+
+ 10
+ 10
+ 231
+ 51
+
+
+
+ Audio Out
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 70
+ 231
+ 91
+
+
+
+ Audio Settings
+
+
+
+
+ 10
+ 20
+ 211
+ 17
+
+
+
+ Dump to File
+
+
+
+
+
+ 10
+ 40
+ 211
+ 17
+
+
+
+ Convert to 16-bit
+
+
+
+
+
+ 10
+ 60
+ 211
+ 17
+
+
+
+ Downmix to Stereo
+
+
+ false
+
+
+
+
+
+
+ 10
+ 390
+ 471
+ 101
+
+
+
+ Description
+
+
+
+
+ 10
+ 20
+ 451
+ 71
+
+
+
+ Configure audio settings.
+
+
+ Qt::PlainText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+
+ I/O
+
+
+
+
+ 250
+ 10
+ 231
+ 51
+
+
+
+ Camera Input
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 70
+ 231
+ 51
+
+
+
+ Keyboard Handler
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 10
+ 231
+ 51
+
+
+
+ Controller Handler
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 130
+ 231
+ 51
+
+
+
+ Mouse Handler
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 250
+ 70
+ 231
+ 51
+
+
+
+ Camera Settings
+
+
+
+
+ 10
+ 20
+ 211
+ 17
+
+
+
+ Use Fake Camera
+
+
+
+
+
+
+ 10
+ 390
+ 471
+ 101
+
+
+
+ Description
+
+
+
+
+ 10
+ 20
+ 451
+ 71
+
+
+
+ Configure input and output settings.
+
+
+ Qt::PlainText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+
+ System
+
+
+
+ false
+
+
+
+ 10
+ 70
+ 231
+ 51
+
+
+
+ Console Region
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 10
+ 231
+ 51
+
+
+
+ Console Language
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 390
+ 471
+ 101
+
+
+
+ Description
+
+
+
+
+ 10
+ 20
+ 451
+ 71
+
+
+
+ Configure virtual PlayStation 3 system settings.
+
+
+ Qt::PlainText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+
+ 250
+ 10
+ 231
+ 51
+
+
+
+ Homebrew
+
+
+
+
+ 10
+ 20
+ 211
+ 17
+
+
+
+ Enable /host_root/
+
+
+
+ groupBox
+ groupBox_33
+ groupBox_34
+ groupBox_61
+
+
+
+ Network
+
+
+
+
+ 10
+ 10
+ 231
+ 51
+
+
+
+ Network Status
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 390
+ 471
+ 101
+
+
+
+ Description
+
+
+
+
+ 10
+ 20
+ 451
+ 71
+
+
+
+ Configure virtual PlayStation 3 network settings.
+
+
+ Qt::PlainText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+
+ Emulator
+
+
+
+
+ 10
+ 10
+ 231
+ 141
+
+
+
+ Emulator Settings
+
+
+
+
+ 10
+ 40
+ 211
+ 17
+
+
+
+ Automatically start games after boot
+
+
+
+
+
+ 10
+ 20
+ 211
+ 17
+
+
+
+ Exit RPCS3 when process finishes
+
+
+
+
+
+ 10
+ 80
+ 211
+ 17
+
+
+
+ Show framerate counter in window title
+
+
+
+
+
+ 10
+ 60
+ 211
+ 17
+
+
+
+ Start games in Fullscreen mode
+
+
+
+
+
+
+ 250
+ 10
+ 231
+ 141
+
+
+
+ UI Settings
+
+
+
+
+ 10
+ 20
+ 211
+ 23
+
+
+
+ Restore default settings
+
+
+
+
+
+ 10
+ 50
+ 211
+ 23
+
+
+
+ Save current settings
+
+
+
+
+
+ 10
+ 80
+ 211
+ 23
+
+
+
+ Open configuration folder
+
+
+
+
+
+ 10
+ 110
+ 211
+ 17
+
+
+
+ Show Welcome Screen
+
+
+
+
+
+
+ 10
+ 160
+ 231
+ 81
+
+
+
+ UI Configurations
+
+
+
+
+ 10
+ 50
+ 211
+ 23
+
+
+
+ Apply
+
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 250
+ 160
+ 231
+ 81
+
+
+
+ UI Stylesheets
+
+
+
+
+ 10
+ 50
+ 211
+ 23
+
+
+
+ Apply
+
+
+
+
+
+ 10
+ 20
+ 211
+ 22
+
+
+
+
+
+
+
+ 10
+ 390
+ 471
+ 101
+
+
+
+ Description
+
+
+
+
+ 10
+ 20
+ 451
+ 71
+
+
+
+ Configure RPCS3 Emulator settings.
+
+
+ Qt::PlainText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+
+
+
+ 10
+ 550
+ 75
+ 23
+
+
+
+ Save
+
+
+
+
+
+ 90
+ 550
+ 75
+ 23
+
+
+
+ Close
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/rpcs3/rpcs3qt/system_tab.cpp b/rpcs3/rpcs3qt/system_tab.cpp
deleted file mode 100644
index c08d51250e..0000000000
--- a/rpcs3/rpcs3qt/system_tab.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-
-#include "system_tab.h"
-
-system_tab::system_tab(std::shared_ptr xemu_settings, QWidget *parent) : QWidget(parent)
-{
- // Language
- QGroupBox *sysLang = new QGroupBox(tr("Language"));
-
- QComboBox *sysLangBox = xemu_settings->CreateEnhancedComboBox(emu_settings::Language, this);
-
- QVBoxLayout *sysLangVbox = new QVBoxLayout;
- sysLangVbox->addWidget(sysLangBox);
- sysLang->setLayout(sysLangVbox);
-
- // Checkboxes
- QCheckBox *enableHostRoot = xemu_settings->CreateEnhancedCheckBox(emu_settings::EnableHostRoot, this);
-
- // Main layout
- QVBoxLayout *vbox = new QVBoxLayout;
- vbox->addWidget(enableHostRoot);
- vbox->addWidget(sysLang);
- vbox->addStretch();
-
- QHBoxLayout *hbox = new QHBoxLayout;
- hbox->addLayout(vbox);
- hbox->addStretch();
- setLayout(hbox);
-}
diff --git a/rpcs3/rpcs3qt/system_tab.h b/rpcs3/rpcs3qt/system_tab.h
deleted file mode 100644
index 10c3a4c6cc..0000000000
--- a/rpcs3/rpcs3qt/system_tab.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-
-#include "emu_settings.h"
-
-#include
-
-#include
-
-class system_tab : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit system_tab(std::shared_ptr xemu_settings, QWidget *parent = 0);
-};
diff --git a/rpcs3/rpcs3qt/welcome_dialog.cpp b/rpcs3/rpcs3qt/welcome_dialog.cpp
index d1577d9e3e..ac691cb0eb 100644
--- a/rpcs3/rpcs3qt/welcome_dialog.cpp
+++ b/rpcs3/rpcs3qt/welcome_dialog.cpp
@@ -1,4 +1,5 @@
#include "welcome_dialog.h"
+#include "ui_welcome_dialog.h"
#include "gui_settings.h"
@@ -10,120 +11,23 @@
#include
#include
-welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent)
+welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::welcome_dialog)
{
+ ui->setupUi(this);
+
gui_settings* settings = new gui_settings(this);
- QPushButton* okay = new QPushButton(tr("Okay"));
- okay->setEnabled(false);
+ ui->okay->setEnabled(false);
- QCheckBox* do_not_show = new QCheckBox(tr("Do not show again"));
- QCheckBox* i_have_read = new QCheckBox(tr("I have read the quickstart guide (required)"));
-
- connect(i_have_read, &QCheckBox::clicked, [=](bool checked)
+ connect(ui->i_have_read, &QCheckBox::clicked, [=](bool checked)
{
- okay->setEnabled(checked);
+ ui->okay->setEnabled(checked);
});
- connect(do_not_show, &QCheckBox::clicked, [=](bool checked)
+ connect(ui->do_not_show, &QCheckBox::clicked, [=](bool checked)
{
settings->SetValue(GUI::ib_show_welcome, QVariant(!checked));
});
- connect(okay, &QPushButton::pressed, this, &QDialog::accept);
-
- QIcon rpcs3_icon = QIcon(":/rpcs3.ico");
- QLabel* icon = new QLabel(this);
- icon->setPixmap(rpcs3_icon.pixmap(120, 120));
- icon->setAlignment(Qt::AlignRight);
-
- QLabel* header_1 = new QLabel(tr(
- "Welcome to RPCS3
"
- ));
-
- QFont header_font;
- header_font.setPointSize(12);
-
- header_1->setFont(header_font);
- header_1->setFixedWidth(header_1->sizeHint().width());
- header_1->setWordWrap(true);
-
- QLabel* header_2 = new QLabel(tr(
- "An open-source PlayStation 3 emulator for Windows and Linux funded with Patreon!
"
- ));
-
- header_2->setFixedWidth(header_1->sizeHint().width() * 1.2);
- header_2->setWordWrap(true);
-
- QLabel* caption = new QLabel(tr(
- "To get started, you need to install the PlayStation 3 firmware.
"
- "Check out our quickstart guide for further information.
"
- "If you have any questions, please have a look at our FAQ.
"
- "Otherwise, further discussion and support can be found at our forums "
- "or on our discord server.
"
- ));
-
- QFont caption_font;
- caption_font.setPointSize(10);
- caption_font.setWeight(QFont::Medium);
-
- caption->setFont(caption_font);
- caption->setFixedWidth(caption->sizeHint().width());
- caption->setWordWrap(true);
- caption->setOpenExternalLinks(true);
- caption->setAlignment(Qt::AlignLeft);
-
- QLabel* piracy = new QLabel(tr(
- "RPCS3 does NOT condone piracy. You must dump your own games."
- ));
- piracy->setWordWrap(true);
- piracy->setAlignment(Qt::AlignCenter);
-
- // Header Layout
- QVBoxLayout* header_layout = new QVBoxLayout();
- header_layout->setAlignment(Qt::AlignLeft);
- header_layout->addWidget(header_1);
- header_layout->addWidget(header_2);
-
- // Caption Layout
- QVBoxLayout* caption_layout = new QVBoxLayout();
- caption_layout->addWidget(caption);
- caption_layout->addWidget(piracy);
-
- // Top Layout
- QHBoxLayout* top_layout = new QHBoxLayout();
- top_layout->setAlignment(Qt::AlignCenter);
- top_layout->addStretch();
- top_layout->addWidget(icon);
- top_layout->addSpacing(icon->sizeHint().width() / 10);
- top_layout->addLayout(header_layout);
- top_layout->addStretch();
-
- // Bottom Layout
- QHBoxLayout* bottom_layout = new QHBoxLayout();
- bottom_layout->setAlignment(Qt::AlignCenter);
- bottom_layout->addLayout(caption_layout);
-
- // Button Layout
- QHBoxLayout* button_layout = new QHBoxLayout();
- button_layout->addWidget(okay);
- button_layout->addSpacing(15);
- button_layout->addWidget(i_have_read);
- button_layout->addStretch();
- button_layout->addWidget(do_not_show);
-
- // Main Layout
- QVBoxLayout* layout = new QVBoxLayout();
- layout->addLayout(top_layout);
- layout->addSpacing(25);
- layout->addLayout(bottom_layout);
- layout->addSpacing(25);
- layout->addLayout(button_layout);
-
- setWindowIcon(rpcs3_icon);
- setWindowTitle(tr("Welcome to RPCS3"));
- setWindowFlags(Qt::WindowTitleHint);
- setLayout(layout);
-
- setFixedSize(sizeHint());
+ connect(ui->okay, &QPushButton::pressed, this, &QDialog::accept);
}
diff --git a/rpcs3/rpcs3qt/welcome_dialog.h b/rpcs3/rpcs3qt/welcome_dialog.h
index fdb20ff142..0ce0fe143a 100644
--- a/rpcs3/rpcs3qt/welcome_dialog.h
+++ b/rpcs3/rpcs3qt/welcome_dialog.h
@@ -4,10 +4,17 @@
#include
#include
+namespace Ui {
+ class welcome_dialog;
+}
+
class welcome_dialog : public QDialog
{
Q_OBJECT
public:
explicit welcome_dialog(QWidget* parent = nullptr);
+
+private:
+ Ui::welcome_dialog *ui;
};
diff --git a/rpcs3/rpcs3qt/welcome_dialog.ui b/rpcs3/rpcs3qt/welcome_dialog.ui
new file mode 100644
index 0000000000..8cb3008675
--- /dev/null
+++ b/rpcs3/rpcs3qt/welcome_dialog.ui
@@ -0,0 +1,220 @@
+
+
+ welcome_dialog
+
+
+
+ 0
+ 0
+ 575
+ 300
+
+
+
+
+ 575
+ 300
+
+
+
+
+ 575
+ 300
+
+
+
+ Welcome to RPCS3
+
+
+
+ :/rpcs3.ico:/rpcs3.ico
+
+
+
+
+ 180
+ 22
+ 341
+ 31
+
+
+
+
+ 14
+ 50
+ false
+
+
+
+ RPCS3 PlayStation 3 Emulator
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+
+
+
+ 30
+ 0
+ 140
+ 140
+
+
+
+
+
+
+ :/Icons/insignia.png
+
+
+ true
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ 180
+ 53
+ 371
+ 71
+
+
+
+
+ true
+
+
+
+ <html><head/><body><p>RPCS3 is an open-source Sony PlayStation 3 emulator and debugger written in C++ for Windows and Linux funded with <a href="https://www.patreon.com/Nekotekina"><span style=" text-decoration: underline; color:#0000ff;">Patreon</span></a>. Our lead developers and contributors are always working hard to ensure this project can be the best that it can be. There are still plenty of implementations to be made and optimizations to be done.</p></body></html>
+
+
+ Qt::RichText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+ 30
+ 247
+ 75
+ 23
+
+
+
+ Continue
+
+
+
+
+
+ 30
+ 160
+ 521
+ 61
+
+
+
+
+ true
+
+
+
+ <html><head/><body><p>To get started, you must first install the <span style=" font-weight:600;">PlayStation 3 firmware</span>. Please refer to the <a href="https://rpcs3.net/quickstart"><span style=" text-decoration: underline; color:#0000ff;">Quickstart</span></a> guide found on the official website for further information. If you have any further questions, please refer to the <a href="https://rpcs3.net/faq"><span style=" text-decoration: underline; color:#0000ff;">FAQ</span></a>. Otherwise, further discussion and support can be found on the <a href="http://www.emunewz.net/forum/forumdisplay.php?fid=172"><span style=" text-decoration: underline; color:#0000ff;">Forums</span></a> or on our <a href="https://discord.me/RPCS3"><span style=" text-decoration: underline; color:#0000ff;">Discord</span></a> server.</p></body></html>
+
+
+ Qt::RichText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+ true
+
+
+
+
+
+ 40
+ 140
+ 501
+ 20
+
+
+
+ border-top:1px solid rgba(0,0,0,.2);
+
+
+
+
+
+
+
+
+ 30
+ 220
+ 521
+ 31
+
+
+
+
+ 8
+ 75
+ true
+
+
+
+ RPCS3 does not condone piracy. You must dump your own games.
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+
+
+
+ 114
+ 250
+ 181
+ 17
+
+
+
+ I have read the Quickstart guide
+
+
+
+
+
+ 300
+ 250
+ 121
+ 17
+
+
+
+ Do not show again
+
+
+
+
+
+
+
+
+
+
+