From 05be8d2f0c58f5de56bbf920743f91bd8584b4f2 Mon Sep 17 00:00:00 2001 From: Mathieu Vaillancourt Date: Mon, 31 Mar 2014 22:26:50 -0400 Subject: [PATCH] Basic QT window --- citra.sln | 16 +- src/citra_qt/CMakeLists.txt | 38 ++ src/citra_qt/citra_qt.vcxproj | 180 +++++++ src/citra_qt/citra_qt.vcxproj.filters | 103 ++++ src/citra_qt/qt-build.props | 56 ++ src/citra_qt/qt-build.targets | 242 +++++++++ src/citra_qt/qt-build.xml | 486 ++++++++++++++++++ src/citra_qt/src/bootmanager.cpp | 246 +++++++++ src/citra_qt/src/bootmanager.hxx | 104 ++++ 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/config/controller_config_util.cpp | 121 +++++ .../src/config/controller_config_util.hxx | 78 +++ .../src/config/ui_controller_config.h | 222 ++++++++ src/citra_qt/src/cpu_regs.cpp | 64 +++ src/citra_qt/src/cpu_regs.hxx | 27 + src/citra_qt/src/cpu_regs.ui | 40 ++ src/citra_qt/src/disasm.cpp | 144 ++++++ src/citra_qt/src/disasm.hxx | 38 ++ 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 | 191 +++++++ src/citra_qt/src/main.hxx | 47 ++ src/citra_qt/src/main.ui | 171 ++++++ 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 | 149 ++++++ src/citra_qt/src/ui_welcome_wizard.h | 124 +++++ src/citra_qt/src/version.h | 7 + vsprops/qt.props | 35 ++ vsprops/qt_libs_debug.props | 16 + vsprops/qt_libs_release.props | 12 + 44 files changed, 4540 insertions(+), 2 deletions(-) create mode 100644 src/citra_qt/CMakeLists.txt create mode 100644 src/citra_qt/citra_qt.vcxproj create mode 100644 src/citra_qt/citra_qt.vcxproj.filters create mode 100644 src/citra_qt/qt-build.props create mode 100644 src/citra_qt/qt-build.targets create mode 100644 src/citra_qt/qt-build.xml create mode 100644 src/citra_qt/src/bootmanager.cpp create mode 100644 src/citra_qt/src/bootmanager.hxx create mode 100644 src/citra_qt/src/callstack.cpp create mode 100644 src/citra_qt/src/callstack.hxx create mode 100644 src/citra_qt/src/callstack.ui create mode 100644 src/citra_qt/src/config/controller_config.cpp create mode 100644 src/citra_qt/src/config/controller_config.hxx create mode 100644 src/citra_qt/src/config/controller_config.ui create mode 100644 src/citra_qt/src/config/controller_config_util.cpp create mode 100644 src/citra_qt/src/config/controller_config_util.hxx create mode 100644 src/citra_qt/src/config/ui_controller_config.h create mode 100644 src/citra_qt/src/cpu_regs.cpp create mode 100644 src/citra_qt/src/cpu_regs.hxx create mode 100644 src/citra_qt/src/cpu_regs.ui create mode 100644 src/citra_qt/src/disasm.cpp create mode 100644 src/citra_qt/src/disasm.hxx create mode 100644 src/citra_qt/src/disasm.ui create mode 100644 src/citra_qt/src/hotkeys.cpp create mode 100644 src/citra_qt/src/hotkeys.hxx create mode 100644 src/citra_qt/src/hotkeys.ui create mode 100644 src/citra_qt/src/main.cpp create mode 100644 src/citra_qt/src/main.hxx create mode 100644 src/citra_qt/src/main.ui create mode 100644 src/citra_qt/src/ramview.cpp create mode 100644 src/citra_qt/src/ramview.hxx create mode 100644 src/citra_qt/src/ui_callstack.h create mode 100644 src/citra_qt/src/ui_cpu_regs.h create mode 100644 src/citra_qt/src/ui_disasm.h create mode 100644 src/citra_qt/src/ui_gfx_fifo_player.h create mode 100644 src/citra_qt/src/ui_hotkeys.h create mode 100644 src/citra_qt/src/ui_image_info.h create mode 100644 src/citra_qt/src/ui_main.h create mode 100644 src/citra_qt/src/ui_welcome_wizard.h create mode 100644 src/citra_qt/src/version.h create mode 100644 vsprops/qt.props create mode 100644 vsprops/qt_libs_debug.props create mode 100644 vsprops/qt_libs_release.props diff --git a/citra.sln b/citra.sln index 8d6deada2..ebba4c2f0 100644 --- a/citra.sln +++ b/citra.sln @@ -1,5 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2013 for Windows Desktop +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "src\common\common.vcxproj", "{DFE335FC-755D-4BAA-8452-94434F8A1EDB}" ProjectSection(ProjectDependencies) = postProject {69F00340-5C3D-449F-9A80-958435C6CF06} = {69F00340-5C3D-449F-9A80-958435C6CF06} @@ -17,6 +19,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "src\core\core.vcxpr EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scm_rev_gen", "src\common\scm_rev_gen.vcxproj", "{69F00340-5C3D-449F-9A80-958435C6CF06}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "citra_qt", "src\citra_qt\citra_qt.vcxproj", "{A587F714-490F-407A-9E36-7AB7FA0D7BAB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -57,6 +61,14 @@ Global {69F00340-5C3D-449F-9A80-958435C6CF06}.Release|Win32.Build.0 = Release|Win32 {69F00340-5C3D-449F-9A80-958435C6CF06}.Release|x64.ActiveCfg = Release|x64 {69F00340-5C3D-449F-9A80-958435C6CF06}.Release|x64.Build.0 = Release|x64 + {A587F714-490F-407A-9E36-7AB7FA0D7BAB}.Debug|Win32.ActiveCfg = Debug|Win32 + {A587F714-490F-407A-9E36-7AB7FA0D7BAB}.Debug|Win32.Build.0 = Debug|Win32 + {A587F714-490F-407A-9E36-7AB7FA0D7BAB}.Debug|x64.ActiveCfg = Debug|x64 + {A587F714-490F-407A-9E36-7AB7FA0D7BAB}.Debug|x64.Build.0 = Debug|x64 + {A587F714-490F-407A-9E36-7AB7FA0D7BAB}.Release|Win32.ActiveCfg = Release|Win32 + {A587F714-490F-407A-9E36-7AB7FA0D7BAB}.Release|Win32.Build.0 = Release|Win32 + {A587F714-490F-407A-9E36-7AB7FA0D7BAB}.Release|x64.ActiveCfg = Release|x64 + {A587F714-490F-407A-9E36-7AB7FA0D7BAB}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt new file mode 100644 index 000000000..facb99e90 --- /dev/null +++ b/src/citra_qt/CMakeLists.txt @@ -0,0 +1,38 @@ +set(SRCS + src/bootmanager.cpp + src/callstack.cpp + src/disasm.cpp + src/cpu_regs.cpp + src/hotkeys.cpp + src/main.cpp + src/ramview.cpp + src/config/controller_config.cpp + src/config/controller_config_util.cpp) + +qt4_wrap_ui(UI_HDRS + src/callstack.ui + src/disasm.ui + src/cpu_regs.ui + src/hotkeys.ui + src/main.ui + src/config/controller_config.ui) + +qt4_wrap_cpp(MOC_SRCS + src/bootmanager.hxx + src/callstack.hxx + src/disasm.hxx + src/cpu_regs.hxx + src/hotkeys.hxx + src/main.hxx + src/ramview.hxx + src/config/controller_config.hxx + src/config/controller_config_util.hxx) + +# add uic results to include directories +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(./src/) + +add_executable(citra-qt ${SRCS} ${MOC_SRCS} ${UI_HDRS}) +target_link_libraries(citra-qt core common qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES}) + +#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) diff --git a/src/citra_qt/citra_qt.vcxproj b/src/citra_qt/citra_qt.vcxproj new file mode 100644 index 000000000..9164b280b --- /dev/null +++ b/src/citra_qt/citra_qt.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A587F714-490F-407A-9E36-7AB7FA0D7BAB} + citra_qt + + + + Application + true + v120 + + + Application + true + v120 + + + Application + false + v120 + + + Application + false + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + src/config/ui_ + + + + + + + + + + + + + + + + {dfe335fc-755d-4baa-8452-94434f8a1edb} + + + {8aea7f29-3466-4786-a10d-6a4bd0610977} + + + + + + + \ No newline at end of file diff --git a/src/citra_qt/citra_qt.vcxproj.filters b/src/citra_qt/citra_qt.vcxproj.filters new file mode 100644 index 000000000..3900cc8e0 --- /dev/null +++ b/src/citra_qt/citra_qt.vcxproj.filters @@ -0,0 +1,103 @@ + + + + + {1b8f77c1-61e8-4a9f-95f8-8d1c53015ad8} + + + {dede739c-939b-4147-9e72-4a326b97d237} + + + {80178741-d3ab-4031-892c-ec58490ea8bf} + + + + + + debugger + + + debugger + + + + debugger + + + debugger + + + qhexedit + + + qhexedit + + + qhexedit + + + qhexedit + + + + config + + + config + + + + + + debugger + + + debugger + + + qhexedit + + + qhexedit + + + qhexedit + + + qhexedit + + + debugger + + + debugger + + + + + config + + + config + + + + + + debugger + + + debugger + + + debugger + + + + config + + + + + + \ No newline at end of file diff --git a/src/citra_qt/qt-build.props b/src/citra_qt/qt-build.props new file mode 100644 index 000000000..d4600006c --- /dev/null +++ b/src/citra_qt/qt-build.props @@ -0,0 +1,56 @@ + + + + Midl + CustomBuild + + + + .hpp + ui_ + %QTDIR%\bin\uic.exe [inputs] -o "[QtUicPrefix]%(FileName)[QtUicExt]" + [QtUicPrefix]%(FileName)[QtUicExt] + %(FileName).ui + + + + Midl + CustomBuild + + + + true + true + true + true + true + true + true + true + False + False + _moc + %(FileName)%(QtMocPfx) + %QTDIR%\bin\moc.exe [QtMocNoWarnings] [QtCoreLib] [QtShared] [QtThread] [QtUnicode] [QtLargeFile] [QtKeywords] [QtOpenGLLib] [QtNoDebug] [QtGuiLib] -DWIN32 -D_MSC_VER=1500 -DWIN32 [Inputs] -o$(IntDir)%(QtMocFilename).cpp && cl.exe $(IntDir)%(QtMocFilename).cpp [QtCommandLine] /c /Fo"$(IntDir)%(QtMocFilename).obj" + $(IntDir)%(QtMocFilename).obj + %(FileName).hxx + true + + + + Midl + CustomBuild + + + + _qrc + %(FileName)%(QtQrcPfx) + %QTDIR%\bin\rcc.exe [inputs] -o $(IntDir)%(QtQrcFileName).cpp && cl.exe $(IntDir)%(QtQrcFileName).cpp /c /Fo"$(IntDir)%(QtQrcFileName)" [QtCommandLine] + $(IntDir)%(QtQrcFileName).obj + %(FileName).qrc + + + \ No newline at end of file diff --git a/src/citra_qt/qt-build.targets b/src/citra_qt/qt-build.targets new file mode 100644 index 000000000..febec73c4 --- /dev/null +++ b/src/citra_qt/qt-build.targets @@ -0,0 +1,242 @@ + + + + + + _UIC + + + _MOC + + + _QRC + + + + $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml + + + $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml + + + $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml + + + + + + + + @(UIC, '|') + + + + + + + + + $(ComputeLinkInputsTargets); + ComputeUICOutput; + + + $(ComputeLibInputsTargets); + ComputeUICOutput; + + + + + + + + + + + + + + + + + + @(MOC, '|') + + + + + + + + + $(ComputeLinkInputsTargets); + ComputeMOCOutput; + + + $(ComputeLibInputsTargets); + ComputeMOCOutput; + + + + + + + + + + + + + + + + + + @(QRC, '|') + + + + + + + + + $(ComputeLinkInputsTargets); + ComputeQRCOutput; + + + $(ComputeLibInputsTargets); + ComputeQRCOutput; + + + + + + + + + + + + \ No newline at end of file diff --git a/src/citra_qt/qt-build.xml b/src/citra_qt/qt-build.xml new file mode 100644 index 000000000..1bc84aa99 --- /dev/null +++ b/src/citra_qt/qt-build.xml @@ -0,0 +1,486 @@ + + + + + + + + + + General + + + + + Command Line + + + + + + + + + + + + + + Execute Before + + + Specifies the targets for the build customization to run before. + + + + + + + + + + + Execute After + + + Specifies the targets for the build customization to run after. + + + + + + + + + + + + + + Additional Options + + + Additional Options + + + + + + + + + + + + + + General + + + + + Command Line + + + + + + + + + + + + + + + + + + + + + + + + Execute Before + + + Specifies the targets for the build customization to run before. + + + + + + + + + + + Execute After + + + Specifies the targets for the build customization to run after. + + + + + + + + + + + + + + Additional Options + + + Additional Options + + + + + + + + + + + + + + General + + + + + Command Line + + + + + + + + + + + + + + Execute Before + + + Specifies the targets for the build customization to run before. + + + + + + + + + + + Execute After + + + Specifies the targets for the build customization to run after. + + + + + + + + + + + + + + Additional Options + + + Additional Options + + + + + + + \ No newline at end of file diff --git a/src/citra_qt/src/bootmanager.cpp b/src/citra_qt/src/bootmanager.cpp new file mode 100644 index 000000000..8d7b5e446 --- /dev/null +++ b/src/citra_qt/src/bootmanager.cpp @@ -0,0 +1,246 @@ +#include +#include + +#include "common.h" +#include "bootmanager.hxx" + +#include "core.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(true), render_window(render_window) +{ +} + +void EmuThread::SetFilename(const char* filename) +{ + strcpy(this->filename, filename); +} + +void EmuThread::run() +{ + //u32 tight_loop; + + NOTICE_LOG(MASTER_LOG, APP_NAME " starting...\n"); + + if (Core::Init(/*render_window*/)) { + ERROR_LOG(MASTER_LOG, "core initialization failed, exiting..."); + Core::Stop(); + exit(1); + } + + // Load a game or die... + Core::Start(); //autoboot for now + /* + if (E_OK == dvd::LoadBootableFile(filename)) { + if (common::g_config->enable_auto_boot()) { + core::Start(); + } else { + LOG_ERROR(TMASTER, "Autoboot required in no-GUI mode... Exiting!\n"); + } + } else { + LOG_ERROR(TMASTER, "Failed to load a bootable file... Exiting!\n"); + exit(E_ERR); + } + */ + + /* + while(core::SYS_DIE != core::g_state) + { + if (core::SYS_RUNNING == core::g_state) + { + if(!cpu->is_on) + { + cpu->Start(); // Initialize and start CPU. + } + else + { + for(tight_loop = 0; tight_loop < 10000; ++tight_loop) + { + if (!cpu_running) + { + emit CPUStepped(); + exec_cpu_step = false; + cpu->step = true; + while (!exec_cpu_step && !cpu_running && core::SYS_DIE != core::g_state); + } + cpu->execStep(); + cpu->step = false; + } + } + } + else if (core::SYS_HALTED == core::g_state) + { + core::Stop(); + } + } + */ + 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 new file mode 100644 index 000000000..943945961 --- /dev/null +++ b/src/citra_qt/src/bootmanager.hxx @@ -0,0 +1,104 @@ +#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; } + +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 new file mode 100644 index 000000000..2d62cb0d0 --- /dev/null +++ b/src/citra_qt/src/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/src/callstack.hxx b/src/citra_qt/src/callstack.hxx new file mode 100644 index 000000000..60b24f236 --- /dev/null +++ b/src/citra_qt/src/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/src/callstack.ui b/src/citra_qt/src/callstack.ui new file mode 100644 index 000000000..b3c4db632 --- /dev/null +++ b/src/citra_qt/src/callstack.ui @@ -0,0 +1,36 @@ + + + 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 new file mode 100644 index 000000000..52dfb627c --- /dev/null +++ b/src/citra_qt/src/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/src/config/controller_config.hxx b/src/citra_qt/src/config/controller_config.hxx new file mode 100644 index 000000000..9ff86a110 --- /dev/null +++ b/src/citra_qt/src/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/src/config/controller_config.ui b/src/citra_qt/src/config/controller_config.ui new file mode 100644 index 000000000..9f650047b --- /dev/null +++ b/src/citra_qt/src/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/src/config/controller_config_util.cpp b/src/citra_qt/src/config/controller_config_util.cpp new file mode 100644 index 000000000..c5426570b --- /dev/null +++ b/src/citra_qt/src/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/src/config/controller_config_util.hxx b/src/citra_qt/src/config/controller_config_util.hxx new file mode 100644 index 000000000..af38f126c --- /dev/null +++ b/src/citra_qt/src/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/src/config/ui_controller_config.h b/src/citra_qt/src/config/ui_controller_config.h new file mode 100644 index 000000000..f84364a77 --- /dev/null +++ b/src/citra_qt/src/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/src/cpu_regs.cpp b/src/citra_qt/src/cpu_regs.cpp new file mode 100644 index 000000000..5d240b4bc --- /dev/null +++ b/src/citra_qt/src/cpu_regs.cpp @@ -0,0 +1,64 @@ +#include "cpu_regs.hxx" + +//#include "powerpc/cpu_core_regs.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"))); + + //const Qt::ItemFlags child_flags = Qt::ItemIsEditable | Qt::ItemIsEnabled; + //registers->setFlags(child_flags); + //CSPR->setFlags(child_flags); + + for (int i = 0; i < 16; ++i) + { + QTreeWidgetItem* child = new QTreeWidgetItem(QStringList(QString("R[%1]").arg(i, 2, 10, QLatin1Char('0')))); + //child->setFlags(child_flags); + 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() +{ + //TODO (Vail) replace values + int value = 0; + for (int i = 0; i < 16; ++i) + registers->child(i)->setText(1, QString("0x%1").arg(i, 8, 16, QLatin1Char('0'))); + + CSPR->child(0)->setText(1, QString("%1").arg(value)); + CSPR->child(1)->setText(1, QString("%1").arg(value)); + CSPR->child(2)->setText(1, QString("%1").arg(value)); + CSPR->child(3)->setText(1, QString("%1").arg(value)); + CSPR->child(4)->setText(1, QString("%1").arg(value)); + CSPR->child(5)->setText(1, QString("%1").arg(value)); + CSPR->child(6)->setText(1, QString("%1").arg(value)); + CSPR->child(7)->setText(1, QString("%1").arg(value)); + CSPR->child(8)->setText(1, QString("%1").arg(value)); + CSPR->child(9)->setText(1, QString("%1").arg(value)); + CSPR->child(10)->setText(1, QString("%1").arg(value)); + CSPR->child(11)->setText(1, QString("%1").arg(value)); + CSPR->child(12)->setText(1, QString("%1").arg(value)); + CSPR->child(13)->setText(1, QString("%1").arg(value)); + CSPR->child(14)->setText(1, QString("%1").arg(value)); + CSPR->child(15)->setText(1, QString("%1").arg(value)); +} diff --git a/src/citra_qt/src/cpu_regs.hxx b/src/citra_qt/src/cpu_regs.hxx new file mode 100644 index 000000000..27c194bde --- /dev/null +++ b/src/citra_qt/src/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/src/cpu_regs.ui b/src/citra_qt/src/cpu_regs.ui new file mode 100644 index 000000000..6537c9cd6 --- /dev/null +++ b/src/citra_qt/src/cpu_regs.ui @@ -0,0 +1,40 @@ + + + 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 new file mode 100644 index 000000000..6e4087b23 --- /dev/null +++ b/src/citra_qt/src/disasm.cpp @@ -0,0 +1,144 @@ +#include +#include "ui_disasm.h" +#include "disasm.hxx" + +#include "bootmanager.hxx" +#include "hotkeys.hxx" + +#include "common.h" +#include "mem_map.h" + +#include "break_points.h" +//#include "powerpc/cpu_core_regs.h" +#include "arm/disassembler/arm_disasm.h" + +//#include "powerpc/interpreter/cpu_int.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(3); + disasm_ui.treeView->setModel(model); + + RegisterHotkey("Disassembler", "Step", QKeySequence(Qt::Key_F10), Qt::ApplicationShortcut); + RegisterHotkey("Disassembler", "Step into", QKeySequence(Qt::Key_F11), Qt::ApplicationShortcut); +// RegisterHotkey("Disassembler", "Pause", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut); + RegisterHotkey("Disassembler", "Continue", QKeySequence(Qt::Key_F5), 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", "Step", this), SIGNAL(activated()), this, SLOT(OnStep())); + connect(GetHotkey("Disassembler", "Step into", this), SIGNAL(activated()), this, SLOT(OnStepInto())); +// connect(GetHotkey("Disassembler", "Pause", this), SIGNAL(activated()), this, SLOT(OnPause())); + connect(GetHotkey("Disassembler", "Continue", this), SIGNAL(activated()), this, SLOT(OnContinue())); + connect(GetHotkey("Disassembler", "Set Breakpoint", this), SIGNAL(activated()), this, SLOT(OnSetBreakpoint())); +} + +void GDisAsmView::OnSetBreakpoint() +{ + if (SelectedRow() == -1) + return; + + u32 address = base_addr + 4 * SelectedRow(); + if (breakpoints->IsAddressBreakPoint(address)) + { + breakpoints->Remove(address); + model->item(SelectedRow(), 0)->setBackground(QBrush()); + model->item(SelectedRow(), 1)->setBackground(QBrush()); + model->item(SelectedRow(), 2)->setBackground(QBrush()); + } + else + { + breakpoints->Add(address); + model->item(SelectedRow(), 0)->setBackground(Qt::red); + model->item(SelectedRow(), 1)->setBackground(Qt::red); + model->item(SelectedRow(), 2)->setBackground(Qt::red); + } +} + +void GDisAsmView::OnStep() +{ + emu_thread.SetCpuRunning(false); + emu_thread.ExecStep(); +} + +void GDisAsmView::OnPause() +{ + emu_thread.SetCpuRunning(false); +} + +void GDisAsmView::OnContinue() +{ + emu_thread.SetCpuRunning(true); +} + +void GDisAsmView::OnCPUStepped() +{ + /* + base_addr = ireg.PC - 52; + unsigned int curInstAddr = base_addr; + int counter = 0; + QModelIndex cur_instr_index; + model->setRowCount(100); + while(true) + { + u32 opcode = *(u32*)(&Mem_RAM[curInstAddr & RAM_MASK]); + + char out1[64]; + char out2[128]; + u32 out3 = 0; + memset(out1, 0, sizeof(out1)); + memset(out2, 0, sizeof(out2)); + + // NOTE: out3 (nextInstAddr) seems to be bugged, better don't use it... + DisassembleGekko(out1, out2, opcode, curInstAddr, &out3); + model->setItem(counter, 0, new QStandardItem(QString("0x%1").arg((uint)curInstAddr, 8, 16, QLatin1Char('0')))); + model->setItem(counter, 1, new QStandardItem(QString(out1))); + model->setItem(counter, 2, new QStandardItem(QString(out2))); + + if (ireg.PC == curInstAddr) + { + model->item(counter, 0)->setBackground(Qt::yellow); + model->item(counter, 1)->setBackground(Qt::yellow); + model->item(counter, 2)->setBackground(Qt::yellow); + cur_instr_index = model->index(counter, 0); + } + else if (Debugger::IsBreakpoint(curInstAddr)) + { + model->item(counter, 0)->setBackground(Qt::red); + model->item(counter, 1)->setBackground(Qt::red); + model->item(counter, 2)->setBackground(Qt::red); + } + else + { + model->item(counter, 0)->setBackground(QBrush()); + model->item(counter, 1)->setBackground(QBrush()); + model->item(counter, 2)->setBackground(QBrush()); + } + curInstAddr += 4; + + ++counter; + if (counter >= 100) break; + } + disasm_ui.treeView->resizeColumnToContents(0); + disasm_ui.treeView->resizeColumnToContents(1); + disasm_ui.treeView->resizeColumnToContents(2); + disasm_ui.treeView->scrollTo(cur_instr_index); // QAbstractItemView::PositionAtCenter? + */ +} + +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 new file mode 100644 index 000000000..648107114 --- /dev/null +++ b/src/citra_qt/src/disasm.hxx @@ -0,0 +1,38 @@ +#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); + +public slots: + void OnSetBreakpoint(); + void OnStep(); + void OnPause(); + void OnContinue(); + + 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 new file mode 100644 index 000000000..fb3845164 --- /dev/null +++ b/src/citra_qt/src/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/src/hotkeys.cpp b/src/citra_qt/src/hotkeys.cpp new file mode 100644 index 000000000..1aa1e8b96 --- /dev/null +++ b/src/citra_qt/src/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/src/hotkeys.hxx b/src/citra_qt/src/hotkeys.hxx new file mode 100644 index 000000000..66ef7bb4e --- /dev/null +++ b/src/citra_qt/src/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/src/hotkeys.ui b/src/citra_qt/src/hotkeys.ui new file mode 100644 index 000000000..38a9a14d1 --- /dev/null +++ b/src/citra_qt/src/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/src/main.cpp b/src/citra_qt/src/main.cpp new file mode 100644 index 000000000..02893809b --- /dev/null +++ b/src/citra_qt/src/main.cpp @@ -0,0 +1,191 @@ +#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 "core.h" +#include "version.h" + + +GMainWindow::GMainWindow() +{ + ui.setupUi(this); + statusBar()->hide(); + + render_window = new GRenderWindow; + render_window->hide(); + + GDisAsmView* disasm = new GDisAsmView(this, render_window->GetEmuThread()); + addDockWidget(Qt::BottomDockWidgetArea, disasm); + disasm->hide(); + + GARM11RegsView* 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); + //connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), ram_edit, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection); + //connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), callstack, 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(); +} + +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); + 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() +{ +} + +void GMainWindow::OnPauseGame() +{ +} + +void GMainWindow::OnStopGame() +{ +} + +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 new file mode 100644 index 000000000..81ee3860f --- /dev/null +++ b/src/citra_qt/src/main.hxx @@ -0,0 +1,47 @@ +#ifndef _CITRA_QT_MAIN_HXX_ +#define _CITRA_QT_MAIN_HXX_ + +#include + +#include "ui_main.h" + +class GImageInfo; +class GRenderWindow; + +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; +}; + +#endif // _CITRA_QT_MAIN_HXX_ diff --git a/src/citra_qt/src/main.ui b/src/citra_qt/src/main.ui new file mode 100644 index 000000000..83d1e1f0c --- /dev/null +++ b/src/citra_qt/src/main.ui @@ -0,0 +1,171 @@ + + + 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 + + + &Stop + + + + + false + + + &Pause + + + false + + + + + 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 new file mode 100644 index 000000000..8cc252af6 --- /dev/null +++ b/src/citra_qt/src/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/src/ramview.hxx b/src/citra_qt/src/ramview.hxx new file mode 100644 index 000000000..1db1546aa --- /dev/null +++ b/src/citra_qt/src/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/ui_callstack.h b/src/citra_qt/src/ui_callstack.h new file mode 100644 index 000000000..75d10253c --- /dev/null +++ b/src/citra_qt/src/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/src/ui_cpu_regs.h b/src/citra_qt/src/ui_cpu_regs.h new file mode 100644 index 000000000..b8a80b3f2 --- /dev/null +++ b/src/citra_qt/src/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/src/ui_disasm.h b/src/citra_qt/src/ui_disasm.h new file mode 100644 index 000000000..697a224cb --- /dev/null +++ b/src/citra_qt/src/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/src/ui_gfx_fifo_player.h b/src/citra_qt/src/ui_gfx_fifo_player.h new file mode 100644 index 000000000..a65f56abd --- /dev/null +++ b/src/citra_qt/src/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/src/ui_hotkeys.h b/src/citra_qt/src/ui_hotkeys.h new file mode 100644 index 000000000..5b2cee6f4 --- /dev/null +++ b/src/citra_qt/src/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/src/ui_image_info.h b/src/citra_qt/src/ui_image_info.h new file mode 100644 index 000000000..a6aaa3d8d --- /dev/null +++ b/src/citra_qt/src/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/src/ui_main.h b/src/citra_qt/src/ui_main.h new file mode 100644 index 000000000..693fa70bd --- /dev/null +++ b/src/citra_qt/src/ui_main.h @@ -0,0 +1,149 @@ +/******************************************************************************** +** 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_Stop; + QAction *action_Pause; + 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_Stop = new QAction(MainWindow); + action_Stop->setObjectName(QString::fromUtf8("action_Stop")); + action_Stop->setEnabled(false); + action_Pause = new QAction(MainWindow); + action_Pause->setObjectName(QString::fromUtf8("action_Pause")); + action_Pause->setEnabled(false); + action_Pause->setVisible(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_Stop->setText(QApplication::translate("MainWindow", "&Stop", 0, QApplication::UnicodeUTF8)); + action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 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 new file mode 100644 index 000000000..0cc5ceb49 --- /dev/null +++ b/src/citra_qt/src/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/src/version.h b/src/citra_qt/src/version.h new file mode 100644 index 000000000..07022de5c --- /dev/null +++ b/src/citra_qt/src/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_ diff --git a/vsprops/qt.props b/vsprops/qt.props new file mode 100644 index 000000000..f9cfb1e25 --- /dev/null +++ b/vsprops/qt.props @@ -0,0 +1,35 @@ + + + + + $(QTDIR)\include\ + $(QTDIR)\lib\ + + + $(QtIncludeDir);$(QtIncludeDir)QtGui;$(QtIncludeDir)QtCore;$(QtIncludeDir)Qt;$(QtIncludeDir)QtOpenGL;$(QtIncludeDir)QtANGLE;$(QtIncludeDir)QtWidgets;$(IncludePath) + $(QtLibraryDir);$(LibraryPath) + + + + + + + src/ui_ + .h + + + /I"$(SolutionDir)src\common\src" /I"$(SolutionDir)src\core\src" /I"$(ExternalsDir)glew-1.6.0\include" /I"$(ExternalsDir)sdl-1.2.15\include" /I"$(ExternalsDir)qhexedit" + false + + + + + + + $(QtIncludeDir) + + + $(QtLibraryDir) + + + \ No newline at end of file diff --git a/vsprops/qt_libs_debug.props b/vsprops/qt_libs_debug.props new file mode 100644 index 000000000..dcba690f0 --- /dev/null +++ b/vsprops/qt_libs_debug.props @@ -0,0 +1,16 @@ + + + + + + + + QtCored4.lib;QtGuid4.lib;QtOpenGLd4.lib;%(AdditionalDependencies) + + + false + /I"$(SolutionDir)src\common\src" /I"$(SolutionDir)src\core\src" /I"$(ExternalsDir)glew-1.6.0\include" /I"$(ExternalsDir)sdl-1.2.15\include" /I"$(ExternalsDir)qhexedit" /D"_DEBUG" + + + + \ No newline at end of file diff --git a/vsprops/qt_libs_release.props b/vsprops/qt_libs_release.props new file mode 100644 index 000000000..87ccf605d --- /dev/null +++ b/vsprops/qt_libs_release.props @@ -0,0 +1,12 @@ + + + + + + + + QtCore4.lib;QtGui4.lib;QtOpenGL4.lib;%(AdditionalDependencies) + + + + \ No newline at end of file