mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 01:27:00 +00:00
[WIP] Update Qt interface (#2336)
* Fix rpcs3qt Linux build * Files clean up * Add base MainWindow class * Add slot stubs * Update MainWindow::DecryptSPRXLibraries * Add SettingsDialog base class and tab stubs * Add CoreTab base layout * Add compile guards * Minor fixes * Add GraphicsTab base layout * Add OK button signal * Remove QML stuff * Fix indentation * Add AudioTab base layout * Add InputTab base layout * Fix layouts * Add MiscTab base layout * Fix layouts * Add NetworkingTab base layout * Add SystemTab base layout * Fix button layout in SettingsDialog * Make SettingsDialog resizable * Add base dock widget stubs * Add very base PadSettingsDialog layout * Add combo box entries * Abb LogFrame base layout * Fix indent * Abb GameListFrame base layout * Minor fixes * Add AutoPauseSettingsDialog base layout
This commit is contained in:
parent
d8dc4f4474
commit
74e806810d
49
rpcs3/rpcs3qt/AutoPauseSettingsDialog.cpp
Normal file
49
rpcs3/rpcs3qt/AutoPauseSettingsDialog.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QTableWidget>
|
||||
|
||||
#include "AutoPauseSettingsDialog.h"
|
||||
|
||||
AutoPauseSettingsDialog::AutoPauseSettingsDialog(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
QLabel *desc = new QLabel(tr("To use auto pause: enter the ID(s) of a function or a system call.\nRestart of the game is required to apply. You can enable/disable this in the settings."));
|
||||
|
||||
QTableWidget *pauseList = new QTableWidget;
|
||||
pauseList->setColumnCount(2);
|
||||
pauseList->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Call ID")));
|
||||
pauseList->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Type")));
|
||||
|
||||
QPushButton *clearButton = new QPushButton(tr("Clear"));
|
||||
|
||||
QPushButton *reloadButton = new QPushButton(tr("Reload"));
|
||||
|
||||
QPushButton *saveButton = new QPushButton(tr("Save"));
|
||||
connect(saveButton, &QAbstractButton::clicked, this, &QDialog::accept);
|
||||
|
||||
QPushButton *cancelButton = new QPushButton(tr("Cancel"));
|
||||
cancelButton->setDefault(true);
|
||||
connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close);
|
||||
|
||||
QHBoxLayout *buttonsLayout = new QHBoxLayout;
|
||||
buttonsLayout->addWidget(clearButton);
|
||||
buttonsLayout->addWidget(reloadButton);
|
||||
buttonsLayout->addStretch();
|
||||
buttonsLayout->addWidget(saveButton);
|
||||
buttonsLayout->addWidget(cancelButton);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
mainLayout->addWidget(desc);
|
||||
mainLayout->addWidget(pauseList);
|
||||
mainLayout->addLayout(buttonsLayout);
|
||||
setLayout(mainLayout);
|
||||
|
||||
setMinimumSize(QSize(400, 360));
|
||||
|
||||
setWindowTitle(tr("Auto Pause Manager"));
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
||||
|
14
rpcs3/rpcs3qt/AutoPauseSettingsDialog.h
Normal file
14
rpcs3/rpcs3qt/AutoPauseSettingsDialog.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef AUTOPAUSESETTINGSDIALOG_H
|
||||
#define AUTOPAUSESETTINGSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class AutoPauseSettingsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AutoPauseSettingsDialog(QWidget *parent = 0);
|
||||
};
|
||||
|
||||
#endif // AUTOPAUSESETTINGSDIALOG_H
|
44
rpcs3/rpcs3qt/audiotab.cpp
Normal file
44
rpcs3/rpcs3qt/audiotab.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QGroupBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "audiotab.h"
|
||||
|
||||
AudioTab::AudioTab(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
// Audio Out
|
||||
QGroupBox *audioOut = new QGroupBox(tr("Audio Out"));
|
||||
|
||||
QComboBox *audioOutBox = new QComboBox;
|
||||
audioOutBox->addItem(tr("Null"));
|
||||
#ifdef _WIN32
|
||||
audioOutBox->addItem(tr("XAudio2"));
|
||||
#endif // _WIN32
|
||||
audioOutBox->addItem(tr("OpenAL"));
|
||||
|
||||
QVBoxLayout *audioOutVbox = new QVBoxLayout;
|
||||
audioOutVbox->addWidget(audioOutBox);
|
||||
audioOut->setLayout(audioOutVbox);
|
||||
|
||||
// Checkboxes
|
||||
QCheckBox *audioDump = new QCheckBox(tr("Dump to file"));
|
||||
QCheckBox *conv = new QCheckBox(tr("Convert to 16 bit"));
|
||||
|
||||
// Main layout
|
||||
QVBoxLayout *vbox = new QVBoxLayout;
|
||||
vbox->addWidget(audioOut);
|
||||
vbox->addWidget(audioDump);
|
||||
vbox->addWidget(conv);
|
||||
vbox->addStretch();
|
||||
|
||||
QHBoxLayout *hbox = new QHBoxLayout;
|
||||
hbox->addLayout(vbox);
|
||||
hbox->addStretch();
|
||||
setLayout(hbox);
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
18
rpcs3/rpcs3qt/audiotab.h
Normal file
18
rpcs3/rpcs3qt/audiotab.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef AUDIOTAB_H
|
||||
#define AUDIOTAB_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class AudioTab : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AudioTab(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // AUDIOTAB_H
|
83
rpcs3/rpcs3qt/coretab.cpp
Normal file
83
rpcs3/rpcs3qt/coretab.cpp
Normal file
@ -0,0 +1,83 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QGroupBox>
|
||||
#include <QRadioButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QDebug>
|
||||
|
||||
#include "coretab.h"
|
||||
|
||||
CoreTab::CoreTab(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
// PPU Decoder
|
||||
QGroupBox *ppuDecoder = new QGroupBox(tr("PPU Decoder"));
|
||||
|
||||
QRadioButton *ppuRadio1 = new QRadioButton(tr("Interpreter (precise)"));
|
||||
QRadioButton *ppuRadio2 = new QRadioButton(tr("Interpreter (fast)"));
|
||||
QRadioButton *ppuRadio3 = new QRadioButton(tr("Recompiler (LLVM)"));
|
||||
|
||||
QVBoxLayout *ppuVbox = new QVBoxLayout;
|
||||
ppuVbox->addWidget(ppuRadio1);
|
||||
ppuVbox->addWidget(ppuRadio2);
|
||||
ppuVbox->addWidget(ppuRadio3);
|
||||
ppuDecoder->setLayout(ppuVbox);
|
||||
|
||||
// SPU Decoder
|
||||
QGroupBox *spuDecoder = new QGroupBox(tr("SPU Decoder"));
|
||||
|
||||
QRadioButton *spuRadio1 = new QRadioButton(tr("Interpreter (precise)"));
|
||||
QRadioButton *spuRadio2 = new QRadioButton(tr("Interpreter (fast)"));
|
||||
QRadioButton *spuRadio3 = new QRadioButton(tr("Recompiler (ASMJIT)"));
|
||||
QRadioButton *spuRadio4 = new QRadioButton(tr("Recompiler (LLVM)"));
|
||||
spuRadio4->setEnabled(false); // TODO
|
||||
|
||||
QVBoxLayout *spuVbox = new QVBoxLayout;
|
||||
spuVbox->addWidget(spuRadio1);
|
||||
spuVbox->addWidget(spuRadio2);
|
||||
spuVbox->addWidget(spuRadio3);
|
||||
spuVbox->addWidget(spuRadio4);
|
||||
spuDecoder->setLayout(spuVbox);
|
||||
|
||||
// Checkboxes
|
||||
QCheckBox *hookStFunc = new QCheckBox(tr("Hook static functions"));
|
||||
QCheckBox *loadLiblv2 = new QCheckBox(tr("Load liblv2.sprx only"));
|
||||
|
||||
// Load libraries
|
||||
QGroupBox *lle = new QGroupBox(tr("Load libraries"));
|
||||
|
||||
lleList = new QListWidget;
|
||||
searchBox = new QLineEdit;
|
||||
connect(searchBox, &QLineEdit::textChanged, this, &CoreTab::OnSearchBoxTextChanged);
|
||||
|
||||
QVBoxLayout *lleVbox = new QVBoxLayout;
|
||||
lleVbox->addWidget(lleList);
|
||||
lleVbox->addWidget(searchBox);
|
||||
lle->setLayout(lleVbox);
|
||||
|
||||
// Main layout
|
||||
QVBoxLayout *vbox = new QVBoxLayout;
|
||||
vbox->addWidget(ppuDecoder);
|
||||
vbox->addWidget(spuDecoder);
|
||||
vbox->addWidget(hookStFunc);
|
||||
vbox->addWidget(loadLiblv2);
|
||||
vbox->addStretch();
|
||||
|
||||
QHBoxLayout *hbox = new QHBoxLayout;
|
||||
hbox->addLayout(vbox);
|
||||
hbox->addWidget(lle);
|
||||
setLayout(hbox);
|
||||
}
|
||||
|
||||
void CoreTab::OnSearchBoxTextChanged()
|
||||
{
|
||||
if (searchBox->text().isEmpty())
|
||||
qDebug() << "Empty!";
|
||||
|
||||
lleList->clear();
|
||||
|
||||
QString searchTerm = searchBox->text().toLower();
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
23
rpcs3/rpcs3qt/coretab.h
Normal file
23
rpcs3/rpcs3qt/coretab.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef CORETAB_H
|
||||
#define CORETAB_H
|
||||
|
||||
#include <QLineEdit>
|
||||
#include <QListWidget>
|
||||
#include <QWidget>
|
||||
|
||||
class CoreTab : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CoreTab(QWidget *parent = 0);
|
||||
|
||||
private slots:
|
||||
void OnSearchBoxTextChanged();
|
||||
|
||||
private:
|
||||
QListWidget *lleList;
|
||||
QLineEdit *searchBox;
|
||||
};
|
||||
|
||||
#endif // CORETAB_H
|
10
rpcs3/rpcs3qt/debuggerframe.cpp
Normal file
10
rpcs3/rpcs3qt/debuggerframe.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include "debuggerframe.h"
|
||||
|
||||
DebuggerFrame::DebuggerFrame(QWidget *parent) : QDockWidget(tr("Debugger"), parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
14
rpcs3/rpcs3qt/debuggerframe.h
Normal file
14
rpcs3/rpcs3qt/debuggerframe.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef DEBUGGERFRAME_H
|
||||
#define DEBUGGERFRAME_H
|
||||
|
||||
#include <QDockWidget>
|
||||
|
||||
class DebuggerFrame : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DebuggerFrame(QWidget *parent = 0);
|
||||
};
|
||||
|
||||
#endif // DEBUGGERFRAME_H
|
20
rpcs3/rpcs3qt/gamelistframe.cpp
Normal file
20
rpcs3/rpcs3qt/gamelistframe.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include "gamelistframe.h"
|
||||
|
||||
GameListFrame::GameListFrame(QWidget *parent) : QDockWidget(tr("Game List"), parent)
|
||||
{
|
||||
gameList = new QTableWidget(this);
|
||||
gameList->setColumnCount(7);
|
||||
gameList->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Icon")));
|
||||
gameList->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Name")));
|
||||
gameList->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("Serial")));
|
||||
gameList->setHorizontalHeaderItem(3, new QTableWidgetItem(tr("FW")));
|
||||
gameList->setHorizontalHeaderItem(4, new QTableWidgetItem(tr("Version")));
|
||||
gameList->setHorizontalHeaderItem(5, new QTableWidgetItem(tr("Category")));
|
||||
gameList->setHorizontalHeaderItem(6, new QTableWidgetItem(tr("Path")));
|
||||
|
||||
setWidget(gameList);
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
18
rpcs3/rpcs3qt/gamelistframe.h
Normal file
18
rpcs3/rpcs3qt/gamelistframe.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef GAMELISTFRAME_H
|
||||
#define GAMELISTFRAME_H
|
||||
|
||||
#include <QDockWidget>
|
||||
#include <QTableWidget>
|
||||
|
||||
class GameListFrame : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GameListFrame(QWidget *parent = 0);
|
||||
|
||||
private:
|
||||
QTableWidget *gameList;
|
||||
};
|
||||
|
||||
#endif // GAMELISTFRAME_H
|
147
rpcs3/rpcs3qt/graphicstab.cpp
Normal file
147
rpcs3/rpcs3qt/graphicstab.cpp
Normal file
@ -0,0 +1,147 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QGroupBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <Windows.h>
|
||||
#undef GetHwnd
|
||||
#include <d3d12.h>
|
||||
#include <wrl/client.h>
|
||||
#include <dxgi1_4.h>
|
||||
#endif
|
||||
|
||||
#include "graphicstab.h"
|
||||
|
||||
GraphicsTab::GraphicsTab(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
// Render
|
||||
QGroupBox *render = new QGroupBox(tr("Render"));
|
||||
|
||||
QComboBox *renderBox = new QComboBox;
|
||||
renderBox->addItem(tr("Null"));
|
||||
renderBox->addItem(tr("Opengl"));
|
||||
#ifdef _MSC_VER
|
||||
renderBox->addItem(tr("D3D12"));
|
||||
#endif // _MSC_VER
|
||||
#ifdef _WIN32
|
||||
renderBox->addItem(tr("Vulkan"));
|
||||
#endif // _WIN32
|
||||
|
||||
QVBoxLayout *renderVbox = new QVBoxLayout;
|
||||
renderVbox->addWidget(renderBox);
|
||||
render->setLayout(renderVbox);
|
||||
|
||||
// Resolution
|
||||
QGroupBox *res = new QGroupBox(tr("Resolution"));
|
||||
|
||||
QComboBox *resBox = new QComboBox;
|
||||
resBox->addItem(tr("1920x1080"));
|
||||
resBox->addItem(tr("1280x720"));
|
||||
resBox->addItem(tr("720x480"));
|
||||
resBox->addItem(tr("1600x1080"));
|
||||
resBox->addItem(tr("1440x1080"));
|
||||
resBox->addItem(tr("1280x1080"));
|
||||
resBox->addItem(tr("960x1080"));
|
||||
|
||||
QVBoxLayout *resVbox = new QVBoxLayout;
|
||||
resVbox->addWidget(resBox);
|
||||
res->setLayout(resVbox);
|
||||
|
||||
// D3D Adapter
|
||||
QGroupBox *d3dAdapter = new QGroupBox(tr("D3D Adapter"));
|
||||
|
||||
QComboBox *d3dAdapterBox = new QComboBox;
|
||||
|
||||
QVBoxLayout *d3dAdapterVbox = new QVBoxLayout;
|
||||
d3dAdapterVbox->addWidget(d3dAdapterBox);
|
||||
d3dAdapter->setLayout(d3dAdapterVbox);
|
||||
|
||||
// Aspect ratio
|
||||
QGroupBox *aspect = new QGroupBox(tr("Aspect ratio"));
|
||||
|
||||
QComboBox *aspectBox = new QComboBox;
|
||||
aspectBox->addItem(tr("4x3"));
|
||||
aspectBox->addItem(tr("16x9"));
|
||||
|
||||
QVBoxLayout *aspectVbox = new QVBoxLayout;
|
||||
aspectVbox->addWidget(aspectBox);
|
||||
aspect->setLayout(aspectVbox);
|
||||
|
||||
// Frame limit
|
||||
QGroupBox *frameLimit = new QGroupBox(tr("Frame limit"));
|
||||
|
||||
QComboBox *frameLimitBox = new QComboBox;
|
||||
frameLimitBox->addItem(tr("Off"));
|
||||
frameLimitBox->addItem(tr("50"));
|
||||
frameLimitBox->addItem(tr("60"));
|
||||
frameLimitBox->addItem(tr("30"));
|
||||
frameLimitBox->addItem(tr("Auto"));
|
||||
|
||||
QVBoxLayout *frameLimitVbox = new QVBoxLayout;
|
||||
frameLimitVbox->addWidget(frameLimitBox);
|
||||
frameLimit->setLayout(frameLimitVbox);
|
||||
|
||||
// Checkboxes
|
||||
QCheckBox *dumpColor = new QCheckBox(tr("Write Color Buffers"));
|
||||
QCheckBox *readColor = new QCheckBox(tr("Read Color Buffers"));
|
||||
QCheckBox *dumpDepth = new QCheckBox(tr("Write Depth Buffer"));
|
||||
QCheckBox *readDepth = new QCheckBox(tr("Read Depth Buffer"));
|
||||
QCheckBox *glLegacyBuffers = new QCheckBox(tr("Use Legacy OpenGL Buffers"));
|
||||
QCheckBox *debugOutput = new QCheckBox(tr("Debug Output"));
|
||||
QCheckBox *debugOverlay = new QCheckBox(tr("Debug Overlay"));
|
||||
QCheckBox *logProg = new QCheckBox(tr("Log shader programs"));
|
||||
QCheckBox *vsync = new QCheckBox(tr("VSync"));
|
||||
|
||||
// Main layout
|
||||
QVBoxLayout *vbox1 = new QVBoxLayout;
|
||||
vbox1->addWidget(render);
|
||||
vbox1->addWidget(res);
|
||||
vbox1->addWidget(d3dAdapter);
|
||||
vbox1->addWidget(aspect);
|
||||
vbox1->addWidget(frameLimit);
|
||||
|
||||
QVBoxLayout *vbox2 = new QVBoxLayout;
|
||||
vbox2->addWidget(dumpColor);
|
||||
vbox2->addWidget(readColor);
|
||||
vbox2->addWidget(dumpDepth);
|
||||
vbox2->addWidget(readDepth);
|
||||
vbox2->addWidget(glLegacyBuffers);
|
||||
vbox2->addWidget(debugOutput);
|
||||
vbox2->addWidget(debugOverlay);
|
||||
vbox2->addWidget(logProg);
|
||||
vbox2->addWidget(vsync);
|
||||
vbox2->addStretch();
|
||||
|
||||
QHBoxLayout *hbox = new QHBoxLayout;
|
||||
hbox->addLayout(vbox1);
|
||||
hbox->addLayout(vbox2);
|
||||
setLayout(hbox);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
Microsoft::WRL::ComPtr<IDXGIFactory4> dxgi_factory;
|
||||
|
||||
if (SUCCEEDED(CreateDXGIFactory(IID_PPV_ARGS(&dxgi_factory))))
|
||||
{
|
||||
Microsoft::WRL::ComPtr<IDXGIAdapter> adapter;
|
||||
|
||||
for (UINT id = 0; dxgi_factory->EnumAdapters(id, adapter.ReleaseAndGetAddressOf()) != DXGI_ERROR_NOT_FOUND; id++)
|
||||
{
|
||||
DXGI_ADAPTER_DESC desc;
|
||||
adapter->GetDesc(&desc);
|
||||
d3dAdapterBox->addItem(QString::fromWCharArray(desc.Description));
|
||||
}
|
||||
|
||||
//pads.emplace_back(std::make_unique<combobox_pad>(cfg_location{ "Video", "D3D12", "Adapter" }, cbox_gs_d3d_adapter));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
d3dAdapter->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
18
rpcs3/rpcs3qt/graphicstab.h
Normal file
18
rpcs3/rpcs3qt/graphicstab.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef GRAPHICSTAB_H
|
||||
#define GRAPHICSTAB_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class GraphicsTab : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GraphicsTab(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // GRAPHICSTAB_H
|
90
rpcs3/rpcs3qt/inputtab.cpp
Normal file
90
rpcs3/rpcs3qt/inputtab.cpp
Normal file
@ -0,0 +1,90 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QGroupBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "inputtab.h"
|
||||
|
||||
InputTab::InputTab(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
// Pad Handler
|
||||
QGroupBox *padHandler = new QGroupBox(tr("Pad Handler"));
|
||||
|
||||
QComboBox *padHandlerBox = new QComboBox;
|
||||
padHandlerBox->addItem(tr("Null"));
|
||||
padHandlerBox->addItem(tr("Keyboard"));
|
||||
#ifdef _MSC_VER
|
||||
padHandlerBox->addItem(tr("XInput"));
|
||||
#endif // _MSC_VER
|
||||
|
||||
QVBoxLayout *padHandlerVbox = new QVBoxLayout;
|
||||
padHandlerVbox->addWidget(padHandlerBox);
|
||||
padHandler->setLayout(padHandlerVbox);
|
||||
|
||||
// Keyboard Handler
|
||||
QGroupBox *keyboardHandler = new QGroupBox(tr("Keyboard Handler"));
|
||||
|
||||
QComboBox *keyboardHandlerBox = new QComboBox;
|
||||
keyboardHandlerBox->addItem(tr("Null"));
|
||||
keyboardHandlerBox->addItem(tr("Basic"));
|
||||
|
||||
QVBoxLayout *keyboardHandlerVbox = new QVBoxLayout;
|
||||
keyboardHandlerVbox->addWidget(keyboardHandlerBox);
|
||||
keyboardHandler->setLayout(keyboardHandlerVbox);
|
||||
|
||||
// Mouse Handler
|
||||
QGroupBox *mouseHandler = new QGroupBox(tr("Mouse Handler"));
|
||||
|
||||
QComboBox *mouseHandlerBox = new QComboBox;
|
||||
mouseHandlerBox->addItem(tr("Null"));
|
||||
mouseHandlerBox->addItem(tr("Basic"));
|
||||
|
||||
QVBoxLayout *mouseHandlerVbox = new QVBoxLayout;
|
||||
mouseHandlerVbox->addWidget(mouseHandlerBox);
|
||||
mouseHandler->setLayout(mouseHandlerVbox);
|
||||
|
||||
// Camera
|
||||
QGroupBox *camera = new QGroupBox(tr("Camera"));
|
||||
|
||||
QComboBox *cameraBox = new QComboBox;
|
||||
cameraBox->addItem(tr("Null"));
|
||||
cameraBox->addItem(tr("Fake"));
|
||||
|
||||
QVBoxLayout *cameraVbox = new QVBoxLayout;
|
||||
cameraVbox->addWidget(cameraBox);
|
||||
camera->setLayout(cameraVbox);
|
||||
|
||||
// Camera type
|
||||
QGroupBox *cameraType = new QGroupBox(tr("Camera type"));
|
||||
|
||||
QComboBox *cameraTypeBox = new QComboBox;
|
||||
cameraTypeBox->addItem(tr("Unknown"));
|
||||
cameraTypeBox->addItem(tr("EyeToy"));
|
||||
cameraTypeBox->addItem(tr("PS Eye"));
|
||||
cameraTypeBox->addItem(tr("UVC 1.1"));
|
||||
|
||||
QVBoxLayout *cameraTypeVbox = new QVBoxLayout;
|
||||
cameraTypeVbox->addWidget(cameraTypeBox);
|
||||
cameraType->setLayout(cameraTypeVbox);
|
||||
|
||||
// Main layout
|
||||
QVBoxLayout *vbox1 = new QVBoxLayout;
|
||||
vbox1->addWidget(padHandler);
|
||||
vbox1->addWidget(keyboardHandler);
|
||||
vbox1->addWidget(mouseHandler);
|
||||
vbox1->addStretch();
|
||||
|
||||
QVBoxLayout *vbox2 = new QVBoxLayout;
|
||||
vbox2->addWidget(camera);
|
||||
vbox2->addWidget(cameraType);
|
||||
vbox2->addStretch();
|
||||
|
||||
QHBoxLayout *hbox = new QHBoxLayout;
|
||||
hbox->addLayout(vbox1);
|
||||
hbox->addLayout(vbox2);
|
||||
setLayout(hbox);
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
18
rpcs3/rpcs3qt/inputtab.h
Normal file
18
rpcs3/rpcs3qt/inputtab.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef INPUTTAB_H
|
||||
#define INPUTTAB_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class InputTab : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InputTab(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // INPUTTAB_H
|
38
rpcs3/rpcs3qt/logframe.cpp
Normal file
38
rpcs3/rpcs3qt/logframe.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include "logframe.h"
|
||||
|
||||
LogFrame::LogFrame(QWidget *parent) : QDockWidget(tr("Log"), parent)
|
||||
{
|
||||
tabWidget = new QTabWidget;
|
||||
|
||||
log = new QTextEdit(tabWidget);
|
||||
QPalette logPalette = log->palette();
|
||||
logPalette.setColor(QPalette::Base, Qt::black);
|
||||
log->setPalette(logPalette);
|
||||
log->setReadOnly(true);
|
||||
|
||||
tty = new QTextEdit(tabWidget);
|
||||
QPalette ttyPalette = log->palette();
|
||||
ttyPalette.setColor(QPalette::Base, Qt::black);
|
||||
ttyPalette.setColor(QPalette::Text, Qt::white);
|
||||
tty->setPalette(ttyPalette);
|
||||
tty->setReadOnly(true);
|
||||
|
||||
tabWidget->addTab(log, tr("Log"));
|
||||
tabWidget->addTab(tty, tr("TTY"));
|
||||
|
||||
setWidget(tabWidget);
|
||||
|
||||
// Check for updates every ~10 ms
|
||||
QTimer *timer = new QTimer(this);
|
||||
connect(timer, &QTimer::timeout, this, &LogFrame::Update);
|
||||
timer->start(10);
|
||||
}
|
||||
|
||||
void LogFrame::Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
25
rpcs3/rpcs3qt/logframe.h
Normal file
25
rpcs3/rpcs3qt/logframe.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef LOGFRAME_H
|
||||
#define LOGFRAME_H
|
||||
|
||||
#include <QDockWidget>
|
||||
#include <QTabWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QTimer>
|
||||
|
||||
class LogFrame : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LogFrame(QWidget *parent = 0);
|
||||
|
||||
private slots:
|
||||
void Update();
|
||||
|
||||
private:
|
||||
QTabWidget *tabWidget;
|
||||
QTextEdit *log;
|
||||
QTextEdit *tty;
|
||||
};
|
||||
|
||||
#endif // LOGFRAME_H
|
@ -1,18 +1,19 @@
|
||||
// Qt5.2+ frontend implementation for rpcs3. Known to work on Windows, Linux, Mac
|
||||
// by Sacha Refshauge
|
||||
#ifdef QT_UI
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
#include "glviewer.h"
|
||||
#include <QApplication>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication app(argc, argv);
|
||||
QApplication app(argc, argv);
|
||||
|
||||
qmlRegisterType<GLViewer>("GLViewer", 1, 0, "GLViewer");
|
||||
QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
|
||||
MainWindow mainWin;
|
||||
mainWin.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // QT_UI
|
||||
|
362
rpcs3/rpcs3qt/mainwindow.cpp
Normal file
362
rpcs3/rpcs3qt/mainwindow.cpp
Normal file
@ -0,0 +1,362 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QApplication>
|
||||
#include <QMenuBar>
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include <QDebug>
|
||||
#include <QVBoxLayout>
|
||||
#include <QDockWidget>
|
||||
|
||||
#include "gamelistframe.h"
|
||||
#include "debuggerframe.h"
|
||||
#include "logframe.h"
|
||||
#include "settingsdialog.h"
|
||||
#include "padsettingsdialog.h"
|
||||
#include "AutoPauseSettingsDialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
||||
{
|
||||
CreateActions();
|
||||
CreateMenus();
|
||||
CreateDockWindows();
|
||||
|
||||
setGeometry(0, 0, 900, 600);
|
||||
setWindowTitle("RPCS3 v");
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::BootElf()
|
||||
{
|
||||
bool stopped = false;
|
||||
|
||||
QFileDialog dlg(this, "Select (S)ELF", "", "(S)ELF files (*BOOT.BIN *.elf *.self);;"
|
||||
"ELF files (BOOT.BIN *.elf);;"
|
||||
"SELF files (EBOOT.BIN *.self);;"
|
||||
"BOOT files (*BOOT.BIN);;"
|
||||
"BIN files (*.bin);;"
|
||||
"All files (*.*)");
|
||||
dlg.setAcceptMode(QFileDialog::AcceptOpen);
|
||||
dlg.setFileMode(QFileDialog::ExistingFile);
|
||||
|
||||
if (dlg.exec() == QDialog::Rejected)
|
||||
{
|
||||
qDebug() << "Rejected!";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::BootGame()
|
||||
{
|
||||
bool stopped = false;
|
||||
|
||||
QFileDialog dlg(this, "Select game folder");
|
||||
dlg.setAcceptMode(QFileDialog::AcceptOpen);
|
||||
dlg.setFileMode(QFileDialog::Directory);
|
||||
dlg.setOptions(QFileDialog::ShowDirsOnly);
|
||||
|
||||
if (dlg.exec() == QDialog::Rejected)
|
||||
{
|
||||
qDebug() << "Rejected!";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::InstallPkg()
|
||||
{
|
||||
QFileDialog dlg(this, "Select PKG", "", "PKG files (*.pkg);;All files (*.*)");
|
||||
dlg.setAcceptMode(QFileDialog::AcceptOpen);
|
||||
dlg.setFileMode(QFileDialog::ExistingFile);
|
||||
|
||||
if (dlg.exec() == QDialog::Rejected)
|
||||
{
|
||||
qDebug() << "Rejected!";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::Pause()
|
||||
{
|
||||
qDebug() << "MainWindow::Pause()";
|
||||
}
|
||||
|
||||
void MainWindow::Stop()
|
||||
{
|
||||
qDebug() << "MainWindow::Stop()";
|
||||
}
|
||||
|
||||
void MainWindow::SendOpenSysMenu()
|
||||
{
|
||||
qDebug() << "MainWindow::SendOpenSysMenu()";
|
||||
}
|
||||
|
||||
void MainWindow::SendExit()
|
||||
{
|
||||
qDebug() << "MainWindow::SendExit()";
|
||||
}
|
||||
|
||||
void MainWindow::Settings()
|
||||
{
|
||||
SettingsDialog dlg(this);
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void MainWindow::PadSettings()
|
||||
{
|
||||
PadSettingsDialog dlg(this);
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void MainWindow::AutoPauseSettings()
|
||||
{
|
||||
AutoPauseSettingsDialog dlg(this);
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void MainWindow::VFSManager()
|
||||
{
|
||||
qDebug() << "MainWindow::VFSManager()";
|
||||
}
|
||||
|
||||
void MainWindow::VHDDManager()
|
||||
{
|
||||
qDebug() << "MainWindow::VHDDManager()";
|
||||
}
|
||||
|
||||
void MainWindow::SaveData()
|
||||
{
|
||||
qDebug() << "MainWindow::SaveData()";
|
||||
}
|
||||
|
||||
void MainWindow::ELFCompiler()
|
||||
{
|
||||
qDebug() << "MainWindow::ELFCompiler()";
|
||||
}
|
||||
|
||||
void MainWindow::CgDisasm()
|
||||
{
|
||||
qDebug() << "MainWindow::CgDisasm()";
|
||||
}
|
||||
|
||||
void MainWindow::KernelExplorer()
|
||||
{
|
||||
qDebug() << "MainWindow::KernelExplorer()";
|
||||
}
|
||||
|
||||
void MainWindow::MemoryViewer()
|
||||
{
|
||||
qDebug() << "MainWindow::MemoryViewer()";
|
||||
}
|
||||
|
||||
void MainWindow::RSXDebugger()
|
||||
{
|
||||
qDebug() << "MainWindow::RSXDebugger()";
|
||||
}
|
||||
|
||||
void MainWindow::StringSearch()
|
||||
{
|
||||
qDebug() << "MainWindow::StringSearch()";
|
||||
}
|
||||
|
||||
void MainWindow::DecryptSPRXLibraries()
|
||||
{
|
||||
QFileDialog dlg(this, "Select SPRX files", "", "SPRX files (*.sprx)");
|
||||
dlg.setAcceptMode(QFileDialog::AcceptOpen);
|
||||
dlg.setFileMode(QFileDialog::ExistingFiles);
|
||||
|
||||
if (dlg.exec() == QDialog::Rejected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList modules = dlg.selectedFiles();
|
||||
|
||||
qDebug() << "Decrypting SPRX libraries...";
|
||||
|
||||
for (QString& module : modules)
|
||||
{
|
||||
qDebug() << module;
|
||||
}
|
||||
|
||||
qDebug() << "Finished decrypting all SPRX libraries.";
|
||||
}
|
||||
|
||||
void MainWindow::About()
|
||||
{
|
||||
QString translatedTextAboutCaption;
|
||||
translatedTextAboutCaption = tr(
|
||||
"<h3>RPCS3</h3>"
|
||||
"<p>A PlayStation 3 emulator and debugger.<br>"
|
||||
"RPCS3 Version: VER_STUB</p>");
|
||||
QString translatedTextAboutText;
|
||||
translatedTextAboutText = tr(
|
||||
"<p>Developers: DH, AlexAltea, Hykem, Oil, Nekotekina, elisha464, Bigpet, vlj</p>"
|
||||
"<p>Thanks: BlackDaemon, Aishou, krofna, xsacha</p>"
|
||||
"<p>Please see "
|
||||
"<a href=\"https://%1/\">GitHub</a>, "
|
||||
"<a href=\"https://%2/\">Website</a>, "
|
||||
"<a href=\"http://%3/\">Forum</a> or "
|
||||
"<a href=\"https://%4/\">Patreon</a>"
|
||||
" for more information.</p>"
|
||||
).arg("github.com/RPCS3",
|
||||
"rpcs3.net",
|
||||
"www.emunewz.net/forum/forumdisplay.php?fid=172",
|
||||
"www.patreon.com/Nekotekina");
|
||||
|
||||
QMessageBox about(this);
|
||||
about.setStyleSheet("QLabel{min-width: 500px;}"); // ¯\_(ツ)_/¯
|
||||
about.setWindowTitle(tr("About RPCS3"));
|
||||
about.setText(translatedTextAboutCaption);
|
||||
about.setInformativeText(translatedTextAboutText);
|
||||
|
||||
about.exec();
|
||||
}
|
||||
|
||||
void MainWindow::CreateActions()
|
||||
{
|
||||
bootElfAct = new QAction(tr("Boot (S)ELF file"), this);
|
||||
connect(bootElfAct, &QAction::triggered, this, &MainWindow::BootElf);
|
||||
|
||||
bootGameAct = new QAction(tr("Boot &game"), this);
|
||||
connect(bootGameAct, &QAction::triggered, this, &MainWindow::BootGame);
|
||||
|
||||
bootInstallAct = new QAction(tr("&Install PKG"), this);
|
||||
connect(bootInstallAct, &QAction::triggered, this, &MainWindow::InstallPkg);
|
||||
|
||||
exitAct = new QAction(tr("E&xit"), this);
|
||||
exitAct->setShortcuts(QKeySequence::Quit);
|
||||
exitAct->setStatusTip(tr("Exit the application"));
|
||||
connect(exitAct, &QAction::triggered, this, &QWidget::close);
|
||||
|
||||
sysPauseAct = new QAction(tr("&Pause"), this);
|
||||
sysPauseAct->setEnabled(false);
|
||||
connect(sysPauseAct, &QAction::triggered, this, &MainWindow::Pause);
|
||||
|
||||
sysStopAct = new QAction(tr("&Stop"), this);
|
||||
sysStopAct->setShortcut(tr("Ctrl+S"));
|
||||
sysStopAct->setEnabled(false);
|
||||
connect(sysStopAct, &QAction::triggered, this, &MainWindow::Stop);
|
||||
|
||||
sysSendOpenMenuAct = new QAction(tr("Send &open system menu cmd"), this);
|
||||
sysSendOpenMenuAct->setEnabled(false);
|
||||
connect(sysSendOpenMenuAct, &QAction::triggered, this, &MainWindow::SendOpenSysMenu);
|
||||
|
||||
sysSendExitAct = new QAction(tr("Send &exit cmd"), this);
|
||||
sysSendExitAct->setEnabled(false);
|
||||
connect(sysSendExitAct, &QAction::triggered, this, &MainWindow::SendExit);
|
||||
|
||||
confSettingsAct = new QAction(tr("&Settings"), this);
|
||||
connect(confSettingsAct, &QAction::triggered, this, &MainWindow::Settings);
|
||||
|
||||
confPadAct = new QAction(tr("&PAD Settings"), this);
|
||||
connect(confPadAct, &QAction::triggered, this, &MainWindow::PadSettings);
|
||||
|
||||
confAutopauseManagerAct = new QAction(tr("&Auto Pause Settings"), this);
|
||||
connect(confAutopauseManagerAct, &QAction::triggered, this, &MainWindow::AutoPauseSettings);
|
||||
|
||||
confVfsManagerAct = new QAction(tr("Virtual &File System Manager"), this);
|
||||
confVfsManagerAct->setEnabled(false);
|
||||
connect(confVfsManagerAct, &QAction::triggered, this, &MainWindow::VFSManager);
|
||||
|
||||
confVhddManagerAct = new QAction(tr("Virtual &HDD Manager"), this);
|
||||
confVhddManagerAct->setEnabled(false);
|
||||
connect(confVhddManagerAct, &QAction::triggered, this, &MainWindow::VHDDManager);
|
||||
|
||||
confSavedataManagerAct = new QAction(tr("Save &Data Utility"), this);
|
||||
confSavedataManagerAct->setEnabled(false);
|
||||
connect(confSavedataManagerAct, &QAction::triggered, this, &MainWindow::SaveData);
|
||||
|
||||
toolsCompilerAct = new QAction(tr("&ELF Compiler"), this);
|
||||
toolsCompilerAct->setEnabled(false);
|
||||
connect(toolsCompilerAct, &QAction::triggered, this, &MainWindow::ELFCompiler);
|
||||
|
||||
toolsCgDisasmAct = new QAction(tr("&Cg Disasm"), this);
|
||||
toolsCgDisasmAct->setEnabled(false);
|
||||
connect(toolsCgDisasmAct, &QAction::triggered, this, &MainWindow::CgDisasm);
|
||||
|
||||
toolsKernelExplorerAct = new QAction(tr("&Kernel Explorer"), this);
|
||||
toolsKernelExplorerAct->setEnabled(false);
|
||||
connect(toolsKernelExplorerAct, &QAction::triggered, this, &MainWindow::KernelExplorer);
|
||||
|
||||
toolsMemoryViewerAct = new QAction(tr("&Memory Viewer"), this);
|
||||
toolsMemoryViewerAct->setEnabled(false);
|
||||
connect(toolsMemoryViewerAct, &QAction::triggered, this, &MainWindow::MemoryViewer);
|
||||
|
||||
toolsRsxDebuggerAct = new QAction(tr("&RSX Debugger"), this);
|
||||
toolsRsxDebuggerAct->setEnabled(false);
|
||||
connect(toolsRsxDebuggerAct, &QAction::triggered, this, &MainWindow::RSXDebugger);
|
||||
|
||||
toolsStringSearchAct = new QAction(tr("&String Search"), this);
|
||||
toolsStringSearchAct->setEnabled(false);
|
||||
connect(toolsStringSearchAct, &QAction::triggered, this, &MainWindow::StringSearch);
|
||||
|
||||
toolsSecryptSprxLibsAct = new QAction(tr("&Decrypt SPRX libraries"), this);
|
||||
connect(toolsSecryptSprxLibsAct, &QAction::triggered, this, &MainWindow::DecryptSPRXLibraries);
|
||||
|
||||
aboutAct = new QAction(tr("&About"), this);
|
||||
aboutAct->setStatusTip(tr("Show the application's About box"));
|
||||
connect(aboutAct, &QAction::triggered, this, &MainWindow::About);
|
||||
|
||||
aboutQtAct = new QAction(tr("About &Qt"), this);
|
||||
aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));
|
||||
connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
|
||||
}
|
||||
|
||||
void MainWindow::CreateMenus()
|
||||
{
|
||||
QMenu *bootMenu = menuBar()->addMenu(tr("&Boot"));
|
||||
bootMenu->addAction(bootElfAct);
|
||||
bootMenu->addAction(bootGameAct);
|
||||
bootMenu->addSeparator();
|
||||
bootMenu->addAction(bootInstallAct);
|
||||
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->addSeparator();
|
||||
confMenu->addAction(confVfsManagerAct);
|
||||
confMenu->addAction(confVhddManagerAct);
|
||||
confMenu->addAction(confSavedataManagerAct);
|
||||
|
||||
QMenu *toolsMenu = menuBar()->addMenu(tr("&Tools"));
|
||||
toolsMenu->addAction(toolsCompilerAct);
|
||||
toolsMenu->addAction(toolsCgDisasmAct);
|
||||
toolsMenu->addAction(toolsKernelExplorerAct);
|
||||
toolsMenu->addAction(toolsMemoryViewerAct);
|
||||
toolsMenu->addAction(toolsRsxDebuggerAct);
|
||||
toolsMenu->addAction(toolsStringSearchAct);
|
||||
toolsMenu->addSeparator();
|
||||
toolsMenu->addAction(toolsSecryptSprxLibsAct);
|
||||
|
||||
QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
|
||||
helpMenu->addAction(aboutAct);
|
||||
helpMenu->addAction(aboutQtAct);
|
||||
}
|
||||
|
||||
void MainWindow::CreateDockWindows()
|
||||
{
|
||||
GameListFrame *gameList = new GameListFrame(this);
|
||||
DebuggerFrame *debugger = new DebuggerFrame(this);
|
||||
LogFrame *log = new LogFrame(this);
|
||||
|
||||
addDockWidget(Qt::LeftDockWidgetArea, gameList);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, log);
|
||||
addDockWidget(Qt::RightDockWidgetArea, debugger);
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
69
rpcs3/rpcs3qt/mainwindow.h
Normal file
69
rpcs3/rpcs3qt/mainwindow.h
Normal file
@ -0,0 +1,69 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
signals:
|
||||
|
||||
private slots:
|
||||
void BootElf();
|
||||
void BootGame();
|
||||
void InstallPkg();
|
||||
void Pause();
|
||||
void Stop();
|
||||
void SendOpenSysMenu();
|
||||
void SendExit();
|
||||
void Settings();
|
||||
void PadSettings();
|
||||
void AutoPauseSettings();
|
||||
void VFSManager();
|
||||
void VHDDManager();
|
||||
void SaveData();
|
||||
void ELFCompiler();
|
||||
void CgDisasm();
|
||||
void KernelExplorer();
|
||||
void MemoryViewer();
|
||||
void RSXDebugger();
|
||||
void StringSearch();
|
||||
void DecryptSPRXLibraries();
|
||||
void About();
|
||||
|
||||
private:
|
||||
void CreateActions();
|
||||
void CreateMenus();
|
||||
void CreateDockWindows();
|
||||
|
||||
QAction *bootElfAct;
|
||||
QAction *bootGameAct;
|
||||
QAction *bootInstallAct;
|
||||
QAction *sysPauseAct;
|
||||
QAction *sysStopAct;
|
||||
QAction *sysSendOpenMenuAct;
|
||||
QAction *sysSendExitAct;
|
||||
QAction *confSettingsAct;
|
||||
QAction *confPadAct;
|
||||
QAction *confAutopauseManagerAct;
|
||||
QAction *confVfsManagerAct;
|
||||
QAction *confVhddManagerAct;
|
||||
QAction *confSavedataManagerAct;
|
||||
QAction *toolsCompilerAct;
|
||||
QAction *toolsCgDisasmAct;
|
||||
QAction *toolsKernelExplorerAct;
|
||||
QAction *toolsMemoryViewerAct;
|
||||
QAction *toolsRsxDebuggerAct;
|
||||
QAction *toolsStringSearchAct;
|
||||
QAction *toolsSecryptSprxLibsAct;
|
||||
QAction *exitAct;
|
||||
QAction *aboutAct;
|
||||
QAction *aboutQtAct;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
32
rpcs3/rpcs3qt/misctab.cpp
Normal file
32
rpcs3/rpcs3qt/misctab.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QGroupBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "misctab.h"
|
||||
|
||||
MiscTab::MiscTab(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
// Checkboxes
|
||||
QCheckBox *exitOnStop = new QCheckBox(tr("Exit RPCS3 when process finishes"));
|
||||
QCheckBox *alwaysStart = new QCheckBox(tr("Always start after boot"));
|
||||
QCheckBox *apSystemcall = new QCheckBox(tr("Auto Pause at System Call"));
|
||||
QCheckBox *apFunctioncall = new QCheckBox(tr("Auto Pause at Function Call"));
|
||||
|
||||
// Main layout
|
||||
QVBoxLayout *vbox = new QVBoxLayout;
|
||||
vbox->addWidget(exitOnStop);
|
||||
vbox->addWidget(alwaysStart);
|
||||
vbox->addWidget(apSystemcall);
|
||||
vbox->addWidget(apFunctioncall);
|
||||
vbox->addStretch(1);
|
||||
|
||||
QHBoxLayout *hbox = new QHBoxLayout;
|
||||
hbox->addLayout(vbox);
|
||||
hbox->addStretch(1);
|
||||
setLayout(hbox);
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
18
rpcs3/rpcs3qt/misctab.h
Normal file
18
rpcs3/rpcs3qt/misctab.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef MISCTAB_H
|
||||
#define MISCTAB_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class MiscTab : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MiscTab(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // MISCTAB_H
|
36
rpcs3/rpcs3qt/networkingtab.cpp
Normal file
36
rpcs3/rpcs3qt/networkingtab.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QGroupBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "networkingtab.h"
|
||||
|
||||
NetworkingTab::NetworkingTab(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
// Connection status
|
||||
QGroupBox *netStatus = new QGroupBox(tr("Connection status"));
|
||||
|
||||
QComboBox *netStatusBox = new QComboBox;
|
||||
netStatusBox->addItem(tr("Disconnected"));
|
||||
netStatusBox->addItem(tr("Connecting"));
|
||||
netStatusBox->addItem(tr("Obtaining IP"));
|
||||
netStatusBox->addItem(tr("IP obtained"));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
18
rpcs3/rpcs3qt/networkingtab.h
Normal file
18
rpcs3/rpcs3qt/networkingtab.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef NETWORKINGTAB_H
|
||||
#define NETWORKINGTAB_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class NetworkingTab : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit NetworkingTab(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // NETWORKINGTAB_H
|
107
rpcs3/rpcs3qt/padsettingsdialog.cpp
Normal file
107
rpcs3/rpcs3qt/padsettingsdialog.cpp
Normal file
@ -0,0 +1,107 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QGroupBox>
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "padsettingsdialog.h"
|
||||
|
||||
PadSettingsDialog::PadSettingsDialog(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
// Left Analog Stick
|
||||
QGroupBox *roundStickL = new QGroupBox(tr("Left Analog Stick"));
|
||||
|
||||
// D-Pad
|
||||
QGroupBox *roundPadControls = new QGroupBox(tr("D-Pad"));
|
||||
|
||||
// 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;
|
||||
roundPadShiftsLVbox->addWidget(roundPadL1);
|
||||
roundPadShiftsLVbox->addWidget(roundPadL2);
|
||||
roundPadShiftsLVbox->addWidget(roundPadL3);
|
||||
roundPadShiftsL->setLayout(roundPadShiftsLVbox);
|
||||
|
||||
// Start / Select
|
||||
QGroupBox *roundPadSystem = new QGroupBox(tr("System"));
|
||||
QGroupBox *roundPadSelect = new QGroupBox(tr("Select"));
|
||||
QGroupBox *roundPadStart = new QGroupBox(tr("Start"));
|
||||
|
||||
QVBoxLayout *roundPadSystemVbox = new QVBoxLayout;
|
||||
roundPadSystemVbox->addWidget(roundPadSelect);
|
||||
roundPadSystemVbox->addWidget(roundPadStart);
|
||||
roundPadSystem->setLayout(roundPadSystemVbox);
|
||||
|
||||
// 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;
|
||||
roundPadShiftsRVbox->addWidget(roundPadR1);
|
||||
roundPadShiftsRVbox->addWidget(roundPadR2);
|
||||
roundPadShiftsRVbox->addWidget(roundPadR3);
|
||||
roundPadShiftsR->setLayout(roundPadShiftsRVbox);
|
||||
|
||||
// Action buttons
|
||||
QGroupBox *roundPadButtons = 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"));
|
||||
|
||||
QHBoxLayout *roundPadButtonsHbox = new QHBoxLayout;
|
||||
roundPadButtonsHbox->addWidget(roundPadSquare);
|
||||
roundPadButtonsHbox->addWidget(roundPadCircle);
|
||||
|
||||
QVBoxLayout *roundPadButtonsVbox = new QVBoxLayout;
|
||||
roundPadButtonsVbox->addWidget(roundPadTriangle);
|
||||
roundPadButtonsVbox->addLayout(roundPadButtonsHbox);
|
||||
roundPadButtonsVbox->addWidget(roundPadCross);
|
||||
roundPadButtons->setLayout(roundPadButtonsVbox);
|
||||
|
||||
// Right Analog Stick
|
||||
QGroupBox *roundStickR = new QGroupBox(tr("Right Analog Stick"));
|
||||
|
||||
// Buttons
|
||||
QPushButton *defaultButton = new QPushButton(tr("By default"));
|
||||
|
||||
QPushButton *okButton = new QPushButton(tr("OK"));
|
||||
connect(okButton, &QAbstractButton::clicked, this, &QDialog::accept);
|
||||
|
||||
QPushButton *cancelButton = new QPushButton(tr("Cancel"));
|
||||
cancelButton->setDefault(true);
|
||||
connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close);
|
||||
|
||||
// Main layout
|
||||
QHBoxLayout *hbox1 = new QHBoxLayout;
|
||||
hbox1->addWidget(roundStickL);
|
||||
hbox1->addWidget(roundPadControls);
|
||||
hbox1->addWidget(roundPadShiftsL);
|
||||
hbox1->addWidget(roundPadSystem);
|
||||
hbox1->addWidget(roundPadShiftsR);
|
||||
hbox1->addWidget(roundPadButtons);
|
||||
hbox1->addWidget(roundStickR);
|
||||
|
||||
QHBoxLayout *hbox2 = new QHBoxLayout;
|
||||
hbox2->addWidget(defaultButton);
|
||||
hbox2->addStretch();
|
||||
hbox2->addWidget(okButton);
|
||||
hbox2->addWidget(cancelButton);
|
||||
|
||||
QVBoxLayout *vbox = new QVBoxLayout;
|
||||
vbox->addLayout(hbox1);
|
||||
vbox->addLayout(hbox2);
|
||||
setLayout(vbox);
|
||||
|
||||
setWindowTitle(tr("PAD Settings"));
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
14
rpcs3/rpcs3qt/padsettingsdialog.h
Normal file
14
rpcs3/rpcs3qt/padsettingsdialog.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef PADSETTINGS_H
|
||||
#define PADSETTINGS_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class PadSettingsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PadSettingsDialog(QWidget *parent = 0);
|
||||
};
|
||||
|
||||
#endif // PADSETTINGS_H
|
@ -1,5 +1,5 @@
|
||||
# Qt5.2+ project for rpcs3. Works on Windows, Linux and Mac OSX
|
||||
QT += gui opengl quick
|
||||
QT += gui opengl quick widgets
|
||||
CONFIG += c++11
|
||||
|
||||
TARGET = rpcs3-qt
|
||||
@ -16,9 +16,5 @@ DEFINES += QT_UI
|
||||
# Installation path
|
||||
# target.path =
|
||||
|
||||
OTHER_FILES += $$P/rpcs3qt/qml/*
|
||||
|
||||
RESOURCES += $$P/rpcs3qt/qml.qrc
|
||||
|
||||
# This line is needed for Qt 5.5 or higher
|
||||
win32:LIBS += opengl32.lib
|
||||
|
49
rpcs3/rpcs3qt/settingsdialog.cpp
Normal file
49
rpcs3/rpcs3qt/settingsdialog.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "coretab.h"
|
||||
#include "graphicstab.h"
|
||||
#include "audiotab.h"
|
||||
#include "inputtab.h"
|
||||
#include "misctab.h"
|
||||
#include "networkingtab.h"
|
||||
#include "systemtab.h"
|
||||
#include "settingsdialog.h"
|
||||
|
||||
SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
tabWidget = new QTabWidget;
|
||||
tabWidget->addTab(new CoreTab(this), tr("Core"));
|
||||
tabWidget->addTab(new GraphicsTab(this), tr("Graphics"));
|
||||
tabWidget->addTab(new AudioTab(this), tr("Audio"));
|
||||
tabWidget->addTab(new InputTab(this), tr("Input / Output"));
|
||||
tabWidget->addTab(new MiscTab(this), tr("Misc"));
|
||||
tabWidget->addTab(new NetworkingTab(this), tr("Networking"));
|
||||
tabWidget->addTab(new SystemTab(this), tr("System"));
|
||||
|
||||
QPushButton *okButton = new QPushButton(tr("OK"));
|
||||
connect(okButton, &QAbstractButton::clicked, this, &QDialog::accept);
|
||||
|
||||
QPushButton *cancelButton = new QPushButton(tr("Cancel"));
|
||||
cancelButton->setDefault(true);
|
||||
connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close);
|
||||
|
||||
QHBoxLayout *buttonsLayout = new QHBoxLayout;
|
||||
buttonsLayout->addStretch();
|
||||
buttonsLayout->addWidget(okButton);
|
||||
buttonsLayout->addWidget(cancelButton);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
mainLayout->addWidget(tabWidget);
|
||||
mainLayout->addLayout(buttonsLayout);
|
||||
setLayout(mainLayout);
|
||||
|
||||
cancelButton->setFocus();
|
||||
|
||||
setWindowTitle(tr("Settings"));
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
18
rpcs3/rpcs3qt/settingsdialog.h
Normal file
18
rpcs3/rpcs3qt/settingsdialog.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef SETTINGSDIALOG_H
|
||||
#define SETTINGSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QTabWidget>
|
||||
|
||||
class SettingsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SettingsDialog(QWidget *parent = 0);
|
||||
|
||||
private:
|
||||
QTabWidget *tabWidget;
|
||||
};
|
||||
|
||||
#endif // SETTINGSDIALOG_H
|
55
rpcs3/rpcs3qt/systemtab.cpp
Normal file
55
rpcs3/rpcs3qt/systemtab.cpp
Normal file
@ -0,0 +1,55 @@
|
||||
#ifdef QT_UI
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QGroupBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "systemtab.h"
|
||||
|
||||
SystemTab::SystemTab(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
// Language
|
||||
QGroupBox *sysLang = new QGroupBox(tr("Language"));
|
||||
|
||||
QComboBox *sysLangBox = new QComboBox;
|
||||
sysLangBox->addItem(tr("Japanese"));
|
||||
sysLangBox->addItem(tr("English (US)"));
|
||||
sysLangBox->addItem(tr("French"));
|
||||
sysLangBox->addItem(tr("Spanish"));
|
||||
sysLangBox->addItem(tr("German"));
|
||||
sysLangBox->addItem(tr("Italian"));
|
||||
sysLangBox->addItem(tr("Dutch"));
|
||||
sysLangBox->addItem(tr("Portuguese (PT)"));
|
||||
sysLangBox->addItem(tr("Russian"));
|
||||
sysLangBox->addItem(tr("Korean"));
|
||||
sysLangBox->addItem(tr("Chinese (Trad.)"));
|
||||
sysLangBox->addItem(tr("Chinese (Simp.)"));
|
||||
sysLangBox->addItem(tr("Finnish"));
|
||||
sysLangBox->addItem(tr("Swedish"));
|
||||
sysLangBox->addItem(tr("Danish"));
|
||||
sysLangBox->addItem(tr("Norwegian"));
|
||||
sysLangBox->addItem(tr("Polish"));
|
||||
sysLangBox->addItem(tr("English (UK)"));
|
||||
|
||||
QVBoxLayout *sysLangVbox = new QVBoxLayout;
|
||||
sysLangVbox->addWidget(sysLangBox);
|
||||
sysLang->setLayout(sysLangVbox);
|
||||
|
||||
// Checkboxes
|
||||
QCheckBox *enableHostRoot = new QCheckBox(tr("Enable /host_root/"));
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
#endif // QT_UI
|
18
rpcs3/rpcs3qt/systemtab.h
Normal file
18
rpcs3/rpcs3qt/systemtab.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef SYSTEMTAB_H
|
||||
#define SYSTEMTAB_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class SystemTab : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SystemTab(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // SYSTEMTAB_H
|
Loading…
x
Reference in New Issue
Block a user