From 63e46abdb8764bc97e91bae862c8d461e61b1965 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 8 Apr 2014 19:25:03 -0400 Subject: got rid of 'src' folders in each sub-project --- src/citra_qt/bootmanager.cpp | 206 ++++++++++++++ src/citra_qt/bootmanager.hxx | 112 ++++++++ src/citra_qt/callstack.cpp | 36 +++ src/citra_qt/callstack.hxx | 20 ++ src/citra_qt/callstack.ui | 36 +++ src/citra_qt/config/controller_config.cpp | 91 ++++++ src/citra_qt/config/controller_config.hxx | 52 ++++ src/citra_qt/config/controller_config.ui | 308 +++++++++++++++++++++ src/citra_qt/config/controller_config_util.cpp | 121 ++++++++ src/citra_qt/config/controller_config_util.hxx | 78 ++++++ src/citra_qt/config/ui_controller_config.h | 222 +++++++++++++++ src/citra_qt/cpu_regs.cpp | 63 +++++ src/citra_qt/cpu_regs.hxx | 27 ++ src/citra_qt/cpu_regs.ui | 40 +++ src/citra_qt/disasm.cpp | 135 +++++++++ src/citra_qt/disasm.hxx | 42 +++ src/citra_qt/disasm.ui | 78 ++++++ src/citra_qt/hotkeys.cpp | 111 ++++++++ src/citra_qt/hotkeys.hxx | 50 ++++ src/citra_qt/hotkeys.ui | 89 ++++++ src/citra_qt/main.cpp | 230 +++++++++++++++ src/citra_qt/main.hxx | 51 ++++ src/citra_qt/main.ui | 168 +++++++++++ src/citra_qt/ramview.cpp | 13 + src/citra_qt/ramview.hxx | 12 + src/citra_qt/src/bootmanager.cpp | 206 -------------- src/citra_qt/src/bootmanager.hxx | 112 -------- src/citra_qt/src/callstack.cpp | 36 --- src/citra_qt/src/callstack.hxx | 20 -- src/citra_qt/src/callstack.ui | 36 --- src/citra_qt/src/config/controller_config.cpp | 91 ------ src/citra_qt/src/config/controller_config.hxx | 52 ---- src/citra_qt/src/config/controller_config.ui | 308 --------------------- src/citra_qt/src/config/controller_config_util.cpp | 121 -------- src/citra_qt/src/config/controller_config_util.hxx | 78 ------ src/citra_qt/src/config/ui_controller_config.h | 222 --------------- src/citra_qt/src/cpu_regs.cpp | 63 ----- src/citra_qt/src/cpu_regs.hxx | 27 -- src/citra_qt/src/cpu_regs.ui | 40 --- src/citra_qt/src/disasm.cpp | 135 --------- src/citra_qt/src/disasm.hxx | 42 --- src/citra_qt/src/disasm.ui | 78 ------ src/citra_qt/src/hotkeys.cpp | 111 -------- src/citra_qt/src/hotkeys.hxx | 50 ---- src/citra_qt/src/hotkeys.ui | 89 ------ src/citra_qt/src/main.cpp | 230 --------------- src/citra_qt/src/main.hxx | 51 ---- src/citra_qt/src/main.ui | 168 ----------- src/citra_qt/src/ramview.cpp | 13 - src/citra_qt/src/ramview.hxx | 12 - src/citra_qt/src/ui_callstack.h | 68 ----- src/citra_qt/src/ui_cpu_regs.h | 69 ----- src/citra_qt/src/ui_disasm.h | 112 -------- src/citra_qt/src/ui_gfx_fifo_player.h | 209 -------------- src/citra_qt/src/ui_hotkeys.h | 77 ------ src/citra_qt/src/ui_image_info.h | 154 ----------- src/citra_qt/src/ui_main.h | 148 ---------- src/citra_qt/src/ui_welcome_wizard.h | 124 --------- src/citra_qt/src/version.h | 7 - src/citra_qt/ui_callstack.h | 68 +++++ src/citra_qt/ui_cpu_regs.h | 69 +++++ src/citra_qt/ui_disasm.h | 112 ++++++++ src/citra_qt/ui_gfx_fifo_player.h | 209 ++++++++++++++ src/citra_qt/ui_hotkeys.h | 77 ++++++ src/citra_qt/ui_image_info.h | 154 +++++++++++ src/citra_qt/ui_main.h | 148 ++++++++++ src/citra_qt/ui_welcome_wizard.h | 124 +++++++++ src/citra_qt/version.h | 7 + 68 files changed, 3359 insertions(+), 3359 deletions(-) create mode 100644 src/citra_qt/bootmanager.cpp create mode 100644 src/citra_qt/bootmanager.hxx create mode 100644 src/citra_qt/callstack.cpp create mode 100644 src/citra_qt/callstack.hxx create mode 100644 src/citra_qt/callstack.ui create mode 100644 src/citra_qt/config/controller_config.cpp create mode 100644 src/citra_qt/config/controller_config.hxx create mode 100644 src/citra_qt/config/controller_config.ui create mode 100644 src/citra_qt/config/controller_config_util.cpp create mode 100644 src/citra_qt/config/controller_config_util.hxx create mode 100644 src/citra_qt/config/ui_controller_config.h create mode 100644 src/citra_qt/cpu_regs.cpp create mode 100644 src/citra_qt/cpu_regs.hxx create mode 100644 src/citra_qt/cpu_regs.ui create mode 100644 src/citra_qt/disasm.cpp create mode 100644 src/citra_qt/disasm.hxx create mode 100644 src/citra_qt/disasm.ui create mode 100644 src/citra_qt/hotkeys.cpp create mode 100644 src/citra_qt/hotkeys.hxx create mode 100644 src/citra_qt/hotkeys.ui create mode 100644 src/citra_qt/main.cpp create mode 100644 src/citra_qt/main.hxx create mode 100644 src/citra_qt/main.ui create mode 100644 src/citra_qt/ramview.cpp create mode 100644 src/citra_qt/ramview.hxx delete mode 100644 src/citra_qt/src/bootmanager.cpp delete mode 100644 src/citra_qt/src/bootmanager.hxx delete mode 100644 src/citra_qt/src/callstack.cpp delete mode 100644 src/citra_qt/src/callstack.hxx delete mode 100644 src/citra_qt/src/callstack.ui delete mode 100644 src/citra_qt/src/config/controller_config.cpp delete mode 100644 src/citra_qt/src/config/controller_config.hxx delete mode 100644 src/citra_qt/src/config/controller_config.ui delete mode 100644 src/citra_qt/src/config/controller_config_util.cpp delete mode 100644 src/citra_qt/src/config/controller_config_util.hxx delete mode 100644 src/citra_qt/src/config/ui_controller_config.h delete mode 100644 src/citra_qt/src/cpu_regs.cpp delete mode 100644 src/citra_qt/src/cpu_regs.hxx delete mode 100644 src/citra_qt/src/cpu_regs.ui delete mode 100644 src/citra_qt/src/disasm.cpp delete mode 100644 src/citra_qt/src/disasm.hxx delete mode 100644 src/citra_qt/src/disasm.ui delete mode 100644 src/citra_qt/src/hotkeys.cpp delete mode 100644 src/citra_qt/src/hotkeys.hxx delete mode 100644 src/citra_qt/src/hotkeys.ui delete mode 100644 src/citra_qt/src/main.cpp delete mode 100644 src/citra_qt/src/main.hxx delete mode 100644 src/citra_qt/src/main.ui delete mode 100644 src/citra_qt/src/ramview.cpp delete mode 100644 src/citra_qt/src/ramview.hxx delete mode 100644 src/citra_qt/src/ui_callstack.h delete mode 100644 src/citra_qt/src/ui_cpu_regs.h delete mode 100644 src/citra_qt/src/ui_disasm.h delete mode 100644 src/citra_qt/src/ui_gfx_fifo_player.h delete mode 100644 src/citra_qt/src/ui_hotkeys.h delete mode 100644 src/citra_qt/src/ui_image_info.h delete mode 100644 src/citra_qt/src/ui_main.h delete mode 100644 src/citra_qt/src/ui_welcome_wizard.h delete mode 100644 src/citra_qt/src/version.h create mode 100644 src/citra_qt/ui_callstack.h create mode 100644 src/citra_qt/ui_cpu_regs.h create mode 100644 src/citra_qt/ui_disasm.h create mode 100644 src/citra_qt/ui_gfx_fifo_player.h create mode 100644 src/citra_qt/ui_hotkeys.h create mode 100644 src/citra_qt/ui_image_info.h create mode 100644 src/citra_qt/ui_main.h create mode 100644 src/citra_qt/ui_welcome_wizard.h create mode 100644 src/citra_qt/version.h (limited to 'src/citra_qt') diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp new file mode 100644 index 00000000..095856dc --- /dev/null +++ b/src/citra_qt/bootmanager.cpp @@ -0,0 +1,206 @@ +#include +#include + +#include "common.h" +#include "bootmanager.hxx" + +#include "core.h" +#include "loader.h" + +#include "version.h" + +#define APP_NAME "citra" +#define APP_VERSION "0.1-" VERSION +#define APP_TITLE APP_NAME " " APP_VERSION +#define COPYRIGHT "Copyright (C) 2013-2014 Citra Team" + +EmuThread::EmuThread(GRenderWindow* render_window) : exec_cpu_step(false), cpu_running(false), render_window(render_window) +{ +} + +void EmuThread::SetFilename(const char* filename) +{ + strcpy(this->filename, filename); +} + +void EmuThread::run() +{ + while (true) + { + for (int tight_loop = 0; tight_loop < 10000; ++tight_loop) + { + if (cpu_running || exec_cpu_step) + { + if (exec_cpu_step) + exec_cpu_step = false; + + Core::SingleStep(); + emit CPUStepped(); + } + } + } + + Core::Stop(); +} + +void EmuThread::Stop() +{ + if (!isRunning()) + { + INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning..."); + return; + } + + //core::g_state = core::SYS_DIE; + + wait(1000); + if (isRunning()) + { + WARN_LOG(MASTER_LOG, "EmuThread still running, terminating..."); + terminate(); + wait(1000); + if (isRunning()) + WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here..."); + } + INFO_LOG(MASTER_LOG, "EmuThread stopped"); +} + + +// This class overrides paintEvent and resizeEvent to prevent the GUI thread from stealing GL context. +// The corresponding functionality is handled in EmuThread instead +class GGLWidgetInternal : public QGLWidget +{ +public: + GGLWidgetInternal(GRenderWindow* parent) : QGLWidget(parent) + { + setAutoBufferSwap(false); + doneCurrent(); + parent_ = parent; + } + + void paintEvent(QPaintEvent* ev) + { + // Apparently, Windows doesn't display anything if we don't call this here. + // TODO: Breaks linux though because we aren't calling doneCurrent() ... -.- +// makeCurrent(); + } + void resizeEvent(QResizeEvent* ev) { + parent_->set_client_area_width(size().width()); + parent_->set_client_area_height(size().height()); + } +private: + GRenderWindow* parent_; +}; + + +EmuThread& GRenderWindow::GetEmuThread() +{ + return emu_thread; +} + +GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this) +{ + // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose + + child = new GGLWidgetInternal(this); + + QBoxLayout* layout = new QHBoxLayout(this); + resize(640, 480); // TODO: Load size from config instead + layout->addWidget(child); + layout->setMargin(0); + setLayout(layout); + + BackupGeometry(); +} + +GRenderWindow::~GRenderWindow() +{ + emu_thread.Stop(); +} + +void GRenderWindow::SwapBuffers() +{ + child->makeCurrent(); // TODO: Not necessary? + child->swapBuffers(); +} + +void GRenderWindow::closeEvent(QCloseEvent* event) +{ + emu_thread.Stop(); + QWidget::closeEvent(event); +} + +void GRenderWindow::MakeCurrent() +{ + child->makeCurrent(); +} + +void GRenderWindow::DoneCurrent() +{ + child->doneCurrent(); +} + +void GRenderWindow::PollEvents() { + // TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title + // from the main thread, but this should probably be in an event handler... + /* + static char title[128]; + sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(), + video_core::g_renderer->current_fps()); + setWindowTitle(title); + */ +} + +void GRenderWindow::BackupGeometry() +{ + geometry = ((QGLWidget*)this)->saveGeometry(); +} + +void GRenderWindow::RestoreGeometry() +{ + // We don't want to back up the geometry here (obviously) + QWidget::restoreGeometry(geometry); +} + +void GRenderWindow::restoreGeometry(const QByteArray& geometry) +{ + // Make sure users of this class don't need to deal with backing up the geometry themselves + QWidget::restoreGeometry(geometry); + BackupGeometry(); +} + +QByteArray GRenderWindow::saveGeometry() +{ + // If we are a top-level widget, store the current geometry + // otherwise, store the last backup + if (parent() == NULL) + return ((QGLWidget*)this)->saveGeometry(); + else + return geometry; +} + +void GRenderWindow::keyPressEvent(QKeyEvent* event) +{ + /* + bool key_processed = false; + for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel) + if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::PRESSED)) + key_processed = true; + + if (!key_processed) + QWidget::keyPressEvent(event); + */ +} + +void GRenderWindow::keyReleaseEvent(QKeyEvent* event) +{ + /* + bool key_processed = false; + for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel) + if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::RELEASED)) + key_processed = true; + + if (!key_processed) + QWidget::keyPressEvent(event); + */ +} \ No newline at end of file diff --git a/src/citra_qt/bootmanager.hxx b/src/citra_qt/bootmanager.hxx new file mode 100644 index 00000000..b3aa1cf3 --- /dev/null +++ b/src/citra_qt/bootmanager.hxx @@ -0,0 +1,112 @@ +#include +#include +#include "common.h" +#include "emu_window.h" + +class GRenderWindow; +class QKeyEvent; + +class EmuThread : public QThread +{ + Q_OBJECT + +public: + /** + * Set image filename + * + * @param filename + * @warning Only call when not running! + */ + void SetFilename(const char* filename); + + /** + * Start emulation (on new thread) + * + * @warning Only call when not running! + */ + void run(); + + /** + * Allow the CPU to process a single instruction (if cpu is not running) + * + * @note This function is thread-safe + */ + void ExecStep() { exec_cpu_step = true; } + + /** + * Allow the CPU to continue processing instructions without interruption + * + * @note This function is thread-safe + */ + void SetCpuRunning(bool running) { cpu_running = running; } + + /** + * Allow the CPU to continue processing instructions without interruption + * + * @note This function is thread-safe + */ + bool IsCpuRunning() { return cpu_running; } + + +public slots: + /** + * Stop emulation and wait for the thread to finish. + * + * @details: This function will wait a second for the thread to finish; if it hasn't finished until then, we'll terminate() it and wait another second, hoping that it will be terminated by then. + * @note: This function is thread-safe. + */ + void Stop(); + +private: + friend class GRenderWindow; + + EmuThread(GRenderWindow* render_window); + + char filename[MAX_PATH]; + + bool exec_cpu_step; + bool cpu_running; + + GRenderWindow* render_window; + +signals: + /** + * Emitted when CPU when we've finished processing a single Gekko instruction + * + * @warning This will only be emitted when the CPU is not running (SetCpuRunning(false)) + * @warning When connecting to this signal from other threads, make sure to specify either Qt::QueuedConnection (invoke slot within the destination object's message thread) or even Qt::BlockingQueuedConnection (additionally block source thread until slot returns) + */ + void CPUStepped(); +}; + +class GRenderWindow : public QWidget, public EmuWindow +{ +public: + GRenderWindow(QWidget* parent = NULL); + ~GRenderWindow(); + + void closeEvent(QCloseEvent*); + + // EmuWindow implementation + void SwapBuffers(); + void MakeCurrent(); + void DoneCurrent(); + void PollEvents(); + + void BackupGeometry(); + void RestoreGeometry(); + void restoreGeometry(const QByteArray& geometry); // overridden + QByteArray saveGeometry(); // overridden + + EmuThread& GetEmuThread(); + + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + +private: + QGLWidget* child; + + EmuThread emu_thread; + + QByteArray geometry; +}; diff --git a/src/citra_qt/callstack.cpp b/src/citra_qt/callstack.cpp new file mode 100644 index 00000000..2d62cb0d --- /dev/null +++ b/src/citra_qt/callstack.cpp @@ -0,0 +1,36 @@ +#include +#include "callstack.hxx" + +//#include "debugger/debugger.h" + +GCallstackView::GCallstackView(QWidget* parent): QDockWidget(parent) +{ + ui.setupUi(this); + + callstack_model = new QStandardItemModel(this); + callstack_model->setColumnCount(3); + callstack_model->setHeaderData(0, Qt::Horizontal, "Depth"); + callstack_model->setHeaderData(1, Qt::Horizontal, "Address"); + callstack_model->setHeaderData(2, Qt::Horizontal, "Function Name"); + ui.treeView->setModel(callstack_model); + + // TODO: Make single clicking a callstack entry jump to the corresponding disassembly position +} + +void GCallstackView::OnCPUStepped() +{ + /* + Debugger::Callstack callstack; + Debugger::GetCallstack(callstack); + callstack_model->setRowCount(callstack.size()); + + for (int i = 0; i < callstack.size(); ++i) + for (Debugger::CallstackIterator it = callstack.begin(); it != callstack.end(); ++it) + { + Debugger::CallstackEntry entry = callstack[i]; + callstack_model->setItem(i, 0, new QStandardItem(QString("%1").arg(i+1))); + callstack_model->setItem(i, 1, new QStandardItem(QString("0x%1").arg(entry.addr, 8, 16, QLatin1Char('0')))); + callstack_model->setItem(i, 2, new QStandardItem(QString::fromStdString(entry.name))); + } + */ +} \ No newline at end of file diff --git a/src/citra_qt/callstack.hxx b/src/citra_qt/callstack.hxx new file mode 100644 index 00000000..60b24f23 --- /dev/null +++ b/src/citra_qt/callstack.hxx @@ -0,0 +1,20 @@ +#include +#include "ui_callstack.h" +#include "platform.h" + +class QStandardItemModel; + +class GCallstackView : public QDockWidget +{ + Q_OBJECT + +public: + GCallstackView(QWidget* parent = 0); + +public slots: + void OnCPUStepped(); + +private: + Ui::CallStack ui; + QStandardItemModel* callstack_model; +}; diff --git a/src/citra_qt/callstack.ui b/src/citra_qt/callstack.ui new file mode 100644 index 00000000..b3c4db63 --- /dev/null +++ b/src/citra_qt/callstack.ui @@ -0,0 +1,36 @@ + + + CallStack + + + + 0 + 0 + 400 + 300 + + + + Call stack + + + + + + + true + + + false + + + false + + + + + + + + + diff --git a/src/citra_qt/config/controller_config.cpp b/src/citra_qt/config/controller_config.cpp new file mode 100644 index 00000000..52dfb627 --- /dev/null +++ b/src/citra_qt/config/controller_config.cpp @@ -0,0 +1,91 @@ +#include + +#include "controller_config.hxx" +#include "controller_config_util.hxx" + +/* TODO(bunnei): ImplementMe + +using common::Config; + +GControllerConfig::GControllerConfig(common::Config::ControllerPort* initial_config, QWidget* parent) : QWidget(parent) +{ + ui.setupUi(this); + ((QGridLayout*)ui.mainStickTab->layout())->addWidget(new GStickConfig(Config::ANALOG_LEFT, Config::ANALOG_RIGHT, Config::ANALOG_UP, Config::ANALOG_DOWN, this, this), 1, 1); + ((QGridLayout*)ui.cStickTab->layout())->addWidget(new GStickConfig(Config::C_LEFT, Config::C_RIGHT, Config::C_UP, Config::C_DOWN, this, this), 1, 1); + ((QGridLayout*)ui.dPadTab->layout())->addWidget(new GStickConfig(Config::DPAD_LEFT, Config::DPAD_RIGHT, Config::DPAD_UP, Config::DPAD_DOWN, this, this), 1, 1); + + // TODO: Arrange these more compactly? + QVBoxLayout* layout = (QVBoxLayout*)ui.buttonsTab->layout(); + layout->addWidget(new GButtonConfigGroup("A Button", Config::BUTTON_A, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("B Button", Config::BUTTON_B, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("X Button", Config::BUTTON_X, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("Y Button", Config::BUTTON_Y, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("Z Button", Config::BUTTON_Z, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("L Trigger", Config::TRIGGER_L, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("R Trigger", Config::TRIGGER_R, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("Start Button", Config::BUTTON_START, this, ui.buttonsTab)); + + memcpy(config, initial_config, sizeof(config)); + + emit ActivePortChanged(config[0]); +} + +void GControllerConfig::OnKeyConfigChanged(common::Config::Control id, int key, const QString& name) +{ + if (InputSourceJoypad()) + { + config[GetActiveController()].pads.key_code[id] = key; + } + else + { + config[GetActiveController()].keys.key_code[id] = key; + } + emit ActivePortChanged(config[GetActiveController()]); +} + +int GControllerConfig::GetActiveController() +{ + return ui.activeControllerCB->currentIndex(); +} + +bool GControllerConfig::InputSourceJoypad() +{ + return ui.inputSourceCB->currentIndex() == 1; +} + +GControllerConfigDialog::GControllerConfigDialog(common::Config::ControllerPort* controller_ports, QWidget* parent) : QDialog(parent), config_ptr(controller_ports) +{ + setWindowTitle(tr("Input configuration")); + + QVBoxLayout* layout = new QVBoxLayout(this); + config_widget = new GControllerConfig(controller_ports, this); + layout->addWidget(config_widget); + + QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + layout->addWidget(buttons); + + connect(buttons, SIGNAL(rejected()), this, SLOT(reject())); + connect(buttons, SIGNAL(accepted()), this, SLOT(accept())); + + connect(this, SIGNAL(accepted()), this, SLOT(EnableChanges())); + + layout->setSizeConstraint(QLayout::SetFixedSize); + setLayout(layout); + setModal(true); + show(); +} + +void GControllerConfigDialog::EnableChanges() +{ + for (unsigned int i = 0; i < 4; ++i) + { + memcpy(&config_ptr[i], &config_widget->GetControllerConfig(i), sizeof(common::Config::ControllerPort)); + + if (common::g_config) { + // Apply changes if running a game + memcpy(&common::g_config->controller_ports(i), &config_widget->GetControllerConfig(i), sizeof(common::Config::ControllerPort)); + } + } +} + +*/ \ No newline at end of file diff --git a/src/citra_qt/config/controller_config.hxx b/src/citra_qt/config/controller_config.hxx new file mode 100644 index 00000000..9ff86a11 --- /dev/null +++ b/src/citra_qt/config/controller_config.hxx @@ -0,0 +1,52 @@ +#ifndef _CONTROLLER_CONFIG_HXX_ +#define _CONTROLLER_CONFIG_HXX_ + +#include + +#include "ui_controller_config.h" + +/* TODO(bunnei): ImplementMe + +#include "config.h" + +class GControllerConfig : public QWidget +{ + Q_OBJECT + +public: + GControllerConfig(common::Config::ControllerPort* initial_config, QWidget* parent = NULL); + + const common::Config::ControllerPort& GetControllerConfig(int index) const { return config[index]; } + +signals: + void ActivePortChanged(const common::Config::ControllerPort&); + +public slots: + void OnKeyConfigChanged(common::Config::Control id, int key, const QString& name); + +private: + int GetActiveController(); + bool InputSourceJoypad(); + + Ui::ControllerConfig ui; + common::Config::ControllerPort config[4]; +}; + +class GControllerConfigDialog : public QDialog +{ + Q_OBJECT + +public: + GControllerConfigDialog(common::Config::ControllerPort* controller_ports, QWidget* parent = NULL); + +public slots: + void EnableChanges(); + +private: + GControllerConfig* config_widget; + common::Config::ControllerPort* config_ptr; +}; + +*/ + +#endif // _CONTROLLER_CONFIG_HXX_ diff --git a/src/citra_qt/config/controller_config.ui b/src/citra_qt/config/controller_config.ui new file mode 100644 index 00000000..9f650047 --- /dev/null +++ b/src/citra_qt/config/controller_config.ui @@ -0,0 +1,308 @@ + + + ControllerConfig + + + + 0 + 0 + 503 + 293 + + + + + 0 + 0 + + + + Controller Configuration + + + + QLayout::SetFixedSize + + + + + + + + Controller 1 + + + + + Controller 2 + + + + + Controller 3 + + + + + Controller 4 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Enabled + + + + + + + + Keyboard + + + + + Joypad + + + + + + + + Active Controller: + + + + + + + Input Source: + + + + + + + + + 0 + + + + Main Stick + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + C-Stick + + + + + + Qt::Horizontal + + + + 40 + 0 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + D-Pad + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + Buttons + + + + + + + + + + + ControlsChanged() + MainStickCleared() + CStickCleared() + DPadCleared() + ButtonsCleared() + OnControlsChanged() + OnMainStickCleared() + OnCStickCleared() + OnDPadCleared() + OnButtonsCleared() + + diff --git a/src/citra_qt/config/controller_config_util.cpp b/src/citra_qt/config/controller_config_util.cpp new file mode 100644 index 00000000..c5426570 --- /dev/null +++ b/src/citra_qt/config/controller_config_util.cpp @@ -0,0 +1,121 @@ +#include +#include +#include +#include +#include +#include + +#include "controller_config_util.hxx" + +/* TODO(bunnei): ImplementMe +GStickConfig::GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent) : QWidget(parent) +{ + left = new GKeyConfigButton(leftid, style()->standardIcon(QStyle::SP_ArrowLeft), QString(), change_receiver, this); + right = new GKeyConfigButton(rightid, style()->standardIcon(QStyle::SP_ArrowRight), QString(), change_receiver, this); + up = new GKeyConfigButton(upid, style()->standardIcon(QStyle::SP_ArrowUp), QString(), change_receiver, this); + down = new GKeyConfigButton(downid, style()->standardIcon(QStyle::SP_ArrowDown), QString(), change_receiver, this); + clear = new QPushButton(tr("Clear"), this); + + QGridLayout* layout = new QGridLayout(this); + layout->addWidget(left, 1, 0); + layout->addWidget(right, 1, 2); + layout->addWidget(up, 0, 1); + layout->addWidget(down, 2, 1); + layout->addWidget(clear, 1, 1); + + setLayout(layout); +} + +GKeyConfigButton::GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent) : QPushButton(icon, text, parent), id(id), inputGrabbed(false) +{ + connect(this, SIGNAL(clicked()), this, SLOT(OnClicked())); + connect(this, SIGNAL(KeyAssigned(common::Config::Control, int, const QString&)), change_receiver, SLOT(OnKeyConfigChanged(common::Config::Control, int, const QString&))); + connect(change_receiver, SIGNAL(ActivePortChanged(const common::Config::ControllerPort&)), this, SLOT(OnActivePortChanged(const common::Config::ControllerPort&))); +} + +GKeyConfigButton::GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent) : QPushButton(text, parent), id(id), inputGrabbed(false) +{ + connect(this, SIGNAL(clicked()), this, SLOT(OnClicked())); + connect(this, SIGNAL(KeyAssigned(common::Config::Control, int, const QString&)), change_receiver, SLOT(OnKeyConfigChanged(common::Config::Control, int, const QString&))); + connect(change_receiver, SIGNAL(ActivePortChanged(const common::Config::ControllerPort&)), this, SLOT(OnActivePortChanged(const common::Config::ControllerPort&))); +} + +void GKeyConfigButton::OnActivePortChanged(const common::Config::ControllerPort& config) +{ + // TODO: Doesn't use joypad struct if that's the input source... + QString text = QKeySequence(config.keys.key_code[id]).toString(); // has a nicer format + if (config.keys.key_code[id] == Qt::Key_Shift) text = tr("Shift"); + else if (config.keys.key_code[id] == Qt::Key_Control) text = tr("Control"); + else if (config.keys.key_code[id] == Qt::Key_Alt) text = tr("Alt"); + else if (config.keys.key_code[id] == Qt::Key_Meta) text = tr("Meta"); + setText(text); +} + +void GKeyConfigButton::OnClicked() +{ + grabKeyboard(); + grabMouse(); + inputGrabbed = true; + + old_text = text(); + setText(tr("Input...")); +} + +void GKeyConfigButton::keyPressEvent(QKeyEvent* event) +{ + if (inputGrabbed) + { + releaseKeyboard(); + releaseMouse(); + setText(QString()); + + // TODO: Doesn't capture "return" key + // TODO: This doesn't quite work well, yet... find a better way + QString text = QKeySequence(event->key()).toString(); // has a nicer format than event->text() + int key = event->key(); + if (event->modifiers() == Qt::ShiftModifier) { text = tr("Shift"); key = Qt::Key_Shift; } + else if (event->modifiers() == Qt::ControlModifier) { text = tr("Ctrl"); key = Qt::Key_Control; } + else if (event->modifiers() == Qt::AltModifier) { text = tr("Alt"); key = Qt::Key_Alt; } + else if (event->modifiers() == Qt::MetaModifier) { text = tr("Meta"); key = Qt::Key_Meta; } + + setText(old_text); + emit KeyAssigned(id, key, text); + + inputGrabbed = false; + + // TODO: Keys like "return" cause another keyPressEvent to be generated after this one... + } + + QPushButton::keyPressEvent(event); // TODO: Necessary? +} + +void GKeyConfigButton::mousePressEvent(QMouseEvent* event) +{ + // Abort key assignment + if (inputGrabbed) + { + releaseKeyboard(); + releaseMouse(); + setText(old_text); + inputGrabbed = false; + } + + QAbstractButton::mousePressEvent(event); +} + +GButtonConfigGroup::GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent) : QWidget(parent), id(id) +{ + QHBoxLayout* layout = new QHBoxLayout(this); + + QPushButton* clear_button = new QPushButton(tr("Clear")); + + layout->addWidget(new QLabel(name, this)); + layout->addWidget(config_button = new GKeyConfigButton(id, QString(), change_receiver, this)); + layout->addWidget(clear_button); + + // TODO: connect config_button, clear_button + + setLayout(layout); +} + +*/ \ No newline at end of file diff --git a/src/citra_qt/config/controller_config_util.hxx b/src/citra_qt/config/controller_config_util.hxx new file mode 100644 index 00000000..af38f126 --- /dev/null +++ b/src/citra_qt/config/controller_config_util.hxx @@ -0,0 +1,78 @@ +#ifndef _CONTROLLER_CONFIG_UTIL_HXX_ +#define _CONTROLLER_CONFIG_UTIL_HXX_ + +#include +#include + +/* TODO(bunnei): ImplementMe + +#include "config.h" + +class GStickConfig : public QWidget +{ + Q_OBJECT + +public: + // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! + GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent = NULL); + +signals: + void LeftChanged(); + void RightChanged(); + void UpChanged(); + void DownChanged(); + +private: + QPushButton* left; + QPushButton* right; + QPushButton* up; + QPushButton* down; + + QPushButton* clear; +}; + +class GKeyConfigButton : public QPushButton +{ + Q_OBJECT + +public: + // TODO: change_receiver also needs to have an ActivePortChanged(const common::Config::ControllerPort&) signal + // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! + GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent); + GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent); + +signals: + void KeyAssigned(common::Config::Control id, int key, const QString& text); + +private slots: + void OnActivePortChanged(const common::Config::ControllerPort& config); + + void OnClicked(); + + void keyPressEvent(QKeyEvent* event); // TODO: bGrabbed? + void mousePressEvent(QMouseEvent* event); + +private: + common::Config::Control id; + bool inputGrabbed; + + QString old_text; +}; + +class GButtonConfigGroup : public QWidget +{ + Q_OBJECT + +public: + // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! + GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent = NULL); + +private: + GKeyConfigButton* config_button; + + common::Config::Control id; +}; + +*/ + +#endif // _CONTROLLER_CONFIG_HXX_ diff --git a/src/citra_qt/config/ui_controller_config.h b/src/citra_qt/config/ui_controller_config.h new file mode 100644 index 00000000..f84364a7 --- /dev/null +++ b/src/citra_qt/config/ui_controller_config.h @@ -0,0 +1,222 @@ +/******************************************************************************** +** Form generated from reading UI file 'controller_config.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_CONTROLLER_CONFIG_H +#define UI_CONTROLLER_CONFIG_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_ControllerConfig +{ +public: + QVBoxLayout *verticalLayout; + QGridLayout *gridLayout; + QComboBox *activeControllerCB; + QSpacerItem *horizontalSpacer; + QCheckBox *checkBox; + QComboBox *inputSourceCB; + QLabel *label_2; + QLabel *label; + QTabWidget *tabWidget; + QWidget *mainStickTab; + QGridLayout *gridLayout_3; + QSpacerItem *verticalSpacer_2; + QSpacerItem *verticalSpacer_3; + QSpacerItem *horizontalSpacer_4; + QSpacerItem *horizontalSpacer_3; + QWidget *cStickTab; + QGridLayout *gridLayout_4; + QSpacerItem *horizontalSpacer_6; + QSpacerItem *verticalSpacer_5; + QSpacerItem *verticalSpacer_4; + QSpacerItem *horizontalSpacer_5; + QWidget *dPadTab; + QGridLayout *gridLayout_5; + QSpacerItem *horizontalSpacer_7; + QSpacerItem *verticalSpacer_7; + QSpacerItem *verticalSpacer_6; + QSpacerItem *horizontalSpacer_8; + QWidget *buttonsTab; + QVBoxLayout *verticalLayout_2; + + void setupUi(QWidget *ControllerConfig) + { + if (ControllerConfig->objectName().isEmpty()) + ControllerConfig->setObjectName(QString::fromUtf8("ControllerConfig")); + ControllerConfig->resize(503, 293); + QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(ControllerConfig->sizePolicy().hasHeightForWidth()); + ControllerConfig->setSizePolicy(sizePolicy); + verticalLayout = new QVBoxLayout(ControllerConfig); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setSizeConstraint(QLayout::SetFixedSize); + gridLayout = new QGridLayout(); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + activeControllerCB = new QComboBox(ControllerConfig); + activeControllerCB->setObjectName(QString::fromUtf8("activeControllerCB")); + + gridLayout->addWidget(activeControllerCB, 1, 1, 1, 1); + + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout->addItem(horizontalSpacer, 0, 2, 1, 1); + + checkBox = new QCheckBox(ControllerConfig); + checkBox->setObjectName(QString::fromUtf8("checkBox")); + + gridLayout->addWidget(checkBox, 1, 2, 1, 1); + + inputSourceCB = new QComboBox(ControllerConfig); + inputSourceCB->setObjectName(QString::fromUtf8("inputSourceCB")); + + gridLayout->addWidget(inputSourceCB, 0, 1, 1, 1); + + label_2 = new QLabel(ControllerConfig); + label_2->setObjectName(QString::fromUtf8("label_2")); + + gridLayout->addWidget(label_2, 1, 0, 1, 1); + + label = new QLabel(ControllerConfig); + label->setObjectName(QString::fromUtf8("label")); + + gridLayout->addWidget(label, 0, 0, 1, 1); + + + verticalLayout->addLayout(gridLayout); + + tabWidget = new QTabWidget(ControllerConfig); + tabWidget->setObjectName(QString::fromUtf8("tabWidget")); + mainStickTab = new QWidget(); + mainStickTab->setObjectName(QString::fromUtf8("mainStickTab")); + gridLayout_3 = new QGridLayout(mainStickTab); + gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_3->addItem(verticalSpacer_2, 2, 2, 1, 1); + + verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_3->addItem(verticalSpacer_3, 0, 2, 1, 1); + + horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_3->addItem(horizontalSpacer_4, 1, 0, 1, 1); + + horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_3->addItem(horizontalSpacer_3, 1, 4, 1, 1); + + tabWidget->addTab(mainStickTab, QString()); + cStickTab = new QWidget(); + cStickTab->setObjectName(QString::fromUtf8("cStickTab")); + gridLayout_4 = new QGridLayout(cStickTab); + gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + horizontalSpacer_6 = new QSpacerItem(40, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_4->addItem(horizontalSpacer_6, 1, 0, 1, 1); + + verticalSpacer_5 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_4->addItem(verticalSpacer_5, 0, 1, 1, 1); + + verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_4->addItem(verticalSpacer_4, 2, 1, 1, 1); + + horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_4->addItem(horizontalSpacer_5, 1, 2, 1, 1); + + tabWidget->addTab(cStickTab, QString()); + dPadTab = new QWidget(); + dPadTab->setObjectName(QString::fromUtf8("dPadTab")); + gridLayout_5 = new QGridLayout(dPadTab); + gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5")); + horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_5->addItem(horizontalSpacer_7, 1, 2, 1, 1); + + verticalSpacer_7 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_5->addItem(verticalSpacer_7, 0, 1, 1, 1); + + verticalSpacer_6 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_5->addItem(verticalSpacer_6, 2, 1, 1, 1); + + horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_5->addItem(horizontalSpacer_8, 1, 0, 1, 1); + + tabWidget->addTab(dPadTab, QString()); + buttonsTab = new QWidget(); + buttonsTab->setObjectName(QString::fromUtf8("buttonsTab")); + verticalLayout_2 = new QVBoxLayout(buttonsTab); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + tabWidget->addTab(buttonsTab, QString()); + + verticalLayout->addWidget(tabWidget); + + + retranslateUi(ControllerConfig); + + tabWidget->setCurrentIndex(0); + + + QMetaObject::connectSlotsByName(ControllerConfig); + } // setupUi + + void retranslateUi(QWidget *ControllerConfig) + { + ControllerConfig->setWindowTitle(QApplication::translate("ControllerConfig", "Controller Configuration", 0, QApplication::UnicodeUTF8)); + activeControllerCB->clear(); + activeControllerCB->insertItems(0, QStringList() + << QApplication::translate("ControllerConfig", "Controller 1", 0, QApplication::UnicodeUTF8) + << QApplication::translate("ControllerConfig", "Controller 2", 0, QApplication::UnicodeUTF8) + << QApplication::translate("ControllerConfig", "Controller 3", 0, QApplication::UnicodeUTF8) + << QApplication::translate("ControllerConfig", "Controller 4", 0, QApplication::UnicodeUTF8) + ); + checkBox->setText(QApplication::translate("ControllerConfig", "Enabled", 0, QApplication::UnicodeUTF8)); + inputSourceCB->clear(); + inputSourceCB->insertItems(0, QStringList() + << QApplication::translate("ControllerConfig", "Keyboard", 0, QApplication::UnicodeUTF8) + << QApplication::translate("ControllerConfig", "Joypad", 0, QApplication::UnicodeUTF8) + ); + label_2->setText(QApplication::translate("ControllerConfig", "Active Controller:", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("ControllerConfig", "Input Source:", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(mainStickTab), QApplication::translate("ControllerConfig", "Main Stick", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(cStickTab), QApplication::translate("ControllerConfig", "C-Stick", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(dPadTab), QApplication::translate("ControllerConfig", "D-Pad", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(buttonsTab), QApplication::translate("ControllerConfig", "Buttons", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class ControllerConfig: public Ui_ControllerConfig {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_CONTROLLER_CONFIG_H diff --git a/src/citra_qt/cpu_regs.cpp b/src/citra_qt/cpu_regs.cpp new file mode 100644 index 00000000..f2859f69 --- /dev/null +++ b/src/citra_qt/cpu_regs.cpp @@ -0,0 +1,63 @@ +#include "cpu_regs.hxx" + +#include "core.h" +#include "arm/interpreter/armdefs.h" + +GARM11RegsView::GARM11RegsView(QWidget* parent) : QDockWidget(parent) +{ + cpu_regs_ui.setupUi(this); + + tree = cpu_regs_ui.treeWidget; + tree->addTopLevelItem(registers = new QTreeWidgetItem(QStringList("Registers"))); + tree->addTopLevelItem(CSPR = new QTreeWidgetItem(QStringList("CSPR"))); + + registers->setExpanded(true); + CSPR->setExpanded(true); + + for (int i = 0; i < 16; ++i) + { + QTreeWidgetItem* child = new QTreeWidgetItem(QStringList(QString("R[%1]").arg(i, 2, 10, QLatin1Char('0')))); + registers->addChild(child); + } + + CSPR->addChild(new QTreeWidgetItem(QStringList("M"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("T"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("F"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("I"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("A"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("E"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("IT"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("GE"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("DNM"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("J"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("Q"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("V"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("C"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("Z"))); + CSPR->addChild(new QTreeWidgetItem(QStringList("N"))); +} + +void GARM11RegsView::OnCPUStepped() +{ + ARM_Interface* app_core = Core::g_app_core; + + for (int i = 0; i < 16; ++i) + registers->child(i)->setText(1, QString("0x%1").arg(app_core->Reg(i), 8, 16, QLatin1Char('0'))); + + CSPR->setText(1, QString("0x%1").arg(app_core->CPSR(), 8, 16, QLatin1Char('0'))); + CSPR->child(0)->setText(1, QString("b%1").arg(app_core->CPSR() & 0x1F, 5, 2, QLatin1Char('0'))); // M - Mode + CSPR->child(1)->setText(1, QString("%1").arg((app_core->CPSR() >> 5) & 0x1)); // T - State + CSPR->child(2)->setText(1, QString("%1").arg((app_core->CPSR() >> 6) & 0x1)); // F - FIQ disable + CSPR->child(3)->setText(1, QString("%1").arg((app_core->CPSR() >> 7) & 0x1)); // I - IRQ disable + CSPR->child(4)->setText(1, QString("%1").arg((app_core->CPSR() >> 8) & 0x1)); // A - Imprecise abort + CSPR->child(5)->setText(1, QString("%1").arg((app_core->CPSR() >> 9) & 0x1)); // E - Data endianess + CSPR->child(6)->setText(1, QString("%1").arg((app_core->CPSR() >> 10) & 0x3F)); // IT - If-Then state (DNM) + CSPR->child(7)->setText(1, QString("%1").arg((app_core->CPSR() >> 16) & 0xF)); // GE - Greater-than-or-Equal + CSPR->child(8)->setText(1, QString("%1").arg((app_core->CPSR() >> 20) & 0xF)); // DNM - Do not modify + CSPR->child(9)->setText(1, QString("%1").arg((app_core->CPSR() >> 24) & 0x1)); // J - Java state + CSPR->child(10)->setText(1, QString("%1").arg((app_core->CPSR() >> 27) & 0x1)); // Q - Sticky overflow + CSPR->child(11)->setText(1, QString("%1").arg((app_core->CPSR() >> 28) & 0x1)); // V - Overflow + CSPR->child(12)->setText(1, QString("%1").arg((app_core->CPSR() >> 29) & 0x1)); // C - Carry/Borrow/Extend + CSPR->child(13)->setText(1, QString("%1").arg((app_core->CPSR() >> 30) & 0x1)); // Z - Zero + CSPR->child(14)->setText(1, QString("%1").arg((app_core->CPSR() >> 31) & 0x1)); // N - Negative/Less than +} diff --git a/src/citra_qt/cpu_regs.hxx b/src/citra_qt/cpu_regs.hxx new file mode 100644 index 00000000..27c194bd --- /dev/null +++ b/src/citra_qt/cpu_regs.hxx @@ -0,0 +1,27 @@ +#include "ui_cpu_regs.h" + +#include +#include + +//#include "ui_gekko_regs.h" + +class QTreeWidget; + +class GARM11RegsView : public QDockWidget +{ + Q_OBJECT + +public: + GARM11RegsView(QWidget* parent = NULL); + +public slots: + void OnCPUStepped(); + +private: + Ui::ARMRegisters cpu_regs_ui; + + QTreeWidget* tree; + + QTreeWidgetItem* registers; + QTreeWidgetItem* CSPR; +}; diff --git a/src/citra_qt/cpu_regs.ui b/src/citra_qt/cpu_regs.ui new file mode 100644 index 00000000..6537c9cd --- /dev/null +++ b/src/citra_qt/cpu_regs.ui @@ -0,0 +1,40 @@ + + + ARMRegisters + + + + 0 + 0 + 400 + 300 + + + + ARM registers + + + + + + + true + + + + Register + + + + + Value + + + + + + + + + + diff --git a/src/citra_qt/disasm.cpp b/src/citra_qt/disasm.cpp new file mode 100644 index 00000000..ddcbf69d --- /dev/null +++ b/src/citra_qt/disasm.cpp @@ -0,0 +1,135 @@ +#include +#include "ui_disasm.h" +#include "disasm.hxx" + +#include "bootmanager.hxx" +#include "hotkeys.hxx" + +#include "common.h" +#include "mem_map.h" + +#include "core.h" +#include "break_points.h" +#include "arm/interpreter/armdefs.h" +#include "arm/disassembler/arm_disasm.h" + +GDisAsmView::GDisAsmView(QWidget* parent, EmuThread& emu_thread) : QDockWidget(parent), base_addr(0), emu_thread(emu_thread) +{ + disasm_ui.setupUi(this); + + breakpoints = new BreakPoints(); + + model = new QStandardItemModel(this); + model->setColumnCount(2); + disasm_ui.treeView->setModel(model); + + RegisterHotkey("Disassembler", "Start/Stop", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut); + RegisterHotkey("Disassembler", "Step", QKeySequence(Qt::Key_F10), Qt::ApplicationShortcut); + RegisterHotkey("Disassembler", "Step into", QKeySequence(Qt::Key_F11), Qt::ApplicationShortcut); + RegisterHotkey("Disassembler", "Set Breakpoint", QKeySequence(Qt::Key_F9), Qt::ApplicationShortcut); + + connect(disasm_ui.button_breakpoint, SIGNAL(clicked()), this, SLOT(OnSetBreakpoint())); + connect(disasm_ui.button_step, SIGNAL(clicked()), this, SLOT(OnStep())); + connect(disasm_ui.button_pause, SIGNAL(clicked()), this, SLOT(OnPause())); + connect(disasm_ui.button_continue, SIGNAL(clicked()), this, SLOT(OnContinue())); + + connect(GetHotkey("Disassembler", "Start/Stop", this), SIGNAL(activated()), this, SLOT(OnToggleStartStop())); + connect(GetHotkey("Disassembler", "Step", this), SIGNAL(activated()), this, SLOT(OnStep())); + connect(GetHotkey("Disassembler", "Step into", this), SIGNAL(activated()), this, SLOT(OnStepInto())); + connect(GetHotkey("Disassembler", "Set Breakpoint", this), SIGNAL(activated()), this, SLOT(OnSetBreakpoint())); +} + +void GDisAsmView::Init() +{ + ARM_Disasm* disasm = new ARM_Disasm(); + + base_addr = Core::g_app_core->PC(); + unsigned int curInstAddr = base_addr; + char result[255]; + + for (int i = 0; i < 10000; i++) // fixed for now + { + disasm->disasm(curInstAddr, Memory::Read32(curInstAddr), result); + model->setItem(i, 0, new QStandardItem(QString("0x%1").arg((uint)(curInstAddr), 8, 16, QLatin1Char('0')))); + model->setItem(i, 1, new QStandardItem(QString(result))); + curInstAddr += 4; + } + disasm_ui.treeView->resizeColumnToContents(0); + disasm_ui.treeView->resizeColumnToContents(1); + + QModelIndex model_index = model->index(0, 0); + disasm_ui.treeView->scrollTo(model_index); + disasm_ui.treeView->selectionModel()->setCurrentIndex(model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); +} + +void GDisAsmView::OnSetBreakpoint() +{ + int selected_row = SelectedRow(); + + if (selected_row == -1) + return; + + u32 address = base_addr + (selected_row * 4); + if (breakpoints->IsAddressBreakPoint(address)) + { + breakpoints->Remove(address); + model->item(selected_row, 0)->setBackground(QBrush()); + model->item(selected_row, 1)->setBackground(QBrush()); + } + else + { + breakpoints->Add(address); + model->item(selected_row, 0)->setBackground(QBrush(QColor(0xFF, 0x99, 0x99))); + model->item(selected_row, 1)->setBackground(QBrush(QColor(0xFF, 0x99, 0x99))); + } +} + +void GDisAsmView::OnContinue() +{ + emu_thread.SetCpuRunning(true); +} + +void GDisAsmView::OnStep() +{ + OnStepInto(); // change later +} + +void GDisAsmView::OnStepInto() +{ + emu_thread.SetCpuRunning(false); + emu_thread.ExecStep(); +} + +void GDisAsmView::OnPause() +{ + emu_thread.SetCpuRunning(false); +} + +void GDisAsmView::OnToggleStartStop() +{ + emu_thread.SetCpuRunning(!emu_thread.IsCpuRunning()); +} + +void GDisAsmView::OnCPUStepped() +{ + ARMword next_instr = Core::g_app_core->PC(); + + if (breakpoints->IsAddressBreakPoint(next_instr)) + { + emu_thread.SetCpuRunning(false); + } + + unsigned int index = (next_instr - base_addr) / 4; + QModelIndex model_index = model->index(index, 0); + disasm_ui.treeView->scrollTo(model_index); + disasm_ui.treeView->selectionModel()->setCurrentIndex(model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); +} + +int GDisAsmView::SelectedRow() +{ + QModelIndex index = disasm_ui.treeView->selectionModel()->currentIndex(); + if (!index.isValid()) + return -1; + + return model->itemFromIndex(disasm_ui.treeView->selectionModel()->currentIndex())->row(); +} \ No newline at end of file diff --git a/src/citra_qt/disasm.hxx b/src/citra_qt/disasm.hxx new file mode 100644 index 00000000..0e4a0fc3 --- /dev/null +++ b/src/citra_qt/disasm.hxx @@ -0,0 +1,42 @@ +#include +#include "ui_disasm.h" + +#include "common.h" +#include "break_points.h" + +class QAction; +class QStandardItemModel; +class EmuThread; + +class GDisAsmView : public QDockWidget +{ + Q_OBJECT + +public: + GDisAsmView(QWidget* parent, EmuThread& emu_thread); + + void Init(); + +public slots: + void OnSetBreakpoint(); + void OnContinue(); + void OnStep(); + void OnStepInto(); + void OnPause(); + void OnToggleStartStop(); + + void OnCPUStepped(); + +private: + // returns -1 if no row is selected + int SelectedRow(); + + Ui::DockWidget disasm_ui; + QStandardItemModel* model; + + u32 base_addr; + + BreakPoints* breakpoints; + + EmuThread& emu_thread; +}; diff --git a/src/citra_qt/disasm.ui b/src/citra_qt/disasm.ui new file mode 100644 index 00000000..fb384516 --- /dev/null +++ b/src/citra_qt/disasm.ui @@ -0,0 +1,78 @@ + + + DockWidget + + + + 0 + 0 + 430 + 401 + + + + Disassembly + + + + + + + + + Step + + + + + + + Pause + + + + + + + Continue + + + + + + + Step Into + + + + + + + Set Breakpoint + + + + + + + + + true + + + 20 + + + false + + + false + + + + + + + + + diff --git a/src/citra_qt/hotkeys.cpp b/src/citra_qt/hotkeys.cpp new file mode 100644 index 00000000..1aa1e8b9 --- /dev/null +++ b/src/citra_qt/hotkeys.cpp @@ -0,0 +1,111 @@ +#include +#include +#include "hotkeys.hxx" +#include + +struct Hotkey +{ + Hotkey() : shortcut(NULL), context(Qt::WindowShortcut) {} + + QKeySequence keyseq; + QShortcut* shortcut; + Qt::ShortcutContext context; +}; + +typedef std::map HotkeyMap; +typedef std::map HotkeyGroupMap; + +HotkeyGroupMap hotkey_groups; + +void SaveHotkeys(QSettings& settings) +{ + settings.beginGroup("Shortcuts"); + + for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group) + { + settings.beginGroup(group->first); + for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey) + { + settings.beginGroup(hotkey->first); + settings.setValue(QString("KeySeq"), hotkey->second.keyseq.toString()); + settings.setValue(QString("Context"), hotkey->second.context); + settings.endGroup(); + } + settings.endGroup(); + } + settings.endGroup(); +} + +void LoadHotkeys(QSettings& settings) +{ + settings.beginGroup("Shortcuts"); + + // Make sure NOT to use a reference here because it would become invalid once we call beginGroup() + QStringList groups = settings.childGroups(); + for (QList::iterator group = groups.begin(); group != groups.end(); ++group) + { + settings.beginGroup(*group); + + QStringList hotkeys = settings.childGroups(); + for (QList::iterator hotkey = hotkeys.begin(); hotkey != hotkeys.end(); ++hotkey) + { + settings.beginGroup(*hotkey); + + // RegisterHotkey assigns default keybindings, so use old values as default parameters + Hotkey& hk = hotkey_groups[*group][*hotkey]; + hk.keyseq = QKeySequence::fromString(settings.value("KeySeq", hk.keyseq.toString()).toString()); + hk.context = (Qt::ShortcutContext)settings.value("Context", hk.context).toInt(); + if (hk.shortcut) + hk.shortcut->setKey(hk.keyseq); + + settings.endGroup(); + } + + settings.endGroup(); + } + + settings.endGroup(); +} + +void RegisterHotkey(const QString& group, const QString& action, const QKeySequence& default_keyseq, Qt::ShortcutContext default_context) +{ + if (hotkey_groups[group].find(action) == hotkey_groups[group].end()) + { + hotkey_groups[group][action].keyseq = default_keyseq; + hotkey_groups[group][action].context = default_context; + } +} + +QShortcut* GetHotkey(const QString& group, const QString& action, QWidget* widget) +{ + Hotkey& hk = hotkey_groups[group][action]; + + if (!hk.shortcut) + hk.shortcut = new QShortcut(hk.keyseq, widget, NULL, NULL, hk.context); + + return hk.shortcut; +} + + +GHotkeysDialog::GHotkeysDialog(QWidget* parent): QDialog(parent) +{ + ui.setupUi(this); + + for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group) + { + QTreeWidgetItem* toplevel_item = new QTreeWidgetItem(QStringList(group->first)); + for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey) + { + QStringList columns; + columns << hotkey->first << hotkey->second.keyseq.toString(); + QTreeWidgetItem* item = new QTreeWidgetItem(columns); + toplevel_item->addChild(item); + } + ui.treeWidget->addTopLevelItem(toplevel_item); + } + // TODO: Make context configurable as well (hiding the column for now) + ui.treeWidget->setColumnCount(2); + + ui.treeWidget->resizeColumnToContents(0); + ui.treeWidget->resizeColumnToContents(1); +} diff --git a/src/citra_qt/hotkeys.hxx b/src/citra_qt/hotkeys.hxx new file mode 100644 index 00000000..66ef7bb4 --- /dev/null +++ b/src/citra_qt/hotkeys.hxx @@ -0,0 +1,50 @@ +#include +#include +#include "ui_hotkeys.h" + +class QKeySequence; +class QSettings; + +/** + * Register a hotkey. + * + * @param group General group this hotkey belongs to (e.g. "Main Window", "Debugger") + * @param action Name of the action (e.g. "Start Emulation", "Load Image") + * @param default_keyseq Default key sequence to assign if the hotkey wasn't present in the settings file before + * @param default_context Default context to assign if the hotkey wasn't present in the settings file before + * @warning Both the group and action strings will be displayed in the hotkey settings dialog + */ +void RegisterHotkey(const QString& group, const QString& action, const QKeySequence& default_keyseq = QKeySequence(), Qt::ShortcutContext default_context = Qt::WindowShortcut); + +/** + * Returns a QShortcut object whose activated() signal can be connected to other QObjects' slots. + * + * @param widget Parent widget of the returned QShortcut. + * @warning If multiple QWidgets' call this function for the same action, the returned QShortcut will be the same. Thus, you shouldn't rely on the caller really being the QShortcut's parent. + */ +QShortcut* GetHotkey(const QString& group, const QString& action, QWidget* widget); + +/** + * Saves all registered hotkeys to the settings file. + * + * @note Each hotkey group will be stored a settings group; For each hotkey inside that group, a settings group will be created to store the key sequence and the hotkey context. + */ +void SaveHotkeys(QSettings& settings); + +/** + * Loads hotkeys from the settings file. + * + * @note Yet unregistered hotkeys which are present in the settings will automatically be registered. + */ +void LoadHotkeys(QSettings& settings); + +class GHotkeysDialog : public QDialog +{ + Q_OBJECT + +public: + GHotkeysDialog(QWidget* parent = NULL); + +private: + Ui::hotkeys ui; +}; diff --git a/src/citra_qt/hotkeys.ui b/src/citra_qt/hotkeys.ui new file mode 100644 index 00000000..38a9a14d --- /dev/null +++ b/src/citra_qt/hotkeys.ui @@ -0,0 +1,89 @@ + + + hotkeys + + + + 0 + 0 + 363 + 388 + + + + Hotkey Settings + + + + + + QAbstractItemView::SelectItems + + + false + + + + Action + + + + + Hotkey + + + + + Context + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset + + + + + + + + + buttonBox + accepted() + hotkeys + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + hotkeys + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp new file mode 100644 index 00000000..d7104eb0 --- /dev/null +++ b/src/citra_qt/main.cpp @@ -0,0 +1,230 @@ +#include +#include +#include +#include "qhexedit.h" +#include "main.hxx" + +#include "common.h" +#include "platform.h" +#if EMU_PLATFORM == PLATFORM_LINUX +#include +#endif + +#include "bootmanager.hxx" +#include "hotkeys.hxx" + +//debugger +#include "disasm.hxx" +#include "cpu_regs.hxx" +#include "callstack.hxx" +#include "ramview.hxx" + +#include "system.h" +#include "loader.h" +#include "core.h" +#include "version.h" + + +GMainWindow::GMainWindow() +{ + ui.setupUi(this); + statusBar()->hide(); + + render_window = new GRenderWindow; + render_window->hide(); + + disasm = new GDisAsmView(this, render_window->GetEmuThread()); + addDockWidget(Qt::BottomDockWidgetArea, disasm); + disasm->hide(); + + arm_regs = new GARM11RegsView(this); + addDockWidget(Qt::RightDockWidgetArea, arm_regs); + arm_regs->hide(); + + QMenu* debug_menu = ui.menu_View->addMenu(tr("Debugging")); + debug_menu->addAction(disasm->toggleViewAction()); + debug_menu->addAction(arm_regs->toggleViewAction()); + + // Set default UI state + // geometry: 55% of the window contents are in the upper screen half, 45% in the lower half + QDesktopWidget* desktop = ((QApplication*)QApplication::instance())->desktop(); + QRect screenRect = desktop->screenGeometry(this); + int x, y, w, h; + w = screenRect.width() * 2 / 3; + h = screenRect.height() / 2; + x = (screenRect.x() + screenRect.width()) / 2 - w / 2; + y = (screenRect.y() + screenRect.height()) / 2 - h * 55 / 100; + setGeometry(x, y, w, h); + + + // Restore UI state + QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Citra team", "Citra"); + restoreGeometry(settings.value("geometry").toByteArray()); + restoreState(settings.value("state").toByteArray()); + render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray()); + + ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", false).toBool()); + SetupEmuWindowMode(); + + // Setup connections + connect(ui.action_load_elf, SIGNAL(triggered()), this, SLOT(OnMenuLoadELF())); + connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); + connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); + connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); + connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(SetupEmuWindowMode())); + connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog())); + + // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views before the CPU continues + connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), disasm, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection); + connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), arm_regs, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection); + + // Setup hotkeys + RegisterHotkey("Main Window", "Load Image", QKeySequence::Open); + RegisterHotkey("Main Window", "Start Emulation"); + LoadHotkeys(settings); + + connect(GetHotkey("Main Window", "Load Image", this), SIGNAL(activated()), this, SLOT(OnMenuLoadImage())); + connect(GetHotkey("Main Window", "Start Emulation", this), SIGNAL(activated()), this, SLOT(OnStartGame())); + + show(); + + System::Init(render_window); +} + +GMainWindow::~GMainWindow() +{ + // will get automatically deleted otherwise + if (render_window->parent() == NULL) + delete render_window; +} + +void GMainWindow::BootGame(const char* filename) +{ + render_window->DoneCurrent(); // make sure EmuThread can access GL context + render_window->GetEmuThread().SetFilename(filename); + + NOTICE_LOG(MASTER_LOG, "citra starting...\n"); + + if (Core::Init(/*render_window*/)) { + ERROR_LOG(MASTER_LOG, "core initialization failed, exiting..."); + Core::Stop(); + exit(1); + } + + // Load a game or die... + std::string boot_filename = filename; + std::string error_str; + bool res = Loader::LoadFile(boot_filename, &error_str); + + if (!res) { + ERROR_LOG(BOOT, "Failed to load ROM: %s", error_str.c_str()); + } + + disasm->Init(); + arm_regs->OnCPUStepped(); + + render_window->GetEmuThread().start(); + + SetupEmuWindowMode(); + render_window->show(); +} + +void GMainWindow::OnMenuLoadELF() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Load ELF"), QString(), QString()); + if (filename.size()) + BootGame(filename.toLatin1().data()); +} + +void GMainWindow::OnStartGame() +{ + render_window->show(); + render_window->GetEmuThread().SetCpuRunning(true); + + ui.action_Start->setEnabled(false); + ui.action_Pause->setEnabled(true); + ui.action_Stop->setEnabled(true); +} + +void GMainWindow::OnPauseGame() +{ + render_window->GetEmuThread().SetCpuRunning(false); + + ui.action_Start->setEnabled(true); + ui.action_Pause->setEnabled(false); + ui.action_Stop->setEnabled(true); +} + +void GMainWindow::OnStopGame() +{ + render_window->GetEmuThread().SetCpuRunning(false); + + ui.action_Start->setEnabled(true); + ui.action_Pause->setEnabled(false); + ui.action_Stop->setEnabled(false); +} + +void GMainWindow::OnOpenHotkeysDialog() +{ + GHotkeysDialog dialog(this); + dialog.exec(); +} + + +void GMainWindow::SetupEmuWindowMode() +{ + //if (!render_window->GetEmuThread().isRunning()) + // return; + + bool enable = ui.action_Single_Window_Mode->isChecked(); + if (enable && render_window->parent() == NULL) // switch to single window mode + { + render_window->BackupGeometry(); + ui.horizontalLayout->addWidget(render_window); + render_window->setVisible(true); + render_window->DoneCurrent(); + } + else if (!enable && render_window->parent() != NULL) // switch to multiple windows mode + { + ui.horizontalLayout->removeWidget(render_window); + render_window->setParent(NULL); + render_window->setVisible(true); + render_window->DoneCurrent(); + render_window->RestoreGeometry(); + } +} + +void GMainWindow::OnConfigure() +{ + //GControllerConfigDialog* dialog = new GControllerConfigDialog(controller_ports, this); +} + +void GMainWindow::closeEvent(QCloseEvent* event) +{ + // Save window layout + QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Citra team", "Citra"); + settings.setValue("geometry", saveGeometry()); + settings.setValue("state", saveState()); + settings.setValue("geometryRenderWindow", render_window->saveGeometry()); + settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked()); + settings.setValue("firstStart", false); + SaveHotkeys(settings); + + render_window->close(); + + QWidget::closeEvent(event); +} + +#ifdef main +#undef main +#endif + +int __cdecl main(int argc, char* argv[]) +{ + QApplication::setAttribute(Qt::AA_X11InitThreads); + QApplication app(argc, argv); + GMainWindow main_window; + + main_window.show(); + return app.exec(); +} diff --git a/src/citra_qt/main.hxx b/src/citra_qt/main.hxx new file mode 100644 index 00000000..34bd2c3a --- /dev/null +++ b/src/citra_qt/main.hxx @@ -0,0 +1,51 @@ +#ifndef _CITRA_QT_MAIN_HXX_ +#define _CITRA_QT_MAIN_HXX_ + +#include + +#include "ui_main.h" + +class GImageInfo; +class GRenderWindow; +class GDisAsmView; +class GARM11RegsView; + +class GMainWindow : public QMainWindow +{ + Q_OBJECT + + // TODO: Make use of this! + enum { + UI_IDLE, + UI_EMU_BOOTING, + UI_EMU_RUNNING, + UI_EMU_STOPPING, + }; + +public: + GMainWindow(); + ~GMainWindow(); + +private: + void BootGame(const char* filename); + + void closeEvent(QCloseEvent* event); + +private slots: + void OnStartGame(); + void OnPauseGame(); + void OnStopGame(); + void OnMenuLoadELF(); + void OnOpenHotkeysDialog(); + void SetupEmuWindowMode(); + void OnConfigure(); + +private: + Ui::MainWindow ui; + + GRenderWindow* render_window; + GDisAsmView* disasm; + GARM11RegsView* arm_regs; +}; + +#endif // _CITRA_QT_MAIN_HXX_ diff --git a/src/citra_qt/main.ui b/src/citra_qt/main.ui new file mode 100644 index 00000000..bc895d89 --- /dev/null +++ b/src/citra_qt/main.ui @@ -0,0 +1,168 @@ + + + MainWindow + + + + 0 + 0 + 1081 + 730 + + + + Citra + + + + src/pcafe/res/icon3_64x64.icosrc/pcafe/res/icon3_64x64.ico + + + QTabWidget::Rounded + + + true + + + + + + + + 0 + 0 + 1081 + 20 + + + + + &File + + + + + + + + &Emulation + + + + + + + + + + &View + + + + + + + &Help + + + + + + + + + + + + Load ELF ... + + + + + E&xit + + + + + &Start + + + + + false + + + &Pause + + + + + false + + + &Stop + + + + + About Citra + + + + + true + + + Single Window Mode + + + + + Configure &Hotkeys ... + + + + + Configure ... + + + + + + + action_Exit + triggered() + MainWindow + close() + + + -1 + -1 + + + 367 + 314 + + + + + action_Configure + triggered() + MainWindow + OnConfigure() + + + -1 + -1 + + + 540 + 364 + + + + + + OnConfigure() + + diff --git a/src/citra_qt/ramview.cpp b/src/citra_qt/ramview.cpp new file mode 100644 index 00000000..8cc252af --- /dev/null +++ b/src/citra_qt/ramview.cpp @@ -0,0 +1,13 @@ +#include "ramview.hxx" + +#include "common.h" +#include "memory.h" +GRamView::GRamView(QWidget* parent) : QHexEdit(parent) +{ +} + +void GRamView::OnCPUStepped() +{ + // TODO: QHexEdit doesn't show vertical scroll bars for > 10MB data streams... + //setData(QByteArray((const char*)Mem_RAM,sizeof(Mem_RAM)/8)); +} \ No newline at end of file diff --git a/src/citra_qt/ramview.hxx b/src/citra_qt/ramview.hxx new file mode 100644 index 00000000..1db1546a --- /dev/null +++ b/src/citra_qt/ramview.hxx @@ -0,0 +1,12 @@ +#include "qhexedit.h" + +class GRamView : public QHexEdit +{ + Q_OBJECT + +public: + GRamView(QWidget* parent = NULL); + +public slots: + void OnCPUStepped(); +}; diff --git a/src/citra_qt/src/bootmanager.cpp b/src/citra_qt/src/bootmanager.cpp deleted file mode 100644 index 095856dc..00000000 --- a/src/citra_qt/src/bootmanager.cpp +++ /dev/null @@ -1,206 +0,0 @@ -#include -#include - -#include "common.h" -#include "bootmanager.hxx" - -#include "core.h" -#include "loader.h" - -#include "version.h" - -#define APP_NAME "citra" -#define APP_VERSION "0.1-" VERSION -#define APP_TITLE APP_NAME " " APP_VERSION -#define COPYRIGHT "Copyright (C) 2013-2014 Citra Team" - -EmuThread::EmuThread(GRenderWindow* render_window) : exec_cpu_step(false), cpu_running(false), render_window(render_window) -{ -} - -void EmuThread::SetFilename(const char* filename) -{ - strcpy(this->filename, filename); -} - -void EmuThread::run() -{ - while (true) - { - for (int tight_loop = 0; tight_loop < 10000; ++tight_loop) - { - if (cpu_running || exec_cpu_step) - { - if (exec_cpu_step) - exec_cpu_step = false; - - Core::SingleStep(); - emit CPUStepped(); - } - } - } - - Core::Stop(); -} - -void EmuThread::Stop() -{ - if (!isRunning()) - { - INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning..."); - return; - } - - //core::g_state = core::SYS_DIE; - - wait(1000); - if (isRunning()) - { - WARN_LOG(MASTER_LOG, "EmuThread still running, terminating..."); - terminate(); - wait(1000); - if (isRunning()) - WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here..."); - } - INFO_LOG(MASTER_LOG, "EmuThread stopped"); -} - - -// This class overrides paintEvent and resizeEvent to prevent the GUI thread from stealing GL context. -// The corresponding functionality is handled in EmuThread instead -class GGLWidgetInternal : public QGLWidget -{ -public: - GGLWidgetInternal(GRenderWindow* parent) : QGLWidget(parent) - { - setAutoBufferSwap(false); - doneCurrent(); - parent_ = parent; - } - - void paintEvent(QPaintEvent* ev) - { - // Apparently, Windows doesn't display anything if we don't call this here. - // TODO: Breaks linux though because we aren't calling doneCurrent() ... -.- -// makeCurrent(); - } - void resizeEvent(QResizeEvent* ev) { - parent_->set_client_area_width(size().width()); - parent_->set_client_area_height(size().height()); - } -private: - GRenderWindow* parent_; -}; - - -EmuThread& GRenderWindow::GetEmuThread() -{ - return emu_thread; -} - -GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this) -{ - // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose - - child = new GGLWidgetInternal(this); - - QBoxLayout* layout = new QHBoxLayout(this); - resize(640, 480); // TODO: Load size from config instead - layout->addWidget(child); - layout->setMargin(0); - setLayout(layout); - - BackupGeometry(); -} - -GRenderWindow::~GRenderWindow() -{ - emu_thread.Stop(); -} - -void GRenderWindow::SwapBuffers() -{ - child->makeCurrent(); // TODO: Not necessary? - child->swapBuffers(); -} - -void GRenderWindow::closeEvent(QCloseEvent* event) -{ - emu_thread.Stop(); - QWidget::closeEvent(event); -} - -void GRenderWindow::MakeCurrent() -{ - child->makeCurrent(); -} - -void GRenderWindow::DoneCurrent() -{ - child->doneCurrent(); -} - -void GRenderWindow::PollEvents() { - // TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title - // from the main thread, but this should probably be in an event handler... - /* - static char title[128]; - sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(), - video_core::g_renderer->current_fps()); - setWindowTitle(title); - */ -} - -void GRenderWindow::BackupGeometry() -{ - geometry = ((QGLWidget*)this)->saveGeometry(); -} - -void GRenderWindow::RestoreGeometry() -{ - // We don't want to back up the geometry here (obviously) - QWidget::restoreGeometry(geometry); -} - -void GRenderWindow::restoreGeometry(const QByteArray& geometry) -{ - // Make sure users of this class don't need to deal with backing up the geometry themselves - QWidget::restoreGeometry(geometry); - BackupGeometry(); -} - -QByteArray GRenderWindow::saveGeometry() -{ - // If we are a top-level widget, store the current geometry - // otherwise, store the last backup - if (parent() == NULL) - return ((QGLWidget*)this)->saveGeometry(); - else - return geometry; -} - -void GRenderWindow::keyPressEvent(QKeyEvent* event) -{ - /* - bool key_processed = false; - for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel) - if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::PRESSED)) - key_processed = true; - - if (!key_processed) - QWidget::keyPressEvent(event); - */ -} - -void GRenderWindow::keyReleaseEvent(QKeyEvent* event) -{ - /* - bool key_processed = false; - for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel) - if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::RELEASED)) - key_processed = true; - - if (!key_processed) - QWidget::keyPressEvent(event); - */ -} \ No newline at end of file diff --git a/src/citra_qt/src/bootmanager.hxx b/src/citra_qt/src/bootmanager.hxx deleted file mode 100644 index b3aa1cf3..00000000 --- a/src/citra_qt/src/bootmanager.hxx +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include "common.h" -#include "emu_window.h" - -class GRenderWindow; -class QKeyEvent; - -class EmuThread : public QThread -{ - Q_OBJECT - -public: - /** - * Set image filename - * - * @param filename - * @warning Only call when not running! - */ - void SetFilename(const char* filename); - - /** - * Start emulation (on new thread) - * - * @warning Only call when not running! - */ - void run(); - - /** - * Allow the CPU to process a single instruction (if cpu is not running) - * - * @note This function is thread-safe - */ - void ExecStep() { exec_cpu_step = true; } - - /** - * Allow the CPU to continue processing instructions without interruption - * - * @note This function is thread-safe - */ - void SetCpuRunning(bool running) { cpu_running = running; } - - /** - * Allow the CPU to continue processing instructions without interruption - * - * @note This function is thread-safe - */ - bool IsCpuRunning() { return cpu_running; } - - -public slots: - /** - * Stop emulation and wait for the thread to finish. - * - * @details: This function will wait a second for the thread to finish; if it hasn't finished until then, we'll terminate() it and wait another second, hoping that it will be terminated by then. - * @note: This function is thread-safe. - */ - void Stop(); - -private: - friend class GRenderWindow; - - EmuThread(GRenderWindow* render_window); - - char filename[MAX_PATH]; - - bool exec_cpu_step; - bool cpu_running; - - GRenderWindow* render_window; - -signals: - /** - * Emitted when CPU when we've finished processing a single Gekko instruction - * - * @warning This will only be emitted when the CPU is not running (SetCpuRunning(false)) - * @warning When connecting to this signal from other threads, make sure to specify either Qt::QueuedConnection (invoke slot within the destination object's message thread) or even Qt::BlockingQueuedConnection (additionally block source thread until slot returns) - */ - void CPUStepped(); -}; - -class GRenderWindow : public QWidget, public EmuWindow -{ -public: - GRenderWindow(QWidget* parent = NULL); - ~GRenderWindow(); - - void closeEvent(QCloseEvent*); - - // EmuWindow implementation - void SwapBuffers(); - void MakeCurrent(); - void DoneCurrent(); - void PollEvents(); - - void BackupGeometry(); - void RestoreGeometry(); - void restoreGeometry(const QByteArray& geometry); // overridden - QByteArray saveGeometry(); // overridden - - EmuThread& GetEmuThread(); - - void keyPressEvent(QKeyEvent* event); - void keyReleaseEvent(QKeyEvent* event); - -private: - QGLWidget* child; - - EmuThread emu_thread; - - QByteArray geometry; -}; diff --git a/src/citra_qt/src/callstack.cpp b/src/citra_qt/src/callstack.cpp deleted file mode 100644 index 2d62cb0d..00000000 --- a/src/citra_qt/src/callstack.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include "callstack.hxx" - -//#include "debugger/debugger.h" - -GCallstackView::GCallstackView(QWidget* parent): QDockWidget(parent) -{ - ui.setupUi(this); - - callstack_model = new QStandardItemModel(this); - callstack_model->setColumnCount(3); - callstack_model->setHeaderData(0, Qt::Horizontal, "Depth"); - callstack_model->setHeaderData(1, Qt::Horizontal, "Address"); - callstack_model->setHeaderData(2, Qt::Horizontal, "Function Name"); - ui.treeView->setModel(callstack_model); - - // TODO: Make single clicking a callstack entry jump to the corresponding disassembly position -} - -void GCallstackView::OnCPUStepped() -{ - /* - Debugger::Callstack callstack; - Debugger::GetCallstack(callstack); - callstack_model->setRowCount(callstack.size()); - - for (int i = 0; i < callstack.size(); ++i) - for (Debugger::CallstackIterator it = callstack.begin(); it != callstack.end(); ++it) - { - Debugger::CallstackEntry entry = callstack[i]; - callstack_model->setItem(i, 0, new QStandardItem(QString("%1").arg(i+1))); - callstack_model->setItem(i, 1, new QStandardItem(QString("0x%1").arg(entry.addr, 8, 16, QLatin1Char('0')))); - callstack_model->setItem(i, 2, new QStandardItem(QString::fromStdString(entry.name))); - } - */ -} \ No newline at end of file diff --git a/src/citra_qt/src/callstack.hxx b/src/citra_qt/src/callstack.hxx deleted file mode 100644 index 60b24f23..00000000 --- a/src/citra_qt/src/callstack.hxx +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include "ui_callstack.h" -#include "platform.h" - -class QStandardItemModel; - -class GCallstackView : public QDockWidget -{ - Q_OBJECT - -public: - GCallstackView(QWidget* parent = 0); - -public slots: - void OnCPUStepped(); - -private: - Ui::CallStack ui; - QStandardItemModel* callstack_model; -}; diff --git a/src/citra_qt/src/callstack.ui b/src/citra_qt/src/callstack.ui deleted file mode 100644 index b3c4db63..00000000 --- a/src/citra_qt/src/callstack.ui +++ /dev/null @@ -1,36 +0,0 @@ - - - CallStack - - - - 0 - 0 - 400 - 300 - - - - Call stack - - - - - - - true - - - false - - - false - - - - - - - - - diff --git a/src/citra_qt/src/config/controller_config.cpp b/src/citra_qt/src/config/controller_config.cpp deleted file mode 100644 index 52dfb627..00000000 --- a/src/citra_qt/src/config/controller_config.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include - -#include "controller_config.hxx" -#include "controller_config_util.hxx" - -/* TODO(bunnei): ImplementMe - -using common::Config; - -GControllerConfig::GControllerConfig(common::Config::ControllerPort* initial_config, QWidget* parent) : QWidget(parent) -{ - ui.setupUi(this); - ((QGridLayout*)ui.mainStickTab->layout())->addWidget(new GStickConfig(Config::ANALOG_LEFT, Config::ANALOG_RIGHT, Config::ANALOG_UP, Config::ANALOG_DOWN, this, this), 1, 1); - ((QGridLayout*)ui.cStickTab->layout())->addWidget(new GStickConfig(Config::C_LEFT, Config::C_RIGHT, Config::C_UP, Config::C_DOWN, this, this), 1, 1); - ((QGridLayout*)ui.dPadTab->layout())->addWidget(new GStickConfig(Config::DPAD_LEFT, Config::DPAD_RIGHT, Config::DPAD_UP, Config::DPAD_DOWN, this, this), 1, 1); - - // TODO: Arrange these more compactly? - QVBoxLayout* layout = (QVBoxLayout*)ui.buttonsTab->layout(); - layout->addWidget(new GButtonConfigGroup("A Button", Config::BUTTON_A, this, ui.buttonsTab)); - layout->addWidget(new GButtonConfigGroup("B Button", Config::BUTTON_B, this, ui.buttonsTab)); - layout->addWidget(new GButtonConfigGroup("X Button", Config::BUTTON_X, this, ui.buttonsTab)); - layout->addWidget(new GButtonConfigGroup("Y Button", Config::BUTTON_Y, this, ui.buttonsTab)); - layout->addWidget(new GButtonConfigGroup("Z Button", Config::BUTTON_Z, this, ui.buttonsTab)); - layout->addWidget(new GButtonConfigGroup("L Trigger", Config::TRIGGER_L, this, ui.buttonsTab)); - layout->addWidget(new GButtonConfigGroup("R Trigger", Config::TRIGGER_R, this, ui.buttonsTab)); - layout->addWidget(new GButtonConfigGroup("Start Button", Config::BUTTON_START, this, ui.buttonsTab)); - - memcpy(config, initial_config, sizeof(config)); - - emit ActivePortChanged(config[0]); -} - -void GControllerConfig::OnKeyConfigChanged(common::Config::Control id, int key, const QString& name) -{ - if (InputSourceJoypad()) - { - config[GetActiveController()].pads.key_code[id] = key; - } - else - { - config[GetActiveController()].keys.key_code[id] = key; - } - emit ActivePortChanged(config[GetActiveController()]); -} - -int GControllerConfig::GetActiveController() -{ - return ui.activeControllerCB->currentIndex(); -} - -bool GControllerConfig::InputSourceJoypad() -{ - return ui.inputSourceCB->currentIndex() == 1; -} - -GControllerConfigDialog::GControllerConfigDialog(common::Config::ControllerPort* controller_ports, QWidget* parent) : QDialog(parent), config_ptr(controller_ports) -{ - setWindowTitle(tr("Input configuration")); - - QVBoxLayout* layout = new QVBoxLayout(this); - config_widget = new GControllerConfig(controller_ports, this); - layout->addWidget(config_widget); - - QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); - layout->addWidget(buttons); - - connect(buttons, SIGNAL(rejected()), this, SLOT(reject())); - connect(buttons, SIGNAL(accepted()), this, SLOT(accept())); - - connect(this, SIGNAL(accepted()), this, SLOT(EnableChanges())); - - layout->setSizeConstraint(QLayout::SetFixedSize); - setLayout(layout); - setModal(true); - show(); -} - -void GControllerConfigDialog::EnableChanges() -{ - for (unsigned int i = 0; i < 4; ++i) - { - memcpy(&config_ptr[i], &config_widget->GetControllerConfig(i), sizeof(common::Config::ControllerPort)); - - if (common::g_config) { - // Apply changes if running a game - memcpy(&common::g_config->controller_ports(i), &config_widget->GetControllerConfig(i), sizeof(common::Config::ControllerPort)); - } - } -} - -*/ \ No newline at end of file diff --git a/src/citra_qt/src/config/controller_config.hxx b/src/citra_qt/src/config/controller_config.hxx deleted file mode 100644 index 9ff86a11..00000000 --- a/src/citra_qt/src/config/controller_config.hxx +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _CONTROLLER_CONFIG_HXX_ -#define _CONTROLLER_CONFIG_HXX_ - -#include - -#include "ui_controller_config.h" - -/* TODO(bunnei): ImplementMe - -#include "config.h" - -class GControllerConfig : public QWidget -{ - Q_OBJECT - -public: - GControllerConfig(common::Config::ControllerPort* initial_config, QWidget* parent = NULL); - - const common::Config::ControllerPort& GetControllerConfig(int index) const { return config[index]; } - -signals: - void ActivePortChanged(const common::Config::ControllerPort&); - -public slots: - void OnKeyConfigChanged(common::Config::Control id, int key, const QString& name); - -private: - int GetActiveController(); - bool InputSourceJoypad(); - - Ui::ControllerConfig ui; - common::Config::ControllerPort config[4]; -}; - -class GControllerConfigDialog : public QDialog -{ - Q_OBJECT - -public: - GControllerConfigDialog(common::Config::ControllerPort* controller_ports, QWidget* parent = NULL); - -public slots: - void EnableChanges(); - -private: - GControllerConfig* config_widget; - common::Config::ControllerPort* config_ptr; -}; - -*/ - -#endif // _CONTROLLER_CONFIG_HXX_ diff --git a/src/citra_qt/src/config/controller_config.ui b/src/citra_qt/src/config/controller_config.ui deleted file mode 100644 index 9f650047..00000000 --- a/src/citra_qt/src/config/controller_config.ui +++ /dev/null @@ -1,308 +0,0 @@ - - - ControllerConfig - - - - 0 - 0 - 503 - 293 - - - - - 0 - 0 - - - - Controller Configuration - - - - QLayout::SetFixedSize - - - - - - - - Controller 1 - - - - - Controller 2 - - - - - Controller 3 - - - - - Controller 4 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Enabled - - - - - - - - Keyboard - - - - - Joypad - - - - - - - - Active Controller: - - - - - - - Input Source: - - - - - - - - - 0 - - - - Main Stick - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - C-Stick - - - - - - Qt::Horizontal - - - - 40 - 0 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - D-Pad - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - Buttons - - - - - - - - - - - ControlsChanged() - MainStickCleared() - CStickCleared() - DPadCleared() - ButtonsCleared() - OnControlsChanged() - OnMainStickCleared() - OnCStickCleared() - OnDPadCleared() - OnButtonsCleared() - - diff --git a/src/citra_qt/src/config/controller_config_util.cpp b/src/citra_qt/src/config/controller_config_util.cpp deleted file mode 100644 index c5426570..00000000 --- a/src/citra_qt/src/config/controller_config_util.cpp +++ /dev/null @@ -1,121 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "controller_config_util.hxx" - -/* TODO(bunnei): ImplementMe -GStickConfig::GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent) : QWidget(parent) -{ - left = new GKeyConfigButton(leftid, style()->standardIcon(QStyle::SP_ArrowLeft), QString(), change_receiver, this); - right = new GKeyConfigButton(rightid, style()->standardIcon(QStyle::SP_ArrowRight), QString(), change_receiver, this); - up = new GKeyConfigButton(upid, style()->standardIcon(QStyle::SP_ArrowUp), QString(), change_receiver, this); - down = new GKeyConfigButton(downid, style()->standardIcon(QStyle::SP_ArrowDown), QString(), change_receiver, this); - clear = new QPushButton(tr("Clear"), this); - - QGridLayout* layout = new QGridLayout(this); - layout->addWidget(left, 1, 0); - layout->addWidget(right, 1, 2); - layout->addWidget(up, 0, 1); - layout->addWidget(down, 2, 1); - layout->addWidget(clear, 1, 1); - - setLayout(layout); -} - -GKeyConfigButton::GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent) : QPushButton(icon, text, parent), id(id), inputGrabbed(false) -{ - connect(this, SIGNAL(clicked()), this, SLOT(OnClicked())); - connect(this, SIGNAL(KeyAssigned(common::Config::Control, int, const QString&)), change_receiver, SLOT(OnKeyConfigChanged(common::Config::Control, int, const QString&))); - connect(change_receiver, SIGNAL(ActivePortChanged(const common::Config::ControllerPort&)), this, SLOT(OnActivePortChanged(const common::Config::ControllerPort&))); -} - -GKeyConfigButton::GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent) : QPushButton(text, parent), id(id), inputGrabbed(false) -{ - connect(this, SIGNAL(clicked()), this, SLOT(OnClicked())); - connect(this, SIGNAL(KeyAssigned(common::Config::Control, int, const QString&)), change_receiver, SLOT(OnKeyConfigChanged(common::Config::Control, int, const QString&))); - connect(change_receiver, SIGNAL(ActivePortChanged(const common::Config::ControllerPort&)), this, SLOT(OnActivePortChanged(const common::Config::ControllerPort&))); -} - -void GKeyConfigButton::OnActivePortChanged(const common::Config::ControllerPort& config) -{ - // TODO: Doesn't use joypad struct if that's the input source... - QString text = QKeySequence(config.keys.key_code[id]).toString(); // has a nicer format - if (config.keys.key_code[id] == Qt::Key_Shift) text = tr("Shift"); - else if (config.keys.key_code[id] == Qt::Key_Control) text = tr("Control"); - else if (config.keys.key_code[id] == Qt::Key_Alt) text = tr("Alt"); - else if (config.keys.key_code[id] == Qt::Key_Meta) text = tr("Meta"); - setText(text); -} - -void GKeyConfigButton::OnClicked() -{ - grabKeyboard(); - grabMouse(); - inputGrabbed = true; - - old_text = text(); - setText(tr("Input...")); -} - -void GKeyConfigButton::keyPressEvent(QKeyEvent* event) -{ - if (inputGrabbed) - { - releaseKeyboard(); - releaseMouse(); - setText(QString()); - - // TODO: Doesn't capture "return" key - // TODO: This doesn't quite work well, yet... find a better way - QString text = QKeySequence(event->key()).toString(); // has a nicer format than event->text() - int key = event->key(); - if (event->modifiers() == Qt::ShiftModifier) { text = tr("Shift"); key = Qt::Key_Shift; } - else if (event->modifiers() == Qt::ControlModifier) { text = tr("Ctrl"); key = Qt::Key_Control; } - else if (event->modifiers() == Qt::AltModifier) { text = tr("Alt"); key = Qt::Key_Alt; } - else if (event->modifiers() == Qt::MetaModifier) { text = tr("Meta"); key = Qt::Key_Meta; } - - setText(old_text); - emit KeyAssigned(id, key, text); - - inputGrabbed = false; - - // TODO: Keys like "return" cause another keyPressEvent to be generated after this one... - } - - QPushButton::keyPressEvent(event); // TODO: Necessary? -} - -void GKeyConfigButton::mousePressEvent(QMouseEvent* event) -{ - // Abort key assignment - if (inputGrabbed) - { - releaseKeyboard(); - releaseMouse(); - setText(old_text); - inputGrabbed = false; - } - - QAbstractButton::mousePressEvent(event); -} - -GButtonConfigGroup::GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent) : QWidget(parent), id(id) -{ - QHBoxLayout* layout = new QHBoxLayout(this); - - QPushButton* clear_button = new QPushButton(tr("Clear")); - - layout->addWidget(new QLabel(name, this)); - layout->addWidget(config_button = new GKeyConfigButton(id, QString(), change_receiver, this)); - layout->addWidget(clear_button); - - // TODO: connect config_button, clear_button - - setLayout(layout); -} - -*/ \ No newline at end of file diff --git a/src/citra_qt/src/config/controller_config_util.hxx b/src/citra_qt/src/config/controller_config_util.hxx deleted file mode 100644 index af38f126..00000000 --- a/src/citra_qt/src/config/controller_config_util.hxx +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _CONTROLLER_CONFIG_UTIL_HXX_ -#define _CONTROLLER_CONFIG_UTIL_HXX_ - -#include -#include - -/* TODO(bunnei): ImplementMe - -#include "config.h" - -class GStickConfig : public QWidget -{ - Q_OBJECT - -public: - // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! - GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent = NULL); - -signals: - void LeftChanged(); - void RightChanged(); - void UpChanged(); - void DownChanged(); - -private: - QPushButton* left; - QPushButton* right; - QPushButton* up; - QPushButton* down; - - QPushButton* clear; -}; - -class GKeyConfigButton : public QPushButton -{ - Q_OBJECT - -public: - // TODO: change_receiver also needs to have an ActivePortChanged(const common::Config::ControllerPort&) signal - // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! - GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent); - GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent); - -signals: - void KeyAssigned(common::Config::Control id, int key, const QString& text); - -private slots: - void OnActivePortChanged(const common::Config::ControllerPort& config); - - void OnClicked(); - - void keyPressEvent(QKeyEvent* event); // TODO: bGrabbed? - void mousePressEvent(QMouseEvent* event); - -private: - common::Config::Control id; - bool inputGrabbed; - - QString old_text; -}; - -class GButtonConfigGroup : public QWidget -{ - Q_OBJECT - -public: - // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! - GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent = NULL); - -private: - GKeyConfigButton* config_button; - - common::Config::Control id; -}; - -*/ - -#endif // _CONTROLLER_CONFIG_HXX_ diff --git a/src/citra_qt/src/config/ui_controller_config.h b/src/citra_qt/src/config/ui_controller_config.h deleted file mode 100644 index f84364a7..00000000 --- a/src/citra_qt/src/config/ui_controller_config.h +++ /dev/null @@ -1,222 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'controller_config.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_CONTROLLER_CONFIG_H -#define UI_CONTROLLER_CONFIG_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_ControllerConfig -{ -public: - QVBoxLayout *verticalLayout; - QGridLayout *gridLayout; - QComboBox *activeControllerCB; - QSpacerItem *horizontalSpacer; - QCheckBox *checkBox; - QComboBox *inputSourceCB; - QLabel *label_2; - QLabel *label; - QTabWidget *tabWidget; - QWidget *mainStickTab; - QGridLayout *gridLayout_3; - QSpacerItem *verticalSpacer_2; - QSpacerItem *verticalSpacer_3; - QSpacerItem *horizontalSpacer_4; - QSpacerItem *horizontalSpacer_3; - QWidget *cStickTab; - QGridLayout *gridLayout_4; - QSpacerItem *horizontalSpacer_6; - QSpacerItem *verticalSpacer_5; - QSpacerItem *verticalSpacer_4; - QSpacerItem *horizontalSpacer_5; - QWidget *dPadTab; - QGridLayout *gridLayout_5; - QSpacerItem *horizontalSpacer_7; - QSpacerItem *verticalSpacer_7; - QSpacerItem *verticalSpacer_6; - QSpacerItem *horizontalSpacer_8; - QWidget *buttonsTab; - QVBoxLayout *verticalLayout_2; - - void setupUi(QWidget *ControllerConfig) - { - if (ControllerConfig->objectName().isEmpty()) - ControllerConfig->setObjectName(QString::fromUtf8("ControllerConfig")); - ControllerConfig->resize(503, 293); - QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(ControllerConfig->sizePolicy().hasHeightForWidth()); - ControllerConfig->setSizePolicy(sizePolicy); - verticalLayout = new QVBoxLayout(ControllerConfig); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - verticalLayout->setSizeConstraint(QLayout::SetFixedSize); - gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - activeControllerCB = new QComboBox(ControllerConfig); - activeControllerCB->setObjectName(QString::fromUtf8("activeControllerCB")); - - gridLayout->addWidget(activeControllerCB, 1, 1, 1, 1); - - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout->addItem(horizontalSpacer, 0, 2, 1, 1); - - checkBox = new QCheckBox(ControllerConfig); - checkBox->setObjectName(QString::fromUtf8("checkBox")); - - gridLayout->addWidget(checkBox, 1, 2, 1, 1); - - inputSourceCB = new QComboBox(ControllerConfig); - inputSourceCB->setObjectName(QString::fromUtf8("inputSourceCB")); - - gridLayout->addWidget(inputSourceCB, 0, 1, 1, 1); - - label_2 = new QLabel(ControllerConfig); - label_2->setObjectName(QString::fromUtf8("label_2")); - - gridLayout->addWidget(label_2, 1, 0, 1, 1); - - label = new QLabel(ControllerConfig); - label->setObjectName(QString::fromUtf8("label")); - - gridLayout->addWidget(label, 0, 0, 1, 1); - - - verticalLayout->addLayout(gridLayout); - - tabWidget = new QTabWidget(ControllerConfig); - tabWidget->setObjectName(QString::fromUtf8("tabWidget")); - mainStickTab = new QWidget(); - mainStickTab->setObjectName(QString::fromUtf8("mainStickTab")); - gridLayout_3 = new QGridLayout(mainStickTab); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); - verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_3->addItem(verticalSpacer_2, 2, 2, 1, 1); - - verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_3->addItem(verticalSpacer_3, 0, 2, 1, 1); - - horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_3->addItem(horizontalSpacer_4, 1, 0, 1, 1); - - horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_3->addItem(horizontalSpacer_3, 1, 4, 1, 1); - - tabWidget->addTab(mainStickTab, QString()); - cStickTab = new QWidget(); - cStickTab->setObjectName(QString::fromUtf8("cStickTab")); - gridLayout_4 = new QGridLayout(cStickTab); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); - horizontalSpacer_6 = new QSpacerItem(40, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_4->addItem(horizontalSpacer_6, 1, 0, 1, 1); - - verticalSpacer_5 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_4->addItem(verticalSpacer_5, 0, 1, 1, 1); - - verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_4->addItem(verticalSpacer_4, 2, 1, 1, 1); - - horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_4->addItem(horizontalSpacer_5, 1, 2, 1, 1); - - tabWidget->addTab(cStickTab, QString()); - dPadTab = new QWidget(); - dPadTab->setObjectName(QString::fromUtf8("dPadTab")); - gridLayout_5 = new QGridLayout(dPadTab); - gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5")); - horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_5->addItem(horizontalSpacer_7, 1, 2, 1, 1); - - verticalSpacer_7 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_5->addItem(verticalSpacer_7, 0, 1, 1, 1); - - verticalSpacer_6 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_5->addItem(verticalSpacer_6, 2, 1, 1, 1); - - horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_5->addItem(horizontalSpacer_8, 1, 0, 1, 1); - - tabWidget->addTab(dPadTab, QString()); - buttonsTab = new QWidget(); - buttonsTab->setObjectName(QString::fromUtf8("buttonsTab")); - verticalLayout_2 = new QVBoxLayout(buttonsTab); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); - tabWidget->addTab(buttonsTab, QString()); - - verticalLayout->addWidget(tabWidget); - - - retranslateUi(ControllerConfig); - - tabWidget->setCurrentIndex(0); - - - QMetaObject::connectSlotsByName(ControllerConfig); - } // setupUi - - void retranslateUi(QWidget *ControllerConfig) - { - ControllerConfig->setWindowTitle(QApplication::translate("ControllerConfig", "Controller Configuration", 0, QApplication::UnicodeUTF8)); - activeControllerCB->clear(); - activeControllerCB->insertItems(0, QStringList() - << QApplication::translate("ControllerConfig", "Controller 1", 0, QApplication::UnicodeUTF8) - << QApplication::translate("ControllerConfig", "Controller 2", 0, QApplication::UnicodeUTF8) - << QApplication::translate("ControllerConfig", "Controller 3", 0, QApplication::UnicodeUTF8) - << QApplication::translate("ControllerConfig", "Controller 4", 0, QApplication::UnicodeUTF8) - ); - checkBox->setText(QApplication::translate("ControllerConfig", "Enabled", 0, QApplication::UnicodeUTF8)); - inputSourceCB->clear(); - inputSourceCB->insertItems(0, QStringList() - << QApplication::translate("ControllerConfig", "Keyboard", 0, QApplication::UnicodeUTF8) - << QApplication::translate("ControllerConfig", "Joypad", 0, QApplication::UnicodeUTF8) - ); - label_2->setText(QApplication::translate("ControllerConfig", "Active Controller:", 0, QApplication::UnicodeUTF8)); - label->setText(QApplication::translate("ControllerConfig", "Input Source:", 0, QApplication::UnicodeUTF8)); - tabWidget->setTabText(tabWidget->indexOf(mainStickTab), QApplication::translate("ControllerConfig", "Main Stick", 0, QApplication::UnicodeUTF8)); - tabWidget->setTabText(tabWidget->indexOf(cStickTab), QApplication::translate("ControllerConfig", "C-Stick", 0, QApplication::UnicodeUTF8)); - tabWidget->setTabText(tabWidget->indexOf(dPadTab), QApplication::translate("ControllerConfig", "D-Pad", 0, QApplication::UnicodeUTF8)); - tabWidget->setTabText(tabWidget->indexOf(buttonsTab), QApplication::translate("ControllerConfig", "Buttons", 0, QApplication::UnicodeUTF8)); - } // retranslateUi - -}; - -namespace Ui { - class ControllerConfig: public Ui_ControllerConfig {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_CONTROLLER_CONFIG_H diff --git a/src/citra_qt/src/cpu_regs.cpp b/src/citra_qt/src/cpu_regs.cpp deleted file mode 100644 index f2859f69..00000000 --- a/src/citra_qt/src/cpu_regs.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include "cpu_regs.hxx" - -#include "core.h" -#include "arm/interpreter/armdefs.h" - -GARM11RegsView::GARM11RegsView(QWidget* parent) : QDockWidget(parent) -{ - cpu_regs_ui.setupUi(this); - - tree = cpu_regs_ui.treeWidget; - tree->addTopLevelItem(registers = new QTreeWidgetItem(QStringList("Registers"))); - tree->addTopLevelItem(CSPR = new QTreeWidgetItem(QStringList("CSPR"))); - - registers->setExpanded(true); - CSPR->setExpanded(true); - - for (int i = 0; i < 16; ++i) - { - QTreeWidgetItem* child = new QTreeWidgetItem(QStringList(QString("R[%1]").arg(i, 2, 10, QLatin1Char('0')))); - registers->addChild(child); - } - - CSPR->addChild(new QTreeWidgetItem(QStringList("M"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("T"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("F"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("I"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("A"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("E"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("IT"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("GE"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("DNM"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("J"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("Q"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("V"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("C"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("Z"))); - CSPR->addChild(new QTreeWidgetItem(QStringList("N"))); -} - -void GARM11RegsView::OnCPUStepped() -{ - ARM_Interface* app_core = Core::g_app_core; - - for (int i = 0; i < 16; ++i) - registers->child(i)->setText(1, QString("0x%1").arg(app_core->Reg(i), 8, 16, QLatin1Char('0'))); - - CSPR->setText(1, QString("0x%1").arg(app_core->CPSR(), 8, 16, QLatin1Char('0'))); - CSPR->child(0)->setText(1, QString("b%1").arg(app_core->CPSR() & 0x1F, 5, 2, QLatin1Char('0'))); // M - Mode - CSPR->child(1)->setText(1, QString("%1").arg((app_core->CPSR() >> 5) & 0x1)); // T - State - CSPR->child(2)->setText(1, QString("%1").arg((app_core->CPSR() >> 6) & 0x1)); // F - FIQ disable - CSPR->child(3)->setText(1, QString("%1").arg((app_core->CPSR() >> 7) & 0x1)); // I - IRQ disable - CSPR->child(4)->setText(1, QString("%1").arg((app_core->CPSR() >> 8) & 0x1)); // A - Imprecise abort - CSPR->child(5)->setText(1, QString("%1").arg((app_core->CPSR() >> 9) & 0x1)); // E - Data endianess - CSPR->child(6)->setText(1, QString("%1").arg((app_core->CPSR() >> 10) & 0x3F)); // IT - If-Then state (DNM) - CSPR->child(7)->setText(1, QString("%1").arg((app_core->CPSR() >> 16) & 0xF)); // GE - Greater-than-or-Equal - CSPR->child(8)->setText(1, QString("%1").arg((app_core->CPSR() >> 20) & 0xF)); // DNM - Do not modify - CSPR->child(9)->setText(1, QString("%1").arg((app_core->CPSR() >> 24) & 0x1)); // J - Java state - CSPR->child(10)->setText(1, QString("%1").arg((app_core->CPSR() >> 27) & 0x1)); // Q - Sticky overflow - CSPR->child(11)->setText(1, QString("%1").arg((app_core->CPSR() >> 28) & 0x1)); // V - Overflow - CSPR->child(12)->setText(1, QString("%1").arg((app_core->CPSR() >> 29) & 0x1)); // C - Carry/Borrow/Extend - CSPR->child(13)->setText(1, QString("%1").arg((app_core->CPSR() >> 30) & 0x1)); // Z - Zero - CSPR->child(14)->setText(1, QString("%1").arg((app_core->CPSR() >> 31) & 0x1)); // N - Negative/Less than -} diff --git a/src/citra_qt/src/cpu_regs.hxx b/src/citra_qt/src/cpu_regs.hxx deleted file mode 100644 index 27c194bd..00000000 --- a/src/citra_qt/src/cpu_regs.hxx +++ /dev/null @@ -1,27 +0,0 @@ -#include "ui_cpu_regs.h" - -#include -#include - -//#include "ui_gekko_regs.h" - -class QTreeWidget; - -class GARM11RegsView : public QDockWidget -{ - Q_OBJECT - -public: - GARM11RegsView(QWidget* parent = NULL); - -public slots: - void OnCPUStepped(); - -private: - Ui::ARMRegisters cpu_regs_ui; - - QTreeWidget* tree; - - QTreeWidgetItem* registers; - QTreeWidgetItem* CSPR; -}; diff --git a/src/citra_qt/src/cpu_regs.ui b/src/citra_qt/src/cpu_regs.ui deleted file mode 100644 index 6537c9cd..00000000 --- a/src/citra_qt/src/cpu_regs.ui +++ /dev/null @@ -1,40 +0,0 @@ - - - ARMRegisters - - - - 0 - 0 - 400 - 300 - - - - ARM registers - - - - - - - true - - - - Register - - - - - Value - - - - - - - - - - diff --git a/src/citra_qt/src/disasm.cpp b/src/citra_qt/src/disasm.cpp deleted file mode 100644 index ddcbf69d..00000000 --- a/src/citra_qt/src/disasm.cpp +++ /dev/null @@ -1,135 +0,0 @@ -#include -#include "ui_disasm.h" -#include "disasm.hxx" - -#include "bootmanager.hxx" -#include "hotkeys.hxx" - -#include "common.h" -#include "mem_map.h" - -#include "core.h" -#include "break_points.h" -#include "arm/interpreter/armdefs.h" -#include "arm/disassembler/arm_disasm.h" - -GDisAsmView::GDisAsmView(QWidget* parent, EmuThread& emu_thread) : QDockWidget(parent), base_addr(0), emu_thread(emu_thread) -{ - disasm_ui.setupUi(this); - - breakpoints = new BreakPoints(); - - model = new QStandardItemModel(this); - model->setColumnCount(2); - disasm_ui.treeView->setModel(model); - - RegisterHotkey("Disassembler", "Start/Stop", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut); - RegisterHotkey("Disassembler", "Step", QKeySequence(Qt::Key_F10), Qt::ApplicationShortcut); - RegisterHotkey("Disassembler", "Step into", QKeySequence(Qt::Key_F11), Qt::ApplicationShortcut); - RegisterHotkey("Disassembler", "Set Breakpoint", QKeySequence(Qt::Key_F9), Qt::ApplicationShortcut); - - connect(disasm_ui.button_breakpoint, SIGNAL(clicked()), this, SLOT(OnSetBreakpoint())); - connect(disasm_ui.button_step, SIGNAL(clicked()), this, SLOT(OnStep())); - connect(disasm_ui.button_pause, SIGNAL(clicked()), this, SLOT(OnPause())); - connect(disasm_ui.button_continue, SIGNAL(clicked()), this, SLOT(OnContinue())); - - connect(GetHotkey("Disassembler", "Start/Stop", this), SIGNAL(activated()), this, SLOT(OnToggleStartStop())); - connect(GetHotkey("Disassembler", "Step", this), SIGNAL(activated()), this, SLOT(OnStep())); - connect(GetHotkey("Disassembler", "Step into", this), SIGNAL(activated()), this, SLOT(OnStepInto())); - connect(GetHotkey("Disassembler", "Set Breakpoint", this), SIGNAL(activated()), this, SLOT(OnSetBreakpoint())); -} - -void GDisAsmView::Init() -{ - ARM_Disasm* disasm = new ARM_Disasm(); - - base_addr = Core::g_app_core->PC(); - unsigned int curInstAddr = base_addr; - char result[255]; - - for (int i = 0; i < 10000; i++) // fixed for now - { - disasm->disasm(curInstAddr, Memory::Read32(curInstAddr), result); - model->setItem(i, 0, new QStandardItem(QString("0x%1").arg((uint)(curInstAddr), 8, 16, QLatin1Char('0')))); - model->setItem(i, 1, new QStandardItem(QString(result))); - curInstAddr += 4; - } - disasm_ui.treeView->resizeColumnToContents(0); - disasm_ui.treeView->resizeColumnToContents(1); - - QModelIndex model_index = model->index(0, 0); - disasm_ui.treeView->scrollTo(model_index); - disasm_ui.treeView->selectionModel()->setCurrentIndex(model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); -} - -void GDisAsmView::OnSetBreakpoint() -{ - int selected_row = SelectedRow(); - - if (selected_row == -1) - return; - - u32 address = base_addr + (selected_row * 4); - if (breakpoints->IsAddressBreakPoint(address)) - { - breakpoints->Remove(address); - model->item(selected_row, 0)->setBackground(QBrush()); - model->item(selected_row, 1)->setBackground(QBrush()); - } - else - { - breakpoints->Add(address); - model->item(selected_row, 0)->setBackground(QBrush(QColor(0xFF, 0x99, 0x99))); - model->item(selected_row, 1)->setBackground(QBrush(QColor(0xFF, 0x99, 0x99))); - } -} - -void GDisAsmView::OnContinue() -{ - emu_thread.SetCpuRunning(true); -} - -void GDisAsmView::OnStep() -{ - OnStepInto(); // change later -} - -void GDisAsmView::OnStepInto() -{ - emu_thread.SetCpuRunning(false); - emu_thread.ExecStep(); -} - -void GDisAsmView::OnPause() -{ - emu_thread.SetCpuRunning(false); -} - -void GDisAsmView::OnToggleStartStop() -{ - emu_thread.SetCpuRunning(!emu_thread.IsCpuRunning()); -} - -void GDisAsmView::OnCPUStepped() -{ - ARMword next_instr = Core::g_app_core->PC(); - - if (breakpoints->IsAddressBreakPoint(next_instr)) - { - emu_thread.SetCpuRunning(false); - } - - unsigned int index = (next_instr - base_addr) / 4; - QModelIndex model_index = model->index(index, 0); - disasm_ui.treeView->scrollTo(model_index); - disasm_ui.treeView->selectionModel()->setCurrentIndex(model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); -} - -int GDisAsmView::SelectedRow() -{ - QModelIndex index = disasm_ui.treeView->selectionModel()->currentIndex(); - if (!index.isValid()) - return -1; - - return model->itemFromIndex(disasm_ui.treeView->selectionModel()->currentIndex())->row(); -} \ No newline at end of file diff --git a/src/citra_qt/src/disasm.hxx b/src/citra_qt/src/disasm.hxx deleted file mode 100644 index 0e4a0fc3..00000000 --- a/src/citra_qt/src/disasm.hxx +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include "ui_disasm.h" - -#include "common.h" -#include "break_points.h" - -class QAction; -class QStandardItemModel; -class EmuThread; - -class GDisAsmView : public QDockWidget -{ - Q_OBJECT - -public: - GDisAsmView(QWidget* parent, EmuThread& emu_thread); - - void Init(); - -public slots: - void OnSetBreakpoint(); - void OnContinue(); - void OnStep(); - void OnStepInto(); - void OnPause(); - void OnToggleStartStop(); - - void OnCPUStepped(); - -private: - // returns -1 if no row is selected - int SelectedRow(); - - Ui::DockWidget disasm_ui; - QStandardItemModel* model; - - u32 base_addr; - - BreakPoints* breakpoints; - - EmuThread& emu_thread; -}; diff --git a/src/citra_qt/src/disasm.ui b/src/citra_qt/src/disasm.ui deleted file mode 100644 index fb384516..00000000 --- a/src/citra_qt/src/disasm.ui +++ /dev/null @@ -1,78 +0,0 @@ - - - DockWidget - - - - 0 - 0 - 430 - 401 - - - - Disassembly - - - - - - - - - Step - - - - - - - Pause - - - - - - - Continue - - - - - - - Step Into - - - - - - - Set Breakpoint - - - - - - - - - true - - - 20 - - - false - - - false - - - - - - - - - diff --git a/src/citra_qt/src/hotkeys.cpp b/src/citra_qt/src/hotkeys.cpp deleted file mode 100644 index 1aa1e8b9..00000000 --- a/src/citra_qt/src/hotkeys.cpp +++ /dev/null @@ -1,111 +0,0 @@ -#include -#include -#include "hotkeys.hxx" -#include - -struct Hotkey -{ - Hotkey() : shortcut(NULL), context(Qt::WindowShortcut) {} - - QKeySequence keyseq; - QShortcut* shortcut; - Qt::ShortcutContext context; -}; - -typedef std::map HotkeyMap; -typedef std::map HotkeyGroupMap; - -HotkeyGroupMap hotkey_groups; - -void SaveHotkeys(QSettings& settings) -{ - settings.beginGroup("Shortcuts"); - - for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group) - { - settings.beginGroup(group->first); - for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey) - { - settings.beginGroup(hotkey->first); - settings.setValue(QString("KeySeq"), hotkey->second.keyseq.toString()); - settings.setValue(QString("Context"), hotkey->second.context); - settings.endGroup(); - } - settings.endGroup(); - } - settings.endGroup(); -} - -void LoadHotkeys(QSettings& settings) -{ - settings.beginGroup("Shortcuts"); - - // Make sure NOT to use a reference here because it would become invalid once we call beginGroup() - QStringList groups = settings.childGroups(); - for (QList::iterator group = groups.begin(); group != groups.end(); ++group) - { - settings.beginGroup(*group); - - QStringList hotkeys = settings.childGroups(); - for (QList::iterator hotkey = hotkeys.begin(); hotkey != hotkeys.end(); ++hotkey) - { - settings.beginGroup(*hotkey); - - // RegisterHotkey assigns default keybindings, so use old values as default parameters - Hotkey& hk = hotkey_groups[*group][*hotkey]; - hk.keyseq = QKeySequence::fromString(settings.value("KeySeq", hk.keyseq.toString()).toString()); - hk.context = (Qt::ShortcutContext)settings.value("Context", hk.context).toInt(); - if (hk.shortcut) - hk.shortcut->setKey(hk.keyseq); - - settings.endGroup(); - } - - settings.endGroup(); - } - - settings.endGroup(); -} - -void RegisterHotkey(const QString& group, const QString& action, const QKeySequence& default_keyseq, Qt::ShortcutContext default_context) -{ - if (hotkey_groups[group].find(action) == hotkey_groups[group].end()) - { - hotkey_groups[group][action].keyseq = default_keyseq; - hotkey_groups[group][action].context = default_context; - } -} - -QShortcut* GetHotkey(const QString& group, const QString& action, QWidget* widget) -{ - Hotkey& hk = hotkey_groups[group][action]; - - if (!hk.shortcut) - hk.shortcut = new QShortcut(hk.keyseq, widget, NULL, NULL, hk.context); - - return hk.shortcut; -} - - -GHotkeysDialog::GHotkeysDialog(QWidget* parent): QDialog(parent) -{ - ui.setupUi(this); - - for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group) - { - QTreeWidgetItem* toplevel_item = new QTreeWidgetItem(QStringList(group->first)); - for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey) - { - QStringList columns; - columns << hotkey->first << hotkey->second.keyseq.toString(); - QTreeWidgetItem* item = new QTreeWidgetItem(columns); - toplevel_item->addChild(item); - } - ui.treeWidget->addTopLevelItem(toplevel_item); - } - // TODO: Make context configurable as well (hiding the column for now) - ui.treeWidget->setColumnCount(2); - - ui.treeWidget->resizeColumnToContents(0); - ui.treeWidget->resizeColumnToContents(1); -} diff --git a/src/citra_qt/src/hotkeys.hxx b/src/citra_qt/src/hotkeys.hxx deleted file mode 100644 index 66ef7bb4..00000000 --- a/src/citra_qt/src/hotkeys.hxx +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include -#include "ui_hotkeys.h" - -class QKeySequence; -class QSettings; - -/** - * Register a hotkey. - * - * @param group General group this hotkey belongs to (e.g. "Main Window", "Debugger") - * @param action Name of the action (e.g. "Start Emulation", "Load Image") - * @param default_keyseq Default key sequence to assign if the hotkey wasn't present in the settings file before - * @param default_context Default context to assign if the hotkey wasn't present in the settings file before - * @warning Both the group and action strings will be displayed in the hotkey settings dialog - */ -void RegisterHotkey(const QString& group, const QString& action, const QKeySequence& default_keyseq = QKeySequence(), Qt::ShortcutContext default_context = Qt::WindowShortcut); - -/** - * Returns a QShortcut object whose activated() signal can be connected to other QObjects' slots. - * - * @param widget Parent widget of the returned QShortcut. - * @warning If multiple QWidgets' call this function for the same action, the returned QShortcut will be the same. Thus, you shouldn't rely on the caller really being the QShortcut's parent. - */ -QShortcut* GetHotkey(const QString& group, const QString& action, QWidget* widget); - -/** - * Saves all registered hotkeys to the settings file. - * - * @note Each hotkey group will be stored a settings group; For each hotkey inside that group, a settings group will be created to store the key sequence and the hotkey context. - */ -void SaveHotkeys(QSettings& settings); - -/** - * Loads hotkeys from the settings file. - * - * @note Yet unregistered hotkeys which are present in the settings will automatically be registered. - */ -void LoadHotkeys(QSettings& settings); - -class GHotkeysDialog : public QDialog -{ - Q_OBJECT - -public: - GHotkeysDialog(QWidget* parent = NULL); - -private: - Ui::hotkeys ui; -}; diff --git a/src/citra_qt/src/hotkeys.ui b/src/citra_qt/src/hotkeys.ui deleted file mode 100644 index 38a9a14d..00000000 --- a/src/citra_qt/src/hotkeys.ui +++ /dev/null @@ -1,89 +0,0 @@ - - - hotkeys - - - - 0 - 0 - 363 - 388 - - - - Hotkey Settings - - - - - - QAbstractItemView::SelectItems - - - false - - - - Action - - - - - Hotkey - - - - - Context - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset - - - - - - - - - buttonBox - accepted() - hotkeys - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - hotkeys - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/src/citra_qt/src/main.cpp b/src/citra_qt/src/main.cpp deleted file mode 100644 index d7104eb0..00000000 --- a/src/citra_qt/src/main.cpp +++ /dev/null @@ -1,230 +0,0 @@ -#include -#include -#include -#include "qhexedit.h" -#include "main.hxx" - -#include "common.h" -#include "platform.h" -#if EMU_PLATFORM == PLATFORM_LINUX -#include -#endif - -#include "bootmanager.hxx" -#include "hotkeys.hxx" - -//debugger -#include "disasm.hxx" -#include "cpu_regs.hxx" -#include "callstack.hxx" -#include "ramview.hxx" - -#include "system.h" -#include "loader.h" -#include "core.h" -#include "version.h" - - -GMainWindow::GMainWindow() -{ - ui.setupUi(this); - statusBar()->hide(); - - render_window = new GRenderWindow; - render_window->hide(); - - disasm = new GDisAsmView(this, render_window->GetEmuThread()); - addDockWidget(Qt::BottomDockWidgetArea, disasm); - disasm->hide(); - - arm_regs = new GARM11RegsView(this); - addDockWidget(Qt::RightDockWidgetArea, arm_regs); - arm_regs->hide(); - - QMenu* debug_menu = ui.menu_View->addMenu(tr("Debugging")); - debug_menu->addAction(disasm->toggleViewAction()); - debug_menu->addAction(arm_regs->toggleViewAction()); - - // Set default UI state - // geometry: 55% of the window contents are in the upper screen half, 45% in the lower half - QDesktopWidget* desktop = ((QApplication*)QApplication::instance())->desktop(); - QRect screenRect = desktop->screenGeometry(this); - int x, y, w, h; - w = screenRect.width() * 2 / 3; - h = screenRect.height() / 2; - x = (screenRect.x() + screenRect.width()) / 2 - w / 2; - y = (screenRect.y() + screenRect.height()) / 2 - h * 55 / 100; - setGeometry(x, y, w, h); - - - // Restore UI state - QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Citra team", "Citra"); - restoreGeometry(settings.value("geometry").toByteArray()); - restoreState(settings.value("state").toByteArray()); - render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray()); - - ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", false).toBool()); - SetupEmuWindowMode(); - - // Setup connections - connect(ui.action_load_elf, SIGNAL(triggered()), this, SLOT(OnMenuLoadELF())); - connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); - connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); - connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); - connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(SetupEmuWindowMode())); - connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog())); - - // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views before the CPU continues - connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), disasm, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection); - connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), arm_regs, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection); - - // Setup hotkeys - RegisterHotkey("Main Window", "Load Image", QKeySequence::Open); - RegisterHotkey("Main Window", "Start Emulation"); - LoadHotkeys(settings); - - connect(GetHotkey("Main Window", "Load Image", this), SIGNAL(activated()), this, SLOT(OnMenuLoadImage())); - connect(GetHotkey("Main Window", "Start Emulation", this), SIGNAL(activated()), this, SLOT(OnStartGame())); - - show(); - - System::Init(render_window); -} - -GMainWindow::~GMainWindow() -{ - // will get automatically deleted otherwise - if (render_window->parent() == NULL) - delete render_window; -} - -void GMainWindow::BootGame(const char* filename) -{ - render_window->DoneCurrent(); // make sure EmuThread can access GL context - render_window->GetEmuThread().SetFilename(filename); - - NOTICE_LOG(MASTER_LOG, "citra starting...\n"); - - if (Core::Init(/*render_window*/)) { - ERROR_LOG(MASTER_LOG, "core initialization failed, exiting..."); - Core::Stop(); - exit(1); - } - - // Load a game or die... - std::string boot_filename = filename; - std::string error_str; - bool res = Loader::LoadFile(boot_filename, &error_str); - - if (!res) { - ERROR_LOG(BOOT, "Failed to load ROM: %s", error_str.c_str()); - } - - disasm->Init(); - arm_regs->OnCPUStepped(); - - render_window->GetEmuThread().start(); - - SetupEmuWindowMode(); - render_window->show(); -} - -void GMainWindow::OnMenuLoadELF() -{ - QString filename = QFileDialog::getOpenFileName(this, tr("Load ELF"), QString(), QString()); - if (filename.size()) - BootGame(filename.toLatin1().data()); -} - -void GMainWindow::OnStartGame() -{ - render_window->show(); - render_window->GetEmuThread().SetCpuRunning(true); - - ui.action_Start->setEnabled(false); - ui.action_Pause->setEnabled(true); - ui.action_Stop->setEnabled(true); -} - -void GMainWindow::OnPauseGame() -{ - render_window->GetEmuThread().SetCpuRunning(false); - - ui.action_Start->setEnabled(true); - ui.action_Pause->setEnabled(false); - ui.action_Stop->setEnabled(true); -} - -void GMainWindow::OnStopGame() -{ - render_window->GetEmuThread().SetCpuRunning(false); - - ui.action_Start->setEnabled(true); - ui.action_Pause->setEnabled(false); - ui.action_Stop->setEnabled(false); -} - -void GMainWindow::OnOpenHotkeysDialog() -{ - GHotkeysDialog dialog(this); - dialog.exec(); -} - - -void GMainWindow::SetupEmuWindowMode() -{ - //if (!render_window->GetEmuThread().isRunning()) - // return; - - bool enable = ui.action_Single_Window_Mode->isChecked(); - if (enable && render_window->parent() == NULL) // switch to single window mode - { - render_window->BackupGeometry(); - ui.horizontalLayout->addWidget(render_window); - render_window->setVisible(true); - render_window->DoneCurrent(); - } - else if (!enable && render_window->parent() != NULL) // switch to multiple windows mode - { - ui.horizontalLayout->removeWidget(render_window); - render_window->setParent(NULL); - render_window->setVisible(true); - render_window->DoneCurrent(); - render_window->RestoreGeometry(); - } -} - -void GMainWindow::OnConfigure() -{ - //GControllerConfigDialog* dialog = new GControllerConfigDialog(controller_ports, this); -} - -void GMainWindow::closeEvent(QCloseEvent* event) -{ - // Save window layout - QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Citra team", "Citra"); - settings.setValue("geometry", saveGeometry()); - settings.setValue("state", saveState()); - settings.setValue("geometryRenderWindow", render_window->saveGeometry()); - settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked()); - settings.setValue("firstStart", false); - SaveHotkeys(settings); - - render_window->close(); - - QWidget::closeEvent(event); -} - -#ifdef main -#undef main -#endif - -int __cdecl main(int argc, char* argv[]) -{ - QApplication::setAttribute(Qt::AA_X11InitThreads); - QApplication app(argc, argv); - GMainWindow main_window; - - main_window.show(); - return app.exec(); -} diff --git a/src/citra_qt/src/main.hxx b/src/citra_qt/src/main.hxx deleted file mode 100644 index 34bd2c3a..00000000 --- a/src/citra_qt/src/main.hxx +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef _CITRA_QT_MAIN_HXX_ -#define _CITRA_QT_MAIN_HXX_ - -#include - -#include "ui_main.h" - -class GImageInfo; -class GRenderWindow; -class GDisAsmView; -class GARM11RegsView; - -class GMainWindow : public QMainWindow -{ - Q_OBJECT - - // TODO: Make use of this! - enum { - UI_IDLE, - UI_EMU_BOOTING, - UI_EMU_RUNNING, - UI_EMU_STOPPING, - }; - -public: - GMainWindow(); - ~GMainWindow(); - -private: - void BootGame(const char* filename); - - void closeEvent(QCloseEvent* event); - -private slots: - void OnStartGame(); - void OnPauseGame(); - void OnStopGame(); - void OnMenuLoadELF(); - void OnOpenHotkeysDialog(); - void SetupEmuWindowMode(); - void OnConfigure(); - -private: - Ui::MainWindow ui; - - GRenderWindow* render_window; - GDisAsmView* disasm; - GARM11RegsView* arm_regs; -}; - -#endif // _CITRA_QT_MAIN_HXX_ diff --git a/src/citra_qt/src/main.ui b/src/citra_qt/src/main.ui deleted file mode 100644 index bc895d89..00000000 --- a/src/citra_qt/src/main.ui +++ /dev/null @@ -1,168 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 1081 - 730 - - - - Citra - - - - src/pcafe/res/icon3_64x64.icosrc/pcafe/res/icon3_64x64.ico - - - QTabWidget::Rounded - - - true - - - - - - - - 0 - 0 - 1081 - 20 - - - - - &File - - - - - - - - &Emulation - - - - - - - - - - &View - - - - - - - &Help - - - - - - - - - - - - Load ELF ... - - - - - E&xit - - - - - &Start - - - - - false - - - &Pause - - - - - false - - - &Stop - - - - - About Citra - - - - - true - - - Single Window Mode - - - - - Configure &Hotkeys ... - - - - - Configure ... - - - - - - - action_Exit - triggered() - MainWindow - close() - - - -1 - -1 - - - 367 - 314 - - - - - action_Configure - triggered() - MainWindow - OnConfigure() - - - -1 - -1 - - - 540 - 364 - - - - - - OnConfigure() - - diff --git a/src/citra_qt/src/ramview.cpp b/src/citra_qt/src/ramview.cpp deleted file mode 100644 index 8cc252af..00000000 --- a/src/citra_qt/src/ramview.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "ramview.hxx" - -#include "common.h" -#include "memory.h" -GRamView::GRamView(QWidget* parent) : QHexEdit(parent) -{ -} - -void GRamView::OnCPUStepped() -{ - // TODO: QHexEdit doesn't show vertical scroll bars for > 10MB data streams... - //setData(QByteArray((const char*)Mem_RAM,sizeof(Mem_RAM)/8)); -} \ No newline at end of file diff --git a/src/citra_qt/src/ramview.hxx b/src/citra_qt/src/ramview.hxx deleted file mode 100644 index 1db1546a..00000000 --- a/src/citra_qt/src/ramview.hxx +++ /dev/null @@ -1,12 +0,0 @@ -#include "qhexedit.h" - -class GRamView : public QHexEdit -{ - Q_OBJECT - -public: - GRamView(QWidget* parent = NULL); - -public slots: - void OnCPUStepped(); -}; diff --git a/src/citra_qt/src/ui_callstack.h b/src/citra_qt/src/ui_callstack.h deleted file mode 100644 index 75d10253..00000000 --- a/src/citra_qt/src/ui_callstack.h +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'callstack.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_CALLSTACK_H -#define UI_CALLSTACK_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_CallStack -{ -public: - QWidget *dockWidgetContents; - QVBoxLayout *verticalLayout; - QTreeView *treeView; - - void setupUi(QDockWidget *CallStack) - { - if (CallStack->objectName().isEmpty()) - CallStack->setObjectName(QString::fromUtf8("CallStack")); - CallStack->resize(400, 300); - dockWidgetContents = new QWidget(); - dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); - verticalLayout = new QVBoxLayout(dockWidgetContents); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - treeView = new QTreeView(dockWidgetContents); - treeView->setObjectName(QString::fromUtf8("treeView")); - treeView->setAlternatingRowColors(true); - treeView->setRootIsDecorated(false); - treeView->setItemsExpandable(false); - - verticalLayout->addWidget(treeView); - - CallStack->setWidget(dockWidgetContents); - - retranslateUi(CallStack); - - QMetaObject::connectSlotsByName(CallStack); - } // setupUi - - void retranslateUi(QDockWidget *CallStack) - { - CallStack->setWindowTitle(QApplication::translate("CallStack", "Call stack", 0, QApplication::UnicodeUTF8)); - } // retranslateUi - -}; - -namespace Ui { - class CallStack: public Ui_CallStack {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_CALLSTACK_H diff --git a/src/citra_qt/src/ui_cpu_regs.h b/src/citra_qt/src/ui_cpu_regs.h deleted file mode 100644 index b8a80b3f..00000000 --- a/src/citra_qt/src/ui_cpu_regs.h +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'cpu_regs.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_CPU_REGS_H -#define UI_CPU_REGS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_ARMRegisters -{ -public: - QWidget *dockWidgetContents; - QVBoxLayout *verticalLayout; - QTreeWidget *treeWidget; - - void setupUi(QDockWidget *ARMRegisters) - { - if (ARMRegisters->objectName().isEmpty()) - ARMRegisters->setObjectName(QString::fromUtf8("ARMRegisters")); - ARMRegisters->resize(400, 300); - dockWidgetContents = new QWidget(); - dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); - verticalLayout = new QVBoxLayout(dockWidgetContents); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - treeWidget = new QTreeWidget(dockWidgetContents); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); - treeWidget->setAlternatingRowColors(true); - - verticalLayout->addWidget(treeWidget); - - ARMRegisters->setWidget(dockWidgetContents); - - retranslateUi(ARMRegisters); - - QMetaObject::connectSlotsByName(ARMRegisters); - } // setupUi - - void retranslateUi(QDockWidget *ARMRegisters) - { - ARMRegisters->setWindowTitle(QApplication::translate("ARMRegisters", "ARM registers", 0, QApplication::UnicodeUTF8)); - QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); - ___qtreewidgetitem->setText(1, QApplication::translate("ARMRegisters", "Value", 0, QApplication::UnicodeUTF8)); - ___qtreewidgetitem->setText(0, QApplication::translate("ARMRegisters", "Register", 0, QApplication::UnicodeUTF8)); - } // retranslateUi - -}; - -namespace Ui { - class ARMRegisters: public Ui_ARMRegisters {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_CPU_REGS_H diff --git a/src/citra_qt/src/ui_disasm.h b/src/citra_qt/src/ui_disasm.h deleted file mode 100644 index 697a224c..00000000 --- a/src/citra_qt/src/ui_disasm.h +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'disasm.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_DISASM_H -#define UI_DISASM_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_DockWidget -{ -public: - QWidget *dockWidgetContents; - QVBoxLayout *verticalLayout; - QHBoxLayout *horizontalLayout; - QPushButton *button_step; - QPushButton *button_pause; - QPushButton *button_continue; - QPushButton *pushButton; - QPushButton *button_breakpoint; - QTreeView *treeView; - - void setupUi(QDockWidget *DockWidget) - { - if (DockWidget->objectName().isEmpty()) - DockWidget->setObjectName(QString::fromUtf8("DockWidget")); - DockWidget->resize(430, 401); - dockWidgetContents = new QWidget(); - dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); - verticalLayout = new QVBoxLayout(dockWidgetContents); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - button_step = new QPushButton(dockWidgetContents); - button_step->setObjectName(QString::fromUtf8("button_step")); - - horizontalLayout->addWidget(button_step); - - button_pause = new QPushButton(dockWidgetContents); - button_pause->setObjectName(QString::fromUtf8("button_pause")); - - horizontalLayout->addWidget(button_pause); - - button_continue = new QPushButton(dockWidgetContents); - button_continue->setObjectName(QString::fromUtf8("button_continue")); - - horizontalLayout->addWidget(button_continue); - - pushButton = new QPushButton(dockWidgetContents); - pushButton->setObjectName(QString::fromUtf8("pushButton")); - - horizontalLayout->addWidget(pushButton); - - button_breakpoint = new QPushButton(dockWidgetContents); - button_breakpoint->setObjectName(QString::fromUtf8("button_breakpoint")); - - horizontalLayout->addWidget(button_breakpoint); - - - verticalLayout->addLayout(horizontalLayout); - - treeView = new QTreeView(dockWidgetContents); - treeView->setObjectName(QString::fromUtf8("treeView")); - treeView->setAlternatingRowColors(true); - treeView->setIndentation(20); - treeView->setRootIsDecorated(false); - treeView->header()->setVisible(false); - - verticalLayout->addWidget(treeView); - - DockWidget->setWidget(dockWidgetContents); - - retranslateUi(DockWidget); - - QMetaObject::connectSlotsByName(DockWidget); - } // setupUi - - void retranslateUi(QDockWidget *DockWidget) - { - DockWidget->setWindowTitle(QApplication::translate("DockWidget", "Disassembly", 0, QApplication::UnicodeUTF8)); - button_step->setText(QApplication::translate("DockWidget", "Step", 0, QApplication::UnicodeUTF8)); - button_pause->setText(QApplication::translate("DockWidget", "Pause", 0, QApplication::UnicodeUTF8)); - button_continue->setText(QApplication::translate("DockWidget", "Continue", 0, QApplication::UnicodeUTF8)); - pushButton->setText(QApplication::translate("DockWidget", "Step Into", 0, QApplication::UnicodeUTF8)); - button_breakpoint->setText(QApplication::translate("DockWidget", "Set Breakpoint", 0, QApplication::UnicodeUTF8)); - } // retranslateUi - -}; - -namespace Ui { - class DockWidget: public Ui_DockWidget {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_DISASM_H diff --git a/src/citra_qt/src/ui_gfx_fifo_player.h b/src/citra_qt/src/ui_gfx_fifo_player.h deleted file mode 100644 index a65f56ab..00000000 --- a/src/citra_qt/src/ui_gfx_fifo_player.h +++ /dev/null @@ -1,209 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'gfx_fifo_player.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_GFX_FIFO_PLAYER_H -#define UI_GFX_FIFO_PLAYER_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_GfxFifoPlayerControl -{ -public: - QWidget *recordingGroup; - QVBoxLayout *verticalLayout; - QGroupBox *groupBox; - QVBoxLayout *verticalLayout_2; - QRadioButton *stopManuallyButton; - QHBoxLayout *horizontalLayout; - QRadioButton *radioButton_2; - QSpinBox *spinBox; - QComboBox *comboBox; - QSpacerItem *horizontalSpacer_2; - QSpacerItem *horizontalSpacer; - QCheckBox *pauseWhenDoneCheckbox; - QHBoxLayout *horizontalLayout_2; - QPushButton *startStopRecordingButton; - QPushButton *saveRecordingButton; - QGroupBox *playbackGroup; - QVBoxLayout *verticalLayout_3; - QHBoxLayout *horizontalLayout_3; - QLabel *label; - QComboBox *playbackSourceCombobox; - QCheckBox *checkBox_2; - QPushButton *startPlaybackButton; - QSpacerItem *verticalSpacer; - - void setupUi(QDockWidget *GfxFifoPlayerControl) - { - if (GfxFifoPlayerControl->objectName().isEmpty()) - GfxFifoPlayerControl->setObjectName(QString::fromUtf8("GfxFifoPlayerControl")); - GfxFifoPlayerControl->resize(275, 297); - recordingGroup = new QWidget(); - recordingGroup->setObjectName(QString::fromUtf8("recordingGroup")); - verticalLayout = new QVBoxLayout(recordingGroup); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - groupBox = new QGroupBox(recordingGroup); - groupBox->setObjectName(QString::fromUtf8("groupBox")); - verticalLayout_2 = new QVBoxLayout(groupBox); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); - stopManuallyButton = new QRadioButton(groupBox); - stopManuallyButton->setObjectName(QString::fromUtf8("stopManuallyButton")); - stopManuallyButton->setChecked(true); - - verticalLayout_2->addWidget(stopManuallyButton); - - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - radioButton_2 = new QRadioButton(groupBox); - radioButton_2->setObjectName(QString::fromUtf8("radioButton_2")); - - horizontalLayout->addWidget(radioButton_2); - - spinBox = new QSpinBox(groupBox); - spinBox->setObjectName(QString::fromUtf8("spinBox")); - spinBox->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - spinBox->setMinimum(1); - spinBox->setMaximum(99999); - - horizontalLayout->addWidget(spinBox); - - comboBox = new QComboBox(groupBox); - comboBox->setObjectName(QString::fromUtf8("comboBox")); - - horizontalLayout->addWidget(comboBox); - - horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout->addItem(horizontalSpacer_2); - - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout->addItem(horizontalSpacer); - - - verticalLayout_2->addLayout(horizontalLayout); - - pauseWhenDoneCheckbox = new QCheckBox(groupBox); - pauseWhenDoneCheckbox->setObjectName(QString::fromUtf8("pauseWhenDoneCheckbox")); - - verticalLayout_2->addWidget(pauseWhenDoneCheckbox); - - horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); - startStopRecordingButton = new QPushButton(groupBox); - startStopRecordingButton->setObjectName(QString::fromUtf8("startStopRecordingButton")); - - horizontalLayout_2->addWidget(startStopRecordingButton); - - saveRecordingButton = new QPushButton(groupBox); - saveRecordingButton->setObjectName(QString::fromUtf8("saveRecordingButton")); - saveRecordingButton->setEnabled(false); - - horizontalLayout_2->addWidget(saveRecordingButton); - - - verticalLayout_2->addLayout(horizontalLayout_2); - - - verticalLayout->addWidget(groupBox); - - playbackGroup = new QGroupBox(recordingGroup); - playbackGroup->setObjectName(QString::fromUtf8("playbackGroup")); - verticalLayout_3 = new QVBoxLayout(playbackGroup); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); - horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); - label = new QLabel(playbackGroup); - label->setObjectName(QString::fromUtf8("label")); - - horizontalLayout_3->addWidget(label); - - playbackSourceCombobox = new QComboBox(playbackGroup); - playbackSourceCombobox->setObjectName(QString::fromUtf8("playbackSourceCombobox")); - - horizontalLayout_3->addWidget(playbackSourceCombobox); - - - verticalLayout_3->addLayout(horizontalLayout_3); - - checkBox_2 = new QCheckBox(playbackGroup); - checkBox_2->setObjectName(QString::fromUtf8("checkBox_2")); - - verticalLayout_3->addWidget(checkBox_2); - - startPlaybackButton = new QPushButton(playbackGroup); - startPlaybackButton->setObjectName(QString::fromUtf8("startPlaybackButton")); - - verticalLayout_3->addWidget(startPlaybackButton); - - verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_3->addItem(verticalSpacer); - - - verticalLayout->addWidget(playbackGroup); - - GfxFifoPlayerControl->setWidget(recordingGroup); - - retranslateUi(GfxFifoPlayerControl); - - QMetaObject::connectSlotsByName(GfxFifoPlayerControl); - } // setupUi - - void retranslateUi(QDockWidget *GfxFifoPlayerControl) - { - GfxFifoPlayerControl->setWindowTitle(QApplication::translate("GfxFifoPlayerControl", "Fifo Player", 0, QApplication::UnicodeUTF8)); - groupBox->setTitle(QApplication::translate("GfxFifoPlayerControl", "Recording", 0, QApplication::UnicodeUTF8)); - stopManuallyButton->setText(QApplication::translate("GfxFifoPlayerControl", "Stop manually", 0, QApplication::UnicodeUTF8)); - radioButton_2->setText(QApplication::translate("GfxFifoPlayerControl", "Stop after", 0, QApplication::UnicodeUTF8)); - comboBox->clear(); - comboBox->insertItems(0, QStringList() - << QApplication::translate("GfxFifoPlayerControl", "Frames", 0, QApplication::UnicodeUTF8) - << QApplication::translate("GfxFifoPlayerControl", "Flushes", 0, QApplication::UnicodeUTF8) - ); - pauseWhenDoneCheckbox->setText(QApplication::translate("GfxFifoPlayerControl", "Pause when done", 0, QApplication::UnicodeUTF8)); - startStopRecordingButton->setText(QApplication::translate("GfxFifoPlayerControl", "Start", 0, QApplication::UnicodeUTF8)); - saveRecordingButton->setText(QApplication::translate("GfxFifoPlayerControl", "Save to File...", 0, QApplication::UnicodeUTF8)); - playbackGroup->setTitle(QApplication::translate("GfxFifoPlayerControl", "Playback", 0, QApplication::UnicodeUTF8)); - label->setText(QApplication::translate("GfxFifoPlayerControl", "Playback source:", 0, QApplication::UnicodeUTF8)); - playbackSourceCombobox->clear(); - playbackSourceCombobox->insertItems(0, QStringList() - << QApplication::translate("GfxFifoPlayerControl", "Last Recording", 0, QApplication::UnicodeUTF8) - << QApplication::translate("GfxFifoPlayerControl", "From File...", 0, QApplication::UnicodeUTF8) - ); - checkBox_2->setText(QApplication::translate("GfxFifoPlayerControl", "Loop", 0, QApplication::UnicodeUTF8)); - startPlaybackButton->setText(QApplication::translate("GfxFifoPlayerControl", "Start", 0, QApplication::UnicodeUTF8)); - } // retranslateUi - -}; - -namespace Ui { - class GfxFifoPlayerControl: public Ui_GfxFifoPlayerControl {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_GFX_FIFO_PLAYER_H diff --git a/src/citra_qt/src/ui_hotkeys.h b/src/citra_qt/src/ui_hotkeys.h deleted file mode 100644 index 5b2cee6f..00000000 --- a/src/citra_qt/src/ui_hotkeys.h +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'hotkeys.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_HOTKEYS_H -#define UI_HOTKEYS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_hotkeys -{ -public: - QVBoxLayout *verticalLayout; - QTreeWidget *treeWidget; - QDialogButtonBox *buttonBox; - - void setupUi(QDialog *hotkeys) - { - if (hotkeys->objectName().isEmpty()) - hotkeys->setObjectName(QString::fromUtf8("hotkeys")); - hotkeys->resize(363, 388); - verticalLayout = new QVBoxLayout(hotkeys); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - treeWidget = new QTreeWidget(hotkeys); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); - treeWidget->setSelectionBehavior(QAbstractItemView::SelectItems); - treeWidget->setHeaderHidden(false); - - verticalLayout->addWidget(treeWidget); - - buttonBox = new QDialogButtonBox(hotkeys); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); - buttonBox->setOrientation(Qt::Horizontal); - buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset); - - verticalLayout->addWidget(buttonBox); - - - retranslateUi(hotkeys); - QObject::connect(buttonBox, SIGNAL(accepted()), hotkeys, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), hotkeys, SLOT(reject())); - - QMetaObject::connectSlotsByName(hotkeys); - } // setupUi - - void retranslateUi(QDialog *hotkeys) - { - hotkeys->setWindowTitle(QApplication::translate("hotkeys", "Hotkey Settings", 0, QApplication::UnicodeUTF8)); - QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); - ___qtreewidgetitem->setText(2, QApplication::translate("hotkeys", "Context", 0, QApplication::UnicodeUTF8)); - ___qtreewidgetitem->setText(1, QApplication::translate("hotkeys", "Hotkey", 0, QApplication::UnicodeUTF8)); - ___qtreewidgetitem->setText(0, QApplication::translate("hotkeys", "Action", 0, QApplication::UnicodeUTF8)); - } // retranslateUi - -}; - -namespace Ui { - class hotkeys: public Ui_hotkeys {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_HOTKEYS_H diff --git a/src/citra_qt/src/ui_image_info.h b/src/citra_qt/src/ui_image_info.h deleted file mode 100644 index a6aaa3d8..00000000 --- a/src/citra_qt/src/ui_image_info.h +++ /dev/null @@ -1,154 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'image_info.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_IMAGE_INFO_H -#define UI_IMAGE_INFO_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_ImageInfo -{ -public: - QWidget *dockWidgetContents; - QFormLayout *formLayout; - QLabel *label_name; - QLabel *label_gameid; - QLabel *label_country; - QLabel *label_bannertext; - QLineEdit *line_name; - QLineEdit *line_gameid; - QLineEdit *line_country; - QLabel *label_banner; - QLabel *label_developer; - QLineEdit *line_developer; - QLabel *label_description; - QPlainTextEdit *edit_description; - - void setupUi(QDockWidget *ImageInfo) - { - if (ImageInfo->objectName().isEmpty()) - ImageInfo->setObjectName(QString::fromUtf8("ImageInfo")); - ImageInfo->resize(400, 300); - dockWidgetContents = new QWidget(); - dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); - formLayout = new QFormLayout(dockWidgetContents); - formLayout->setObjectName(QString::fromUtf8("formLayout")); - label_name = new QLabel(dockWidgetContents); - label_name->setObjectName(QString::fromUtf8("label_name")); - - formLayout->setWidget(1, QFormLayout::LabelRole, label_name); - - label_gameid = new QLabel(dockWidgetContents); - label_gameid->setObjectName(QString::fromUtf8("label_gameid")); - - formLayout->setWidget(4, QFormLayout::LabelRole, label_gameid); - - label_country = new QLabel(dockWidgetContents); - label_country->setObjectName(QString::fromUtf8("label_country")); - - formLayout->setWidget(5, QFormLayout::LabelRole, label_country); - - label_bannertext = new QLabel(dockWidgetContents); - label_bannertext->setObjectName(QString::fromUtf8("label_bannertext")); - - formLayout->setWidget(9, QFormLayout::LabelRole, label_bannertext); - - line_name = new QLineEdit(dockWidgetContents); - line_name->setObjectName(QString::fromUtf8("line_name")); - line_name->setEnabled(true); - line_name->setReadOnly(true); - - formLayout->setWidget(1, QFormLayout::FieldRole, line_name); - - line_gameid = new QLineEdit(dockWidgetContents); - line_gameid->setObjectName(QString::fromUtf8("line_gameid")); - line_gameid->setEnabled(true); - line_gameid->setReadOnly(true); - - formLayout->setWidget(4, QFormLayout::FieldRole, line_gameid); - - line_country = new QLineEdit(dockWidgetContents); - line_country->setObjectName(QString::fromUtf8("line_country")); - line_country->setEnabled(true); - line_country->setReadOnly(true); - - formLayout->setWidget(5, QFormLayout::FieldRole, line_country); - - label_banner = new QLabel(dockWidgetContents); - label_banner->setObjectName(QString::fromUtf8("label_banner")); - label_banner->setAlignment(Qt::AlignCenter); - - formLayout->setWidget(9, QFormLayout::FieldRole, label_banner); - - label_developer = new QLabel(dockWidgetContents); - label_developer->setObjectName(QString::fromUtf8("label_developer")); - - formLayout->setWidget(3, QFormLayout::LabelRole, label_developer); - - line_developer = new QLineEdit(dockWidgetContents); - line_developer->setObjectName(QString::fromUtf8("line_developer")); - line_developer->setReadOnly(true); - - formLayout->setWidget(3, QFormLayout::FieldRole, line_developer); - - label_description = new QLabel(dockWidgetContents); - label_description->setObjectName(QString::fromUtf8("label_description")); - - formLayout->setWidget(7, QFormLayout::LabelRole, label_description); - - edit_description = new QPlainTextEdit(dockWidgetContents); - edit_description->setObjectName(QString::fromUtf8("edit_description")); - edit_description->setMaximumSize(QSize(16777215, 80)); - edit_description->setReadOnly(true); - edit_description->setPlainText(QString::fromUtf8("")); - - formLayout->setWidget(7, QFormLayout::FieldRole, edit_description); - - ImageInfo->setWidget(dockWidgetContents); - - retranslateUi(ImageInfo); - - QMetaObject::connectSlotsByName(ImageInfo); - } // setupUi - - void retranslateUi(QDockWidget *ImageInfo) - { - ImageInfo->setWindowTitle(QApplication::translate("ImageInfo", "Image Info", 0, QApplication::UnicodeUTF8)); - label_name->setText(QApplication::translate("ImageInfo", "Name", 0, QApplication::UnicodeUTF8)); - label_gameid->setText(QApplication::translate("ImageInfo", "Game ID", 0, QApplication::UnicodeUTF8)); - label_country->setText(QApplication::translate("ImageInfo", "Country", 0, QApplication::UnicodeUTF8)); - label_bannertext->setText(QApplication::translate("ImageInfo", "Banner", 0, QApplication::UnicodeUTF8)); - line_name->setText(QString()); - line_gameid->setText(QString()); - line_country->setText(QApplication::translate("ImageInfo", "EUROPE", 0, QApplication::UnicodeUTF8)); - label_banner->setText(QString()); - label_developer->setText(QApplication::translate("ImageInfo", "Developer", 0, QApplication::UnicodeUTF8)); - label_description->setText(QApplication::translate("ImageInfo", "Description", 0, QApplication::UnicodeUTF8)); - } // retranslateUi - -}; - -namespace Ui { - class ImageInfo: public Ui_ImageInfo {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_IMAGE_INFO_H diff --git a/src/citra_qt/src/ui_main.h b/src/citra_qt/src/ui_main.h deleted file mode 100644 index d349a5c6..00000000 --- a/src/citra_qt/src/ui_main.h +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'main.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_MAIN_H -#define UI_MAIN_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_MainWindow -{ -public: - QAction *action_load_elf; - QAction *action_Exit; - QAction *action_Start; - QAction *action_Pause; - QAction *action_Stop; - QAction *action_About; - QAction *action_Single_Window_Mode; - QAction *action_Hotkeys; - QAction *action_Configure; - QWidget *centralwidget; - QHBoxLayout *horizontalLayout; - QMenuBar *menubar; - QMenu *menu_File; - QMenu *menu_Emulation; - QMenu *menu_View; - QMenu *menu_Help; - QStatusBar *statusbar; - - void setupUi(QMainWindow *MainWindow) - { - if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); - MainWindow->resize(1081, 730); - QIcon icon; - icon.addFile(QString::fromUtf8("src/pcafe/res/icon3_64x64.ico"), QSize(), QIcon::Normal, QIcon::Off); - MainWindow->setWindowIcon(icon); - MainWindow->setTabShape(QTabWidget::Rounded); - MainWindow->setDockNestingEnabled(true); - action_load_elf = new QAction(MainWindow); - action_load_elf->setObjectName(QString::fromUtf8("action_load_elf")); - action_Exit = new QAction(MainWindow); - action_Exit->setObjectName(QString::fromUtf8("action_Exit")); - action_Start = new QAction(MainWindow); - action_Start->setObjectName(QString::fromUtf8("action_Start")); - action_Pause = new QAction(MainWindow); - action_Pause->setObjectName(QString::fromUtf8("action_Pause")); - action_Pause->setEnabled(false); - action_Stop = new QAction(MainWindow); - action_Stop->setObjectName(QString::fromUtf8("action_Stop")); - action_Stop->setEnabled(false); - action_About = new QAction(MainWindow); - action_About->setObjectName(QString::fromUtf8("action_About")); - action_Single_Window_Mode = new QAction(MainWindow); - action_Single_Window_Mode->setObjectName(QString::fromUtf8("action_Single_Window_Mode")); - action_Single_Window_Mode->setCheckable(true); - action_Hotkeys = new QAction(MainWindow); - action_Hotkeys->setObjectName(QString::fromUtf8("action_Hotkeys")); - action_Configure = new QAction(MainWindow); - action_Configure->setObjectName(QString::fromUtf8("action_Configure")); - centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); - horizontalLayout = new QHBoxLayout(centralwidget); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - MainWindow->setCentralWidget(centralwidget); - menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); - menubar->setGeometry(QRect(0, 0, 1081, 20)); - menu_File = new QMenu(menubar); - menu_File->setObjectName(QString::fromUtf8("menu_File")); - menu_Emulation = new QMenu(menubar); - menu_Emulation->setObjectName(QString::fromUtf8("menu_Emulation")); - menu_View = new QMenu(menubar); - menu_View->setObjectName(QString::fromUtf8("menu_View")); - menu_Help = new QMenu(menubar); - menu_Help->setObjectName(QString::fromUtf8("menu_Help")); - MainWindow->setMenuBar(menubar); - statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); - MainWindow->setStatusBar(statusbar); - - menubar->addAction(menu_File->menuAction()); - menubar->addAction(menu_Emulation->menuAction()); - menubar->addAction(menu_View->menuAction()); - menubar->addAction(menu_Help->menuAction()); - menu_File->addAction(action_load_elf); - menu_File->addSeparator(); - menu_File->addAction(action_Exit); - menu_Emulation->addAction(action_Start); - menu_Emulation->addAction(action_Pause); - menu_Emulation->addAction(action_Stop); - menu_Emulation->addSeparator(); - menu_Emulation->addAction(action_Configure); - menu_View->addAction(action_Single_Window_Mode); - menu_View->addAction(action_Hotkeys); - menu_Help->addAction(action_About); - - retranslateUi(MainWindow); - QObject::connect(action_Exit, SIGNAL(triggered()), MainWindow, SLOT(close())); - QObject::connect(action_Configure, SIGNAL(triggered()), MainWindow, SLOT(OnConfigure())); - - QMetaObject::connectSlotsByName(MainWindow); - } // setupUi - - void retranslateUi(QMainWindow *MainWindow) - { - MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Citra", 0, QApplication::UnicodeUTF8)); - action_load_elf->setText(QApplication::translate("MainWindow", "Load ELF ...", 0, QApplication::UnicodeUTF8)); - action_Exit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8)); - action_Start->setText(QApplication::translate("MainWindow", "&Start", 0, QApplication::UnicodeUTF8)); - action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8)); - action_Stop->setText(QApplication::translate("MainWindow", "&Stop", 0, QApplication::UnicodeUTF8)); - action_About->setText(QApplication::translate("MainWindow", "About Citra", 0, QApplication::UnicodeUTF8)); - action_Single_Window_Mode->setText(QApplication::translate("MainWindow", "Single Window Mode", 0, QApplication::UnicodeUTF8)); - action_Hotkeys->setText(QApplication::translate("MainWindow", "Configure &Hotkeys ...", 0, QApplication::UnicodeUTF8)); - action_Configure->setText(QApplication::translate("MainWindow", "Configure ...", 0, QApplication::UnicodeUTF8)); - menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8)); - menu_Emulation->setTitle(QApplication::translate("MainWindow", "&Emulation", 0, QApplication::UnicodeUTF8)); - menu_View->setTitle(QApplication::translate("MainWindow", "&View", 0, QApplication::UnicodeUTF8)); - menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", 0, QApplication::UnicodeUTF8)); - } // retranslateUi - -}; - -namespace Ui { - class MainWindow: public Ui_MainWindow {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_MAIN_H diff --git a/src/citra_qt/src/ui_welcome_wizard.h b/src/citra_qt/src/ui_welcome_wizard.h deleted file mode 100644 index 0cc5ceb4..00000000 --- a/src/citra_qt/src/ui_welcome_wizard.h +++ /dev/null @@ -1,124 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'welcome_wizard.ui' -** -** Created by: Qt User Interface Compiler version 4.8.5 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_WELCOME_WIZARD_H -#define UI_WELCOME_WIZARD_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "path_list.hxx" - -QT_BEGIN_NAMESPACE - -class Ui_WelcomeWizard -{ -public: - QWizardPage *wizardPage1; - QWizardPage *wizardPage2; - QVBoxLayout *verticalLayout_2; - QHBoxLayout *horizontalLayout; - QLineEdit *edit_path; - QPushButton *button_browse_path; - QHBoxLayout *horizontalLayout_2; - GPathList *path_list; - QVBoxLayout *verticalLayout_3; - QPushButton *button_add_path; - QSpacerItem *verticalSpacer; - - void setupUi(QWizard *WelcomeWizard) - { - if (WelcomeWizard->objectName().isEmpty()) - WelcomeWizard->setObjectName(QString::fromUtf8("WelcomeWizard")); - WelcomeWizard->resize(510, 300); - WelcomeWizard->setModal(true); - wizardPage1 = new QWizardPage(); - wizardPage1->setObjectName(QString::fromUtf8("wizardPage1")); - WelcomeWizard->addPage(wizardPage1); - wizardPage2 = new QWizardPage(); - wizardPage2->setObjectName(QString::fromUtf8("wizardPage2")); - verticalLayout_2 = new QVBoxLayout(wizardPage2); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - edit_path = new QLineEdit(wizardPage2); - edit_path->setObjectName(QString::fromUtf8("edit_path")); - edit_path->setReadOnly(true); - - horizontalLayout->addWidget(edit_path); - - button_browse_path = new QPushButton(wizardPage2); - button_browse_path->setObjectName(QString::fromUtf8("button_browse_path")); - - horizontalLayout->addWidget(button_browse_path); - - - verticalLayout_2->addLayout(horizontalLayout); - - horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); - path_list = new GPathList(wizardPage2); - path_list->setObjectName(QString::fromUtf8("path_list")); - - horizontalLayout_2->addWidget(path_list); - - verticalLayout_3 = new QVBoxLayout(); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); - button_add_path = new QPushButton(wizardPage2); - button_add_path->setObjectName(QString::fromUtf8("button_add_path")); - - verticalLayout_3->addWidget(button_add_path); - - verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_3->addItem(verticalSpacer); - - - horizontalLayout_2->addLayout(verticalLayout_3); - - - verticalLayout_2->addLayout(horizontalLayout_2); - - WelcomeWizard->addPage(wizardPage2); - - retranslateUi(WelcomeWizard); - - QMetaObject::connectSlotsByName(WelcomeWizard); - } // setupUi - - void retranslateUi(QWizard *WelcomeWizard) - { - WelcomeWizard->setWindowTitle(QApplication::translate("WelcomeWizard", "Welcome", 0, QApplication::UnicodeUTF8)); - wizardPage1->setTitle(QApplication::translate("WelcomeWizard", "Welcome", 0, QApplication::UnicodeUTF8)); - wizardPage1->setSubTitle(QApplication::translate("WelcomeWizard", "This wizard will guide you through the initial configuration.", 0, QApplication::UnicodeUTF8)); - wizardPage2->setTitle(QApplication::translate("WelcomeWizard", "ISO paths", 0, QApplication::UnicodeUTF8)); - wizardPage2->setSubTitle(QApplication::translate("WelcomeWizard", "If you have a collection of game images, you can add them to the path list here. Gekko will automatically show a list of your collection on startup then.", 0, QApplication::UnicodeUTF8)); - edit_path->setText(QString()); - edit_path->setPlaceholderText(QApplication::translate("WelcomeWizard", "Select a path to add ...", 0, QApplication::UnicodeUTF8)); - button_browse_path->setText(QString()); - button_add_path->setText(QString()); - } // retranslateUi - -}; - -namespace Ui { - class WelcomeWizard: public Ui_WelcomeWizard {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_WELCOME_WIZARD_H diff --git a/src/citra_qt/src/version.h b/src/citra_qt/src/version.h deleted file mode 100644 index 07022de5..00000000 --- a/src/citra_qt/src/version.h +++ /dev/null @@ -1,7 +0,0 @@ -// TODO: Supposed to be generated... -// GENERATED - Do not edit! -#ifndef VERSION_H_ -#define VERSION_H_ -#define __BUILD__ "40" -#define VERSION __BUILD__ -#endif // VERSION_H_ diff --git a/src/citra_qt/ui_callstack.h b/src/citra_qt/ui_callstack.h new file mode 100644 index 00000000..75d10253 --- /dev/null +++ b/src/citra_qt/ui_callstack.h @@ -0,0 +1,68 @@ +/******************************************************************************** +** Form generated from reading UI file 'callstack.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_CALLSTACK_H +#define UI_CALLSTACK_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_CallStack +{ +public: + QWidget *dockWidgetContents; + QVBoxLayout *verticalLayout; + QTreeView *treeView; + + void setupUi(QDockWidget *CallStack) + { + if (CallStack->objectName().isEmpty()) + CallStack->setObjectName(QString::fromUtf8("CallStack")); + CallStack->resize(400, 300); + dockWidgetContents = new QWidget(); + dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); + verticalLayout = new QVBoxLayout(dockWidgetContents); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + treeView = new QTreeView(dockWidgetContents); + treeView->setObjectName(QString::fromUtf8("treeView")); + treeView->setAlternatingRowColors(true); + treeView->setRootIsDecorated(false); + treeView->setItemsExpandable(false); + + verticalLayout->addWidget(treeView); + + CallStack->setWidget(dockWidgetContents); + + retranslateUi(CallStack); + + QMetaObject::connectSlotsByName(CallStack); + } // setupUi + + void retranslateUi(QDockWidget *CallStack) + { + CallStack->setWindowTitle(QApplication::translate("CallStack", "Call stack", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class CallStack: public Ui_CallStack {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_CALLSTACK_H diff --git a/src/citra_qt/ui_cpu_regs.h b/src/citra_qt/ui_cpu_regs.h new file mode 100644 index 00000000..b8a80b3f --- /dev/null +++ b/src/citra_qt/ui_cpu_regs.h @@ -0,0 +1,69 @@ +/******************************************************************************** +** Form generated from reading UI file 'cpu_regs.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_CPU_REGS_H +#define UI_CPU_REGS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_ARMRegisters +{ +public: + QWidget *dockWidgetContents; + QVBoxLayout *verticalLayout; + QTreeWidget *treeWidget; + + void setupUi(QDockWidget *ARMRegisters) + { + if (ARMRegisters->objectName().isEmpty()) + ARMRegisters->setObjectName(QString::fromUtf8("ARMRegisters")); + ARMRegisters->resize(400, 300); + dockWidgetContents = new QWidget(); + dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); + verticalLayout = new QVBoxLayout(dockWidgetContents); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + treeWidget = new QTreeWidget(dockWidgetContents); + treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setAlternatingRowColors(true); + + verticalLayout->addWidget(treeWidget); + + ARMRegisters->setWidget(dockWidgetContents); + + retranslateUi(ARMRegisters); + + QMetaObject::connectSlotsByName(ARMRegisters); + } // setupUi + + void retranslateUi(QDockWidget *ARMRegisters) + { + ARMRegisters->setWindowTitle(QApplication::translate("ARMRegisters", "ARM registers", 0, QApplication::UnicodeUTF8)); + QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); + ___qtreewidgetitem->setText(1, QApplication::translate("ARMRegisters", "Value", 0, QApplication::UnicodeUTF8)); + ___qtreewidgetitem->setText(0, QApplication::translate("ARMRegisters", "Register", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class ARMRegisters: public Ui_ARMRegisters {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_CPU_REGS_H diff --git a/src/citra_qt/ui_disasm.h b/src/citra_qt/ui_disasm.h new file mode 100644 index 00000000..697a224c --- /dev/null +++ b/src/citra_qt/ui_disasm.h @@ -0,0 +1,112 @@ +/******************************************************************************** +** Form generated from reading UI file 'disasm.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_DISASM_H +#define UI_DISASM_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_DockWidget +{ +public: + QWidget *dockWidgetContents; + QVBoxLayout *verticalLayout; + QHBoxLayout *horizontalLayout; + QPushButton *button_step; + QPushButton *button_pause; + QPushButton *button_continue; + QPushButton *pushButton; + QPushButton *button_breakpoint; + QTreeView *treeView; + + void setupUi(QDockWidget *DockWidget) + { + if (DockWidget->objectName().isEmpty()) + DockWidget->setObjectName(QString::fromUtf8("DockWidget")); + DockWidget->resize(430, 401); + dockWidgetContents = new QWidget(); + dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); + verticalLayout = new QVBoxLayout(dockWidgetContents); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + button_step = new QPushButton(dockWidgetContents); + button_step->setObjectName(QString::fromUtf8("button_step")); + + horizontalLayout->addWidget(button_step); + + button_pause = new QPushButton(dockWidgetContents); + button_pause->setObjectName(QString::fromUtf8("button_pause")); + + horizontalLayout->addWidget(button_pause); + + button_continue = new QPushButton(dockWidgetContents); + button_continue->setObjectName(QString::fromUtf8("button_continue")); + + horizontalLayout->addWidget(button_continue); + + pushButton = new QPushButton(dockWidgetContents); + pushButton->setObjectName(QString::fromUtf8("pushButton")); + + horizontalLayout->addWidget(pushButton); + + button_breakpoint = new QPushButton(dockWidgetContents); + button_breakpoint->setObjectName(QString::fromUtf8("button_breakpoint")); + + horizontalLayout->addWidget(button_breakpoint); + + + verticalLayout->addLayout(horizontalLayout); + + treeView = new QTreeView(dockWidgetContents); + treeView->setObjectName(QString::fromUtf8("treeView")); + treeView->setAlternatingRowColors(true); + treeView->setIndentation(20); + treeView->setRootIsDecorated(false); + treeView->header()->setVisible(false); + + verticalLayout->addWidget(treeView); + + DockWidget->setWidget(dockWidgetContents); + + retranslateUi(DockWidget); + + QMetaObject::connectSlotsByName(DockWidget); + } // setupUi + + void retranslateUi(QDockWidget *DockWidget) + { + DockWidget->setWindowTitle(QApplication::translate("DockWidget", "Disassembly", 0, QApplication::UnicodeUTF8)); + button_step->setText(QApplication::translate("DockWidget", "Step", 0, QApplication::UnicodeUTF8)); + button_pause->setText(QApplication::translate("DockWidget", "Pause", 0, QApplication::UnicodeUTF8)); + button_continue->setText(QApplication::translate("DockWidget", "Continue", 0, QApplication::UnicodeUTF8)); + pushButton->setText(QApplication::translate("DockWidget", "Step Into", 0, QApplication::UnicodeUTF8)); + button_breakpoint->setText(QApplication::translate("DockWidget", "Set Breakpoint", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class DockWidget: public Ui_DockWidget {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_DISASM_H diff --git a/src/citra_qt/ui_gfx_fifo_player.h b/src/citra_qt/ui_gfx_fifo_player.h new file mode 100644 index 00000000..a65f56ab --- /dev/null +++ b/src/citra_qt/ui_gfx_fifo_player.h @@ -0,0 +1,209 @@ +/******************************************************************************** +** Form generated from reading UI file 'gfx_fifo_player.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_GFX_FIFO_PLAYER_H +#define UI_GFX_FIFO_PLAYER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_GfxFifoPlayerControl +{ +public: + QWidget *recordingGroup; + QVBoxLayout *verticalLayout; + QGroupBox *groupBox; + QVBoxLayout *verticalLayout_2; + QRadioButton *stopManuallyButton; + QHBoxLayout *horizontalLayout; + QRadioButton *radioButton_2; + QSpinBox *spinBox; + QComboBox *comboBox; + QSpacerItem *horizontalSpacer_2; + QSpacerItem *horizontalSpacer; + QCheckBox *pauseWhenDoneCheckbox; + QHBoxLayout *horizontalLayout_2; + QPushButton *startStopRecordingButton; + QPushButton *saveRecordingButton; + QGroupBox *playbackGroup; + QVBoxLayout *verticalLayout_3; + QHBoxLayout *horizontalLayout_3; + QLabel *label; + QComboBox *playbackSourceCombobox; + QCheckBox *checkBox_2; + QPushButton *startPlaybackButton; + QSpacerItem *verticalSpacer; + + void setupUi(QDockWidget *GfxFifoPlayerControl) + { + if (GfxFifoPlayerControl->objectName().isEmpty()) + GfxFifoPlayerControl->setObjectName(QString::fromUtf8("GfxFifoPlayerControl")); + GfxFifoPlayerControl->resize(275, 297); + recordingGroup = new QWidget(); + recordingGroup->setObjectName(QString::fromUtf8("recordingGroup")); + verticalLayout = new QVBoxLayout(recordingGroup); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + groupBox = new QGroupBox(recordingGroup); + groupBox->setObjectName(QString::fromUtf8("groupBox")); + verticalLayout_2 = new QVBoxLayout(groupBox); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + stopManuallyButton = new QRadioButton(groupBox); + stopManuallyButton->setObjectName(QString::fromUtf8("stopManuallyButton")); + stopManuallyButton->setChecked(true); + + verticalLayout_2->addWidget(stopManuallyButton); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + radioButton_2 = new QRadioButton(groupBox); + radioButton_2->setObjectName(QString::fromUtf8("radioButton_2")); + + horizontalLayout->addWidget(radioButton_2); + + spinBox = new QSpinBox(groupBox); + spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + spinBox->setMinimum(1); + spinBox->setMaximum(99999); + + horizontalLayout->addWidget(spinBox); + + comboBox = new QComboBox(groupBox); + comboBox->setObjectName(QString::fromUtf8("comboBox")); + + horizontalLayout->addWidget(comboBox); + + horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_2); + + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer); + + + verticalLayout_2->addLayout(horizontalLayout); + + pauseWhenDoneCheckbox = new QCheckBox(groupBox); + pauseWhenDoneCheckbox->setObjectName(QString::fromUtf8("pauseWhenDoneCheckbox")); + + verticalLayout_2->addWidget(pauseWhenDoneCheckbox); + + horizontalLayout_2 = new QHBoxLayout(); + horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + startStopRecordingButton = new QPushButton(groupBox); + startStopRecordingButton->setObjectName(QString::fromUtf8("startStopRecordingButton")); + + horizontalLayout_2->addWidget(startStopRecordingButton); + + saveRecordingButton = new QPushButton(groupBox); + saveRecordingButton->setObjectName(QString::fromUtf8("saveRecordingButton")); + saveRecordingButton->setEnabled(false); + + horizontalLayout_2->addWidget(saveRecordingButton); + + + verticalLayout_2->addLayout(horizontalLayout_2); + + + verticalLayout->addWidget(groupBox); + + playbackGroup = new QGroupBox(recordingGroup); + playbackGroup->setObjectName(QString::fromUtf8("playbackGroup")); + verticalLayout_3 = new QVBoxLayout(playbackGroup); + verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + horizontalLayout_3 = new QHBoxLayout(); + horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + label = new QLabel(playbackGroup); + label->setObjectName(QString::fromUtf8("label")); + + horizontalLayout_3->addWidget(label); + + playbackSourceCombobox = new QComboBox(playbackGroup); + playbackSourceCombobox->setObjectName(QString::fromUtf8("playbackSourceCombobox")); + + horizontalLayout_3->addWidget(playbackSourceCombobox); + + + verticalLayout_3->addLayout(horizontalLayout_3); + + checkBox_2 = new QCheckBox(playbackGroup); + checkBox_2->setObjectName(QString::fromUtf8("checkBox_2")); + + verticalLayout_3->addWidget(checkBox_2); + + startPlaybackButton = new QPushButton(playbackGroup); + startPlaybackButton->setObjectName(QString::fromUtf8("startPlaybackButton")); + + verticalLayout_3->addWidget(startPlaybackButton); + + verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + verticalLayout_3->addItem(verticalSpacer); + + + verticalLayout->addWidget(playbackGroup); + + GfxFifoPlayerControl->setWidget(recordingGroup); + + retranslateUi(GfxFifoPlayerControl); + + QMetaObject::connectSlotsByName(GfxFifoPlayerControl); + } // setupUi + + void retranslateUi(QDockWidget *GfxFifoPlayerControl) + { + GfxFifoPlayerControl->setWindowTitle(QApplication::translate("GfxFifoPlayerControl", "Fifo Player", 0, QApplication::UnicodeUTF8)); + groupBox->setTitle(QApplication::translate("GfxFifoPlayerControl", "Recording", 0, QApplication::UnicodeUTF8)); + stopManuallyButton->setText(QApplication::translate("GfxFifoPlayerControl", "Stop manually", 0, QApplication::UnicodeUTF8)); + radioButton_2->setText(QApplication::translate("GfxFifoPlayerControl", "Stop after", 0, QApplication::UnicodeUTF8)); + comboBox->clear(); + comboBox->insertItems(0, QStringList() + << QApplication::translate("GfxFifoPlayerControl", "Frames", 0, QApplication::UnicodeUTF8) + << QApplication::translate("GfxFifoPlayerControl", "Flushes", 0, QApplication::UnicodeUTF8) + ); + pauseWhenDoneCheckbox->setText(QApplication::translate("GfxFifoPlayerControl", "Pause when done", 0, QApplication::UnicodeUTF8)); + startStopRecordingButton->setText(QApplication::translate("GfxFifoPlayerControl", "Start", 0, QApplication::UnicodeUTF8)); + saveRecordingButton->setText(QApplication::translate("GfxFifoPlayerControl", "Save to File...", 0, QApplication::UnicodeUTF8)); + playbackGroup->setTitle(QApplication::translate("GfxFifoPlayerControl", "Playback", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("GfxFifoPlayerControl", "Playback source:", 0, QApplication::UnicodeUTF8)); + playbackSourceCombobox->clear(); + playbackSourceCombobox->insertItems(0, QStringList() + << QApplication::translate("GfxFifoPlayerControl", "Last Recording", 0, QApplication::UnicodeUTF8) + << QApplication::translate("GfxFifoPlayerControl", "From File...", 0, QApplication::UnicodeUTF8) + ); + checkBox_2->setText(QApplication::translate("GfxFifoPlayerControl", "Loop", 0, QApplication::UnicodeUTF8)); + startPlaybackButton->setText(QApplication::translate("GfxFifoPlayerControl", "Start", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class GfxFifoPlayerControl: public Ui_GfxFifoPlayerControl {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_GFX_FIFO_PLAYER_H diff --git a/src/citra_qt/ui_hotkeys.h b/src/citra_qt/ui_hotkeys.h new file mode 100644 index 00000000..5b2cee6f --- /dev/null +++ b/src/citra_qt/ui_hotkeys.h @@ -0,0 +1,77 @@ +/******************************************************************************** +** Form generated from reading UI file 'hotkeys.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_HOTKEYS_H +#define UI_HOTKEYS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_hotkeys +{ +public: + QVBoxLayout *verticalLayout; + QTreeWidget *treeWidget; + QDialogButtonBox *buttonBox; + + void setupUi(QDialog *hotkeys) + { + if (hotkeys->objectName().isEmpty()) + hotkeys->setObjectName(QString::fromUtf8("hotkeys")); + hotkeys->resize(363, 388); + verticalLayout = new QVBoxLayout(hotkeys); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + treeWidget = new QTreeWidget(hotkeys); + treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setSelectionBehavior(QAbstractItemView::SelectItems); + treeWidget->setHeaderHidden(false); + + verticalLayout->addWidget(treeWidget); + + buttonBox = new QDialogButtonBox(hotkeys); + buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setOrientation(Qt::Horizontal); + buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset); + + verticalLayout->addWidget(buttonBox); + + + retranslateUi(hotkeys); + QObject::connect(buttonBox, SIGNAL(accepted()), hotkeys, SLOT(accept())); + QObject::connect(buttonBox, SIGNAL(rejected()), hotkeys, SLOT(reject())); + + QMetaObject::connectSlotsByName(hotkeys); + } // setupUi + + void retranslateUi(QDialog *hotkeys) + { + hotkeys->setWindowTitle(QApplication::translate("hotkeys", "Hotkey Settings", 0, QApplication::UnicodeUTF8)); + QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); + ___qtreewidgetitem->setText(2, QApplication::translate("hotkeys", "Context", 0, QApplication::UnicodeUTF8)); + ___qtreewidgetitem->setText(1, QApplication::translate("hotkeys", "Hotkey", 0, QApplication::UnicodeUTF8)); + ___qtreewidgetitem->setText(0, QApplication::translate("hotkeys", "Action", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class hotkeys: public Ui_hotkeys {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_HOTKEYS_H diff --git a/src/citra_qt/ui_image_info.h b/src/citra_qt/ui_image_info.h new file mode 100644 index 00000000..a6aaa3d8 --- /dev/null +++ b/src/citra_qt/ui_image_info.h @@ -0,0 +1,154 @@ +/******************************************************************************** +** Form generated from reading UI file 'image_info.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_IMAGE_INFO_H +#define UI_IMAGE_INFO_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_ImageInfo +{ +public: + QWidget *dockWidgetContents; + QFormLayout *formLayout; + QLabel *label_name; + QLabel *label_gameid; + QLabel *label_country; + QLabel *label_bannertext; + QLineEdit *line_name; + QLineEdit *line_gameid; + QLineEdit *line_country; + QLabel *label_banner; + QLabel *label_developer; + QLineEdit *line_developer; + QLabel *label_description; + QPlainTextEdit *edit_description; + + void setupUi(QDockWidget *ImageInfo) + { + if (ImageInfo->objectName().isEmpty()) + ImageInfo->setObjectName(QString::fromUtf8("ImageInfo")); + ImageInfo->resize(400, 300); + dockWidgetContents = new QWidget(); + dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); + formLayout = new QFormLayout(dockWidgetContents); + formLayout->setObjectName(QString::fromUtf8("formLayout")); + label_name = new QLabel(dockWidgetContents); + label_name->setObjectName(QString::fromUtf8("label_name")); + + formLayout->setWidget(1, QFormLayout::LabelRole, label_name); + + label_gameid = new QLabel(dockWidgetContents); + label_gameid->setObjectName(QString::fromUtf8("label_gameid")); + + formLayout->setWidget(4, QFormLayout::LabelRole, label_gameid); + + label_country = new QLabel(dockWidgetContents); + label_country->setObjectName(QString::fromUtf8("label_country")); + + formLayout->setWidget(5, QFormLayout::LabelRole, label_country); + + label_bannertext = new QLabel(dockWidgetContents); + label_bannertext->setObjectName(QString::fromUtf8("label_bannertext")); + + formLayout->setWidget(9, QFormLayout::LabelRole, label_bannertext); + + line_name = new QLineEdit(dockWidgetContents); + line_name->setObjectName(QString::fromUtf8("line_name")); + line_name->setEnabled(true); + line_name->setReadOnly(true); + + formLayout->setWidget(1, QFormLayout::FieldRole, line_name); + + line_gameid = new QLineEdit(dockWidgetContents); + line_gameid->setObjectName(QString::fromUtf8("line_gameid")); + line_gameid->setEnabled(true); + line_gameid->setReadOnly(true); + + formLayout->setWidget(4, QFormLayout::FieldRole, line_gameid); + + line_country = new QLineEdit(dockWidgetContents); + line_country->setObjectName(QString::fromUtf8("line_country")); + line_country->setEnabled(true); + line_country->setReadOnly(true); + + formLayout->setWidget(5, QFormLayout::FieldRole, line_country); + + label_banner = new QLabel(dockWidgetContents); + label_banner->setObjectName(QString::fromUtf8("label_banner")); + label_banner->setAlignment(Qt::AlignCenter); + + formLayout->setWidget(9, QFormLayout::FieldRole, label_banner); + + label_developer = new QLabel(dockWidgetContents); + label_developer->setObjectName(QString::fromUtf8("label_developer")); + + formLayout->setWidget(3, QFormLayout::LabelRole, label_developer); + + line_developer = new QLineEdit(dockWidgetContents); + line_developer->setObjectName(QString::fromUtf8("line_developer")); + line_developer->setReadOnly(true); + + formLayout->setWidget(3, QFormLayout::FieldRole, line_developer); + + label_description = new QLabel(dockWidgetContents); + label_description->setObjectName(QString::fromUtf8("label_description")); + + formLayout->setWidget(7, QFormLayout::LabelRole, label_description); + + edit_description = new QPlainTextEdit(dockWidgetContents); + edit_description->setObjectName(QString::fromUtf8("edit_description")); + edit_description->setMaximumSize(QSize(16777215, 80)); + edit_description->setReadOnly(true); + edit_description->setPlainText(QString::fromUtf8("")); + + formLayout->setWidget(7, QFormLayout::FieldRole, edit_description); + + ImageInfo->setWidget(dockWidgetContents); + + retranslateUi(ImageInfo); + + QMetaObject::connectSlotsByName(ImageInfo); + } // setupUi + + void retranslateUi(QDockWidget *ImageInfo) + { + ImageInfo->setWindowTitle(QApplication::translate("ImageInfo", "Image Info", 0, QApplication::UnicodeUTF8)); + label_name->setText(QApplication::translate("ImageInfo", "Name", 0, QApplication::UnicodeUTF8)); + label_gameid->setText(QApplication::translate("ImageInfo", "Game ID", 0, QApplication::UnicodeUTF8)); + label_country->setText(QApplication::translate("ImageInfo", "Country", 0, QApplication::UnicodeUTF8)); + label_bannertext->setText(QApplication::translate("ImageInfo", "Banner", 0, QApplication::UnicodeUTF8)); + line_name->setText(QString()); + line_gameid->setText(QString()); + line_country->setText(QApplication::translate("ImageInfo", "EUROPE", 0, QApplication::UnicodeUTF8)); + label_banner->setText(QString()); + label_developer->setText(QApplication::translate("ImageInfo", "Developer", 0, QApplication::UnicodeUTF8)); + label_description->setText(QApplication::translate("ImageInfo", "Description", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class ImageInfo: public Ui_ImageInfo {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_IMAGE_INFO_H diff --git a/src/citra_qt/ui_main.h b/src/citra_qt/ui_main.h new file mode 100644 index 00000000..d349a5c6 --- /dev/null +++ b/src/citra_qt/ui_main.h @@ -0,0 +1,148 @@ +/******************************************************************************** +** Form generated from reading UI file 'main.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_MAIN_H +#define UI_MAIN_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_MainWindow +{ +public: + QAction *action_load_elf; + QAction *action_Exit; + QAction *action_Start; + QAction *action_Pause; + QAction *action_Stop; + QAction *action_About; + QAction *action_Single_Window_Mode; + QAction *action_Hotkeys; + QAction *action_Configure; + QWidget *centralwidget; + QHBoxLayout *horizontalLayout; + QMenuBar *menubar; + QMenu *menu_File; + QMenu *menu_Emulation; + QMenu *menu_View; + QMenu *menu_Help; + QStatusBar *statusbar; + + void setupUi(QMainWindow *MainWindow) + { + if (MainWindow->objectName().isEmpty()) + MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->resize(1081, 730); + QIcon icon; + icon.addFile(QString::fromUtf8("src/pcafe/res/icon3_64x64.ico"), QSize(), QIcon::Normal, QIcon::Off); + MainWindow->setWindowIcon(icon); + MainWindow->setTabShape(QTabWidget::Rounded); + MainWindow->setDockNestingEnabled(true); + action_load_elf = new QAction(MainWindow); + action_load_elf->setObjectName(QString::fromUtf8("action_load_elf")); + action_Exit = new QAction(MainWindow); + action_Exit->setObjectName(QString::fromUtf8("action_Exit")); + action_Start = new QAction(MainWindow); + action_Start->setObjectName(QString::fromUtf8("action_Start")); + action_Pause = new QAction(MainWindow); + action_Pause->setObjectName(QString::fromUtf8("action_Pause")); + action_Pause->setEnabled(false); + action_Stop = new QAction(MainWindow); + action_Stop->setObjectName(QString::fromUtf8("action_Stop")); + action_Stop->setEnabled(false); + action_About = new QAction(MainWindow); + action_About->setObjectName(QString::fromUtf8("action_About")); + action_Single_Window_Mode = new QAction(MainWindow); + action_Single_Window_Mode->setObjectName(QString::fromUtf8("action_Single_Window_Mode")); + action_Single_Window_Mode->setCheckable(true); + action_Hotkeys = new QAction(MainWindow); + action_Hotkeys->setObjectName(QString::fromUtf8("action_Hotkeys")); + action_Configure = new QAction(MainWindow); + action_Configure->setObjectName(QString::fromUtf8("action_Configure")); + centralwidget = new QWidget(MainWindow); + centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + horizontalLayout = new QHBoxLayout(centralwidget); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + MainWindow->setCentralWidget(centralwidget); + menubar = new QMenuBar(MainWindow); + menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setGeometry(QRect(0, 0, 1081, 20)); + menu_File = new QMenu(menubar); + menu_File->setObjectName(QString::fromUtf8("menu_File")); + menu_Emulation = new QMenu(menubar); + menu_Emulation->setObjectName(QString::fromUtf8("menu_Emulation")); + menu_View = new QMenu(menubar); + menu_View->setObjectName(QString::fromUtf8("menu_View")); + menu_Help = new QMenu(menubar); + menu_Help->setObjectName(QString::fromUtf8("menu_Help")); + MainWindow->setMenuBar(menubar); + statusbar = new QStatusBar(MainWindow); + statusbar->setObjectName(QString::fromUtf8("statusbar")); + MainWindow->setStatusBar(statusbar); + + menubar->addAction(menu_File->menuAction()); + menubar->addAction(menu_Emulation->menuAction()); + menubar->addAction(menu_View->menuAction()); + menubar->addAction(menu_Help->menuAction()); + menu_File->addAction(action_load_elf); + menu_File->addSeparator(); + menu_File->addAction(action_Exit); + menu_Emulation->addAction(action_Start); + menu_Emulation->addAction(action_Pause); + menu_Emulation->addAction(action_Stop); + menu_Emulation->addSeparator(); + menu_Emulation->addAction(action_Configure); + menu_View->addAction(action_Single_Window_Mode); + menu_View->addAction(action_Hotkeys); + menu_Help->addAction(action_About); + + retranslateUi(MainWindow); + QObject::connect(action_Exit, SIGNAL(triggered()), MainWindow, SLOT(close())); + QObject::connect(action_Configure, SIGNAL(triggered()), MainWindow, SLOT(OnConfigure())); + + QMetaObject::connectSlotsByName(MainWindow); + } // setupUi + + void retranslateUi(QMainWindow *MainWindow) + { + MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Citra", 0, QApplication::UnicodeUTF8)); + action_load_elf->setText(QApplication::translate("MainWindow", "Load ELF ...", 0, QApplication::UnicodeUTF8)); + action_Exit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8)); + action_Start->setText(QApplication::translate("MainWindow", "&Start", 0, QApplication::UnicodeUTF8)); + action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8)); + action_Stop->setText(QApplication::translate("MainWindow", "&Stop", 0, QApplication::UnicodeUTF8)); + action_About->setText(QApplication::translate("MainWindow", "About Citra", 0, QApplication::UnicodeUTF8)); + action_Single_Window_Mode->setText(QApplication::translate("MainWindow", "Single Window Mode", 0, QApplication::UnicodeUTF8)); + action_Hotkeys->setText(QApplication::translate("MainWindow", "Configure &Hotkeys ...", 0, QApplication::UnicodeUTF8)); + action_Configure->setText(QApplication::translate("MainWindow", "Configure ...", 0, QApplication::UnicodeUTF8)); + menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8)); + menu_Emulation->setTitle(QApplication::translate("MainWindow", "&Emulation", 0, QApplication::UnicodeUTF8)); + menu_View->setTitle(QApplication::translate("MainWindow", "&View", 0, QApplication::UnicodeUTF8)); + menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class MainWindow: public Ui_MainWindow {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_MAIN_H diff --git a/src/citra_qt/ui_welcome_wizard.h b/src/citra_qt/ui_welcome_wizard.h new file mode 100644 index 00000000..0cc5ceb4 --- /dev/null +++ b/src/citra_qt/ui_welcome_wizard.h @@ -0,0 +1,124 @@ +/******************************************************************************** +** Form generated from reading UI file 'welcome_wizard.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_WELCOME_WIZARD_H +#define UI_WELCOME_WIZARD_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "path_list.hxx" + +QT_BEGIN_NAMESPACE + +class Ui_WelcomeWizard +{ +public: + QWizardPage *wizardPage1; + QWizardPage *wizardPage2; + QVBoxLayout *verticalLayout_2; + QHBoxLayout *horizontalLayout; + QLineEdit *edit_path; + QPushButton *button_browse_path; + QHBoxLayout *horizontalLayout_2; + GPathList *path_list; + QVBoxLayout *verticalLayout_3; + QPushButton *button_add_path; + QSpacerItem *verticalSpacer; + + void setupUi(QWizard *WelcomeWizard) + { + if (WelcomeWizard->objectName().isEmpty()) + WelcomeWizard->setObjectName(QString::fromUtf8("WelcomeWizard")); + WelcomeWizard->resize(510, 300); + WelcomeWizard->setModal(true); + wizardPage1 = new QWizardPage(); + wizardPage1->setObjectName(QString::fromUtf8("wizardPage1")); + WelcomeWizard->addPage(wizardPage1); + wizardPage2 = new QWizardPage(); + wizardPage2->setObjectName(QString::fromUtf8("wizardPage2")); + verticalLayout_2 = new QVBoxLayout(wizardPage2); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + edit_path = new QLineEdit(wizardPage2); + edit_path->setObjectName(QString::fromUtf8("edit_path")); + edit_path->setReadOnly(true); + + horizontalLayout->addWidget(edit_path); + + button_browse_path = new QPushButton(wizardPage2); + button_browse_path->setObjectName(QString::fromUtf8("button_browse_path")); + + horizontalLayout->addWidget(button_browse_path); + + + verticalLayout_2->addLayout(horizontalLayout); + + horizontalLayout_2 = new QHBoxLayout(); + horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + path_list = new GPathList(wizardPage2); + path_list->setObjectName(QString::fromUtf8("path_list")); + + horizontalLayout_2->addWidget(path_list); + + verticalLayout_3 = new QVBoxLayout(); + verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + button_add_path = new QPushButton(wizardPage2); + button_add_path->setObjectName(QString::fromUtf8("button_add_path")); + + verticalLayout_3->addWidget(button_add_path); + + verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + verticalLayout_3->addItem(verticalSpacer); + + + horizontalLayout_2->addLayout(verticalLayout_3); + + + verticalLayout_2->addLayout(horizontalLayout_2); + + WelcomeWizard->addPage(wizardPage2); + + retranslateUi(WelcomeWizard); + + QMetaObject::connectSlotsByName(WelcomeWizard); + } // setupUi + + void retranslateUi(QWizard *WelcomeWizard) + { + WelcomeWizard->setWindowTitle(QApplication::translate("WelcomeWizard", "Welcome", 0, QApplication::UnicodeUTF8)); + wizardPage1->setTitle(QApplication::translate("WelcomeWizard", "Welcome", 0, QApplication::UnicodeUTF8)); + wizardPage1->setSubTitle(QApplication::translate("WelcomeWizard", "This wizard will guide you through the initial configuration.", 0, QApplication::UnicodeUTF8)); + wizardPage2->setTitle(QApplication::translate("WelcomeWizard", "ISO paths", 0, QApplication::UnicodeUTF8)); + wizardPage2->setSubTitle(QApplication::translate("WelcomeWizard", "If you have a collection of game images, you can add them to the path list here. Gekko will automatically show a list of your collection on startup then.", 0, QApplication::UnicodeUTF8)); + edit_path->setText(QString()); + edit_path->setPlaceholderText(QApplication::translate("WelcomeWizard", "Select a path to add ...", 0, QApplication::UnicodeUTF8)); + button_browse_path->setText(QString()); + button_add_path->setText(QString()); + } // retranslateUi + +}; + +namespace Ui { + class WelcomeWizard: public Ui_WelcomeWizard {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_WELCOME_WIZARD_H diff --git a/src/citra_qt/version.h b/src/citra_qt/version.h new file mode 100644 index 00000000..07022de5 --- /dev/null +++ b/src/citra_qt/version.h @@ -0,0 +1,7 @@ +// TODO: Supposed to be generated... +// GENERATED - Do not edit! +#ifndef VERSION_H_ +#define VERSION_H_ +#define __BUILD__ "40" +#define VERSION __BUILD__ +#endif // VERSION_H_ -- cgit v1.2.3