Basic QT window

This commit is contained in:
Mathieu Vaillancourt 2014-03-31 22:26:50 -04:00
parent d4b529111a
commit 05be8d2f0c
44 changed files with 4540 additions and 2 deletions

View file

@ -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

View file

@ -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})

View file

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A587F714-490F-407A-9E36-7AB7FA0D7BAB}</ProjectGuid>
<RootNamespace>citra_qt</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="qt-build.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\vsprops\base.props" />
<Import Project="..\..\vsprops\externals.props" />
<Import Project="..\..\vsprops\qt.props" />
<Import Project="..\..\vsprops\qt_libs_debug.props" />
<Import Project="..\..\vsprops\code_generation_debug.props" />
<Import Project="..\..\vsprops\app.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\vsprops\base.props" />
<Import Project="..\..\vsprops\externals.props" />
<Import Project="..\..\vsprops\qt.props" />
<Import Project="..\..\vsprops\qt_libs_debug.props" />
<Import Project="..\..\vsprops\code_generation_debug.props" />
<Import Project="..\..\vsprops\app.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\vsprops\base.props" />
<Import Project="..\..\vsprops\externals.props" />
<Import Project="..\..\vsprops\qt.props" />
<Import Project="..\..\vsprops\qt_libs_release.props" />
<Import Project="..\..\vsprops\code_generation_release.props" />
<Import Project="..\..\vsprops\app.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\vsprops\base.props" />
<Import Project="..\..\vsprops\externals.props" />
<Import Project="..\..\vsprops\qt.props" />
<Import Project="..\..\vsprops\qt_libs_release.props" />
<Import Project="..\..\vsprops\code_generation_release.props" />
<Import Project="..\..\vsprops\app.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile />
<Link>
<IgnoreSpecificDefaultLibraries>
</IgnoreSpecificDefaultLibraries>
</Link>
<MOC />
<UIC />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile />
<Link>
<IgnoreSpecificDefaultLibraries>
</IgnoreSpecificDefaultLibraries>
</Link>
<MOC />
<UIC />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile />
<Link />
<UIC />
<UIC />
<MOC />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile />
<Link />
<UIC />
<UIC />
<MOC />
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\externals\qhexedit\commands.cpp" />
<ClCompile Include="..\..\externals\qhexedit\qhexedit.cpp" />
<ClCompile Include="..\..\externals\qhexedit\qhexedit_p.cpp" />
<ClCompile Include="..\..\externals\qhexedit\xbytearray.cpp" />
<ClCompile Include="src\bootmanager.cpp" />
<ClCompile Include="src\callstack.cpp" />
<ClCompile Include="src\config\controller_config.cpp" />
<ClCompile Include="src\config\controller_config_util.cpp" />
<ClCompile Include="src\disasm.cpp" />
<ClCompile Include="src\cpu_regs.cpp" />
<ClCompile Include="src\hotkeys.cpp" />
<ClCompile Include="src\main.cpp" />
<ClCompile Include="src\ramview.cpp" />
</ItemGroup>
<ItemGroup>
<MOC Include="src\bootmanager.hxx" />
<MOC Include="src\callstack.hxx" />
<MOC Include="src\config\controller_config.hxx" />
<MOC Include="src\config\controller_config_util.hxx" />
<MOC Include="src\disasm.hxx" />
<MOC Include="src\cpu_regs.hxx" />
<MOC Include="src\hotkeys.hxx" />
<MOC Include="src\main.hxx" />
<MOC Include="src\ramview.hxx" />
</ItemGroup>
<ItemGroup>
<UIC Include="src\callstack.ui" />
<UIC Include="src\config\controller_config.ui">
<QtUicPrefix>src/config/ui_</QtUicPrefix>
</UIC>
<UIC Include="src\disasm.ui" />
<UIC Include="src\cpu_regs.ui" />
<UIC Include="src\hotkeys.ui" />
<UIC Include="src\main.ui" />
</ItemGroup>
<ItemGroup>
<MOC Include="..\..\externals\qhexedit\commands.h" />
<MOC Include="..\..\externals\qhexedit\qhexedit.h" />
<MOC Include="..\..\externals\qhexedit\qhexedit_p.h" />
<MOC Include="..\..\externals\qhexedit\xbytearray.h" />
<ClInclude Include="src\version.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\common\common.vcxproj">
<Project>{dfe335fc-755d-4baa-8452-94434f8a1edb}</Project>
</ProjectReference>
<ProjectReference Include="..\core\core.vcxproj">
<Project>{8aea7f29-3466-4786-a10d-6a4bd0610977}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="qt-build.targets" />
</ImportGroup>
</Project>

View file

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="debugger">
<UniqueIdentifier>{1b8f77c1-61e8-4a9f-95f8-8d1c53015ad8}</UniqueIdentifier>
</Filter>
<Filter Include="qhexedit">
<UniqueIdentifier>{dede739c-939b-4147-9e72-4a326b97d237}</UniqueIdentifier>
</Filter>
<Filter Include="config">
<UniqueIdentifier>{80178741-d3ab-4031-892c-ec58490ea8bf}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\main.cpp" />
<ClCompile Include="src\disasm.cpp">
<Filter>debugger</Filter>
</ClCompile>
<ClCompile Include="src\cpu_regs.cpp">
<Filter>debugger</Filter>
</ClCompile>
<ClCompile Include="src\bootmanager.cpp" />
<ClCompile Include="src\callstack.cpp">
<Filter>debugger</Filter>
</ClCompile>
<ClCompile Include="src\ramview.cpp">
<Filter>debugger</Filter>
</ClCompile>
<ClCompile Include="..\..\externals\qhexedit\commands.cpp">
<Filter>qhexedit</Filter>
</ClCompile>
<ClCompile Include="..\..\externals\qhexedit\qhexedit.cpp">
<Filter>qhexedit</Filter>
</ClCompile>
<ClCompile Include="..\..\externals\qhexedit\qhexedit_p.cpp">
<Filter>qhexedit</Filter>
</ClCompile>
<ClCompile Include="..\..\externals\qhexedit\xbytearray.cpp">
<Filter>qhexedit</Filter>
</ClCompile>
<ClCompile Include="src\hotkeys.cpp" />
<ClCompile Include="src\config\controller_config.cpp">
<Filter>config</Filter>
</ClCompile>
<ClCompile Include="src\config\controller_config_util.cpp">
<Filter>config</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<MOC Include="src\main.hxx" />
<MOC Include="src\cpu_regs.hxx">
<Filter>debugger</Filter>
</MOC>
<MOC Include="src\callstack.hxx">
<Filter>debugger</Filter>
</MOC>
<MOC Include="..\..\externals\qhexedit\commands.h">
<Filter>qhexedit</Filter>
</MOC>
<MOC Include="..\..\externals\qhexedit\xbytearray.h">
<Filter>qhexedit</Filter>
</MOC>
<MOC Include="..\..\externals\qhexedit\qhexedit_p.h">
<Filter>qhexedit</Filter>
</MOC>
<MOC Include="..\..\externals\qhexedit\qhexedit.h">
<Filter>qhexedit</Filter>
</MOC>
<MOC Include="src\ramview.hxx">
<Filter>debugger</Filter>
</MOC>
<MOC Include="src\disasm.hxx">
<Filter>debugger</Filter>
</MOC>
<MOC Include="src\bootmanager.hxx" />
<MOC Include="src\hotkeys.hxx" />
<MOC Include="src\config\controller_config.hxx">
<Filter>config</Filter>
</MOC>
<MOC Include="src\config\controller_config_util.hxx">
<Filter>config</Filter>
</MOC>
</ItemGroup>
<ItemGroup>
<UIC Include="src\main.ui" />
<UIC Include="src\cpu_regs.ui">
<Filter>debugger</Filter>
</UIC>
<UIC Include="src\disasm.ui">
<Filter>debugger</Filter>
</UIC>
<UIC Include="src\callstack.ui">
<Filter>debugger</Filter>
</UIC>
<UIC Include="src\hotkeys.ui" />
<UIC Include="src\config\controller_config.ui">
<Filter>config</Filter>
</UIC>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\version.h" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup
Condition="'$(UICBeforeTargets)' == '' and '$(UICAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
<UICBeforeTargets>Midl</UICBeforeTargets>
<UICAfterTargets>CustomBuild</UICAfterTargets>
</PropertyGroup>
<ItemDefinitionGroup>
<UIC>
<QtUicExt>.hpp</QtUicExt>
<QtUicPrefix>ui_</QtUicPrefix>
<CommandLineTemplate>%QTDIR%\bin\uic.exe [inputs] -o "[QtUicPrefix]%(FileName)[QtUicExt]"</CommandLineTemplate>
<Outputs>[QtUicPrefix]%(FileName)[QtUicExt]</Outputs>
<ExecutionDescription>%(FileName).ui</ExecutionDescription>
</UIC>
</ItemDefinitionGroup>
<PropertyGroup
Condition="'$(MOCBeforeTargets)' == '' and '$(MOCAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
<MOCBeforeTargets>Midl</MOCBeforeTargets>
<MOCAfterTargets>CustomBuild</MOCAfterTargets>
</PropertyGroup>
<ItemDefinitionGroup>
<MOC>
<QtShared>true</QtShared>
<QtThread>true</QtThread>
<QtUnicode>true</QtUnicode>
<QtLargeFile>true</QtLargeFile>
<QtKeywords>true</QtKeywords>
<QtNoDebug>true</QtNoDebug>
<QtGuiLib>true</QtGuiLib>
<QtCoreLib>true</QtCoreLib>
<QtOpenGLLib>False</QtOpenGLLib>
<QtMocNoWarnings>False</QtMocNoWarnings>
<QtMocPfx>_moc</QtMocPfx>
<QtMocFilename>%(FileName)%(QtMocPfx)</QtMocFilename>
<CommandLineTemplate>%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 &amp;&amp; cl.exe $(IntDir)%(QtMocFilename).cpp [QtCommandLine] /c /Fo"$(IntDir)%(QtMocFilename).obj"</CommandLineTemplate>
<Outputs>$(IntDir)%(QtMocFilename).obj</Outputs>
<ExecutionDescription>%(FileName).hxx</ExecutionDescription>
<ShowOnlyRuleProperties>true</ShowOnlyRuleProperties>
</MOC>
</ItemDefinitionGroup>
<PropertyGroup
Condition="'$(QRCBeforeTargets)' == '' and '$(QRCAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
<QRCBeforeTargets>Midl</QRCBeforeTargets>
<QRCAfterTargets>CustomBuild</QRCAfterTargets>
</PropertyGroup>
<ItemDefinitionGroup>
<QRC>
<QtQrcPfx>_qrc</QtQrcPfx>
<QtQrcFileName>%(FileName)%(QtQrcPfx)</QtQrcFileName>
<CommandLineTemplate>%QTDIR%\bin\rcc.exe [inputs] -o $(IntDir)%(QtQrcFileName).cpp &amp;&amp; cl.exe $(IntDir)%(QtQrcFileName).cpp /c /Fo"$(IntDir)%(QtQrcFileName)" [QtCommandLine]</CommandLineTemplate>
<Outputs>$(IntDir)%(QtQrcFileName).obj</Outputs>
<ExecutionDescription>%(FileName).qrc</ExecutionDescription>
</QRC>
</ItemDefinitionGroup>
</Project>

View file

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PropertyPageSchema
Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
<AvailableItemName
Include="UIC">
<Targets>_UIC</Targets>
</AvailableItemName>
<AvailableItemName
Include="MOC">
<Targets>_MOC</Targets>
</AvailableItemName>
<AvailableItemName
Include="QRC">
<Targets>_QRC</Targets>
</AvailableItemName>
</ItemGroup>
<UsingTask
TaskName="UIC"
TaskFactory="XamlTaskFactory"
AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask>
<UsingTask
TaskName="MOC"
TaskFactory="XamlTaskFactory"
AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask>
<UsingTask
TaskName="QRC"
TaskFactory="XamlTaskFactory"
AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask>
<Target
Name="_UIC"
BeforeTargets="$(UICBeforeTargets)"
AfterTargets="$(UICAfterTargets)"
Condition="'@(UIC)' != ''"
DependsOnTargets="_SelectedFiles;ComputeUICOutput"
Outputs="%(UIC.Outputs)"
Inputs="%(UIC.Identity);%(UIC.AdditionalDependencies);$(MSBuildProjectFile)">
<ItemGroup
Condition="'@(SelectedFiles)' != ''">
<UIC
Remove="@(UIC)"
Condition="'%(Identity)' != '@(SelectedFiles)'" />
</ItemGroup>
<ItemGroup>
<UIC_tlog
Include="%(UIC.Outputs)"
Condition="'%(UIC.Outputs)' != '' and '%(UIC.ExcludedFromBuild)' != 'true'">
<Source>@(UIC, '|')</Source>
</UIC_tlog>
</ItemGroup>
<Message
Importance="High"
Text="%(UIC.ExecutionDescription)" />
<WriteLinesToFile
File="$(IntDir)$(ProjectName).write.1.tlog"
Lines="^%(UIC_tlog.Source);@(UIC_tlog-&gt;'%(Fullpath)')" />
<UIC
Condition="'%(UIC.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(UIC.CommandLineTemplate)"
QtUicExt="%(UIC.QtUicExt)"
QtUicPrefix="%(UIC.QtUicPrefix)"
AdditionalOptions="%(UIC.AdditionalOptions)"
Inputs="%(UIC.Identity)" />
</Target>
<PropertyGroup>
<ComputeLinkInputsTargets>
$(ComputeLinkInputsTargets);
ComputeUICOutput;
</ComputeLinkInputsTargets>
<ComputeLibInputsTargets>
$(ComputeLibInputsTargets);
ComputeUICOutput;
</ComputeLibInputsTargets>
</PropertyGroup>
<Target
Name="ComputeUICOutput"
Condition="'@(UIC)' != ''">
<ItemGroup>
<UICDirsToMake
Condition="'@(UIC)' != ''"
Include="%(UIC.Outputs)" />
<Link
Include="%(UICDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<Lib
Include="%(UICDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<ImpLib
Include="%(UICDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
</ItemGroup>
<MakeDir
Directories="@(UICDirsToMake-&gt;'%(RootDir)%(Directory)')" />
</Target>
<Target
Name="_MOC"
BeforeTargets="$(MOCBeforeTargets)"
AfterTargets="$(MOCAfterTargets)"
Condition="'@(MOC)' != ''"
DependsOnTargets="_SelectedFiles;ComputeMOCOutput"
Outputs="%(MOC.Outputs)"
Inputs="%(MOC.Identity);%(MOC.AdditionalDependencies);$(MSBuildProjectFile)">
<ItemGroup
Condition="'@(SelectedFiles)' != ''">
<MOC
Remove="@(MOC)"
Condition="'%(Identity)' != '@(SelectedFiles)'" />
</ItemGroup>
<ItemGroup>
<MOC_tlog
Include="%(MOC.Outputs)"
Condition="'%(MOC.Outputs)' != '' and '%(MOC.ExcludedFromBuild)' != 'true'">
<Source>@(MOC, '|')</Source>
</MOC_tlog>
</ItemGroup>
<Message
Importance="High"
Text="%(MOC.ExecutionDescription)" />
<WriteLinesToFile
File="$(IntDir)$(ProjectName).write.1.tlog"
Lines="^%(MOC_tlog.Source);@(MOC_tlog-&gt;'%(Fullpath)')" />
<MOC
Condition="'%(MOC.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(MOC.CommandLineTemplate)"
QtShared="%(MOC.QtShared)"
QtThread="%(MOC.QtThread)"
QtUnicode="%(MOC.QtUnicode)"
QtLargeFile="%(MOC.QtLargeFile)"
QtKeywords="%(MOC.QtKeywords)"
QtNoDebug="%(MOC.QtNoDebug)"
QtGuiLib="%(MOC.QtGuiLib)"
QtCoreLib="%(MOC.QtCoreLib)"
QtOpenGLLib="%(MOC.QtOpenGLLib)"
QtMocNoWarnings="%(MOC.QtMocNoWarnings)"
QtMocPfx="%(MOC.QtMocPfx)"
QtCommandLine="%(MOC.QtCommandLine)"
AdditionalOptions="%(MOC.AdditionalOptions)"
Inputs="%(MOC.Identity)" />
</Target>
<PropertyGroup>
<ComputeLinkInputsTargets>
$(ComputeLinkInputsTargets);
ComputeMOCOutput;
</ComputeLinkInputsTargets>
<ComputeLibInputsTargets>
$(ComputeLibInputsTargets);
ComputeMOCOutput;
</ComputeLibInputsTargets>
</PropertyGroup>
<Target
Name="ComputeMOCOutput"
Condition="'@(MOC)' != ''">
<ItemGroup>
<MOCDirsToMake
Condition="'@(MOC)' != ''"
Include="%(MOC.Outputs)" />
<Link
Include="%(MOCDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<Lib
Include="%(MOCDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<ImpLib
Include="%(MOCDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
</ItemGroup>
<MakeDir
Directories="@(MOCDirsToMake-&gt;'%(RootDir)%(Directory)')" />
</Target>
<Target
Name="_QRC"
BeforeTargets="$(QRCBeforeTargets)"
AfterTargets="$(QRCAfterTargets)"
Condition="'@(QRC)' != ''"
DependsOnTargets="_SelectedFiles;ComputeQRCOutput"
Outputs="%(QRC.Outputs)"
Inputs="%(QRC.Identity);%(QRC.AdditionalDependencies);$(MSBuildProjectFile)">
<ItemGroup
Condition="'@(SelectedFiles)' != ''">
<QRC
Remove="@(QRC)"
Condition="'%(Identity)' != '@(SelectedFiles)'" />
</ItemGroup>
<ItemGroup>
<QRC_tlog
Include="%(QRC.Outputs)"
Condition="'%(QRC.Outputs)' != '' and '%(QRC.ExcludedFromBuild)' != 'true'">
<Source>@(QRC, '|')</Source>
</QRC_tlog>
</ItemGroup>
<Message
Importance="High"
Text="%(QRC.ExecutionDescription)" />
<WriteLinesToFile
File="$(IntDir)$(ProjectName).write.1.tlog"
Lines="^%(QRC_tlog.Source);@(QRC_tlog-&gt;'%(Fullpath)')" />
<QRC
Condition="'%(QRC.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(QRC.CommandLineTemplate)"
QtCommandLine="%(QRC.QtCommandLine)"
QtQrcPfx="%(QRC.QtQrcPfx)"
AdditionalOptions="%(QRC.AdditionalOptions)"
Inputs="%(QRC.Identity)" />
</Target>
<PropertyGroup>
<ComputeLinkInputsTargets>
$(ComputeLinkInputsTargets);
ComputeQRCOutput;
</ComputeLinkInputsTargets>
<ComputeLibInputsTargets>
$(ComputeLibInputsTargets);
ComputeQRCOutput;
</ComputeLibInputsTargets>
</PropertyGroup>
<Target
Name="ComputeQRCOutput"
Condition="'@(QRC)' != ''">
<ItemGroup>
<QRCDirsToMake
Condition="'@(QRC)' != ''"
Include="%(QRC.Outputs)" />
<Link
Include="%(QRCDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<Lib
Include="%(QRCDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<ImpLib
Include="%(QRCDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
</ItemGroup>
<MakeDir
Directories="@(QRCDirsToMake-&gt;'%(RootDir)%(Directory)')" />
</Target>
</Project>

486
src/citra_qt/qt-build.xml Normal file
View file

@ -0,0 +1,486 @@
<?xml version="1.0" encoding="utf-8"?>
<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:transformCallback="Microsoft.Cpp.Dev10.ConvertPropertyCallback" xmlns:impl="clr-namespace:Microsoft.VisualStudio.Project.Contracts.Implementation;assembly=Microsoft.VisualStudio.Project.Contracts.Implementation">
<Rule
Name="UIC"
PageTemplate="tool"
DisplayName="Qt UI Compiler"
Order="200">
<Rule.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="UIC" />
</Rule.DataSource>
<Rule.Categories>
<Category
Name="General">
<Category.DisplayName>
<sys:String>General</sys:String>
</Category.DisplayName>
</Category>
<Category
Name="Command Line"
Subtype="CommandLine">
<Category.DisplayName>
<sys:String>Command Line</sys:String>
</Category.DisplayName>
</Category>
</Rule.Categories>
<StringListProperty
Name="Inputs"
Category="Command Line"
IsRequired="true"
Switch=" ">
<StringListProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="UIC"
SourceType="Item" />
</StringListProperty.DataSource>
</StringListProperty>
<StringProperty
Name="QtUicExt"
Subcategory="Output"
HelpContext="0"
HelpUrl="http://code.google.com/p/xr-qt-msvc/"
DisplayName="UI Header file extension"
Description="The header file extension generated by the UIC Compiler. (Example: .h)"
Switch="[value]" />
<StringProperty
Name="QtUicPrefix"
Subcategory="Output"
HelpContext="0"
HelpUrl="http://code.google.com/p/xr-qt-msvc/"
DisplayName="UI Header file prefix"
Description="The prefix string to be used for UIC output. ( usually ui_ )"
Switch="[value]" />
<StringProperty
Name="CommandLineTemplate"
DisplayName="Command Line"
Visible="False"
IncludeInCommandLine="False" />
<DynamicEnumProperty
Name="UICBeforeTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute Before</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run before.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^UICBeforeTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<DynamicEnumProperty
Name="UICAfterTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute After</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run after.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^UICAfterTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType=""
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<StringListProperty
Name="Outputs"
DisplayName="Outputs"
Visible="False"
IncludeInCommandLine="False" />
<StringProperty
Name="ExecutionDescription"
DisplayName="Execution Description"
Visible="False"
IncludeInCommandLine="False" />
<StringListProperty
Name="AdditionalDependencies"
DisplayName="Additional Dependencies"
IncludeInCommandLine="False"
Visible="false" />
<StringProperty
Subtype="AdditionalOptions"
Name="AdditionalOptions"
Category="Command Line">
<StringProperty.DisplayName>
<sys:String>Additional Options</sys:String>
</StringProperty.DisplayName>
<StringProperty.Description>
<sys:String>Additional Options</sys:String>
</StringProperty.Description>
</StringProperty>
</Rule>
<ItemType
Name="UIC"
DisplayName="Qt UI Compiler" />
<FileExtension
Name="*.ui"
ContentType="UIC" />
<ContentType
Name="UIC"
DisplayName="Qt UI Compiler"
ItemType="UIC" />
<Rule
Name="MOC"
PageTemplate="tool"
DisplayName="Qt Meta Object Compiler"
Order="200">
<Rule.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="MOC" />
</Rule.DataSource>
<Rule.Categories>
<Category
Name="General">
<Category.DisplayName>
<sys:String>General</sys:String>
</Category.DisplayName>
</Category>
<Category
Name="Command Line"
Subtype="CommandLine">
<Category.DisplayName>
<sys:String>Command Line</sys:String>
</Category.DisplayName>
</Category>
</Rule.Categories>
<StringListProperty
Name="Inputs"
Category="Command Line"
IsRequired="true"
Switch=" ">
<StringListProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="MOC"
SourceType="Item" />
</StringListProperty.DataSource>
</StringListProperty>
<BoolProperty
Name="QtShared"
Subcategory="Moc Definitions"
HelpContext="0"
DisplayName="Use QT as a Shared Library?"
Description="Use QT as a Shared Library?"
Switch="-DQT_SHARED" />
<BoolProperty
Name="QtThread"
Subcategory="Moc Definitions"
HelpContext="0"
DisplayName="Multi-threaded Support?"
Switch="-DQT_THREAD_SUPPORT" />
<BoolProperty
Name="QtUnicode"
Subcategory="Moc Definitions"
HelpContext="0"
DisplayName="Unicode Support?"
Switch="-DUNICODE" />
<BoolProperty
Name="QtLargeFile"
Subcategory="Moc Definitions"
HelpContext="0"
DisplayName="Large File Support?"
Switch="-DQT_LARGEFILE_SUPPORT" />
<BoolProperty
Name="QtKeywords"
Subcategory="Moc Definitions"
HelpContext="0"
DisplayName="Disable QT Keywords."
Description="If QT_NO_KEYWORDS is defined, &quot;signals&quot;, &quot;slots&quot; and &quot;emit&quot; are not defined, thus increasing the interoperability with other toolkits by avoiding some common name clashes. However, the SIGNAL() and SLOT() macros are still defined, which may cause name clashes still."
Switch="-DQT_NO_KEYWORDS" />
<BoolProperty
Name="QtNoDebug"
Subcategory="Moc Definitions"
HelpContext="0"
DisplayName="Disable QT Debuging"
Switch="-DQT_NO_DEBUG" />
<BoolProperty
Name="QtGuiLib"
Subcategory="QT Libraries"
HelpContext="0"
DisplayName="Use QT Gui Library"
Switch="-DQT_GUI_LIB" />
<BoolProperty
Name="QtCoreLib"
Subcategory="QT Libraries"
HelpContext="0"
DisplayName="Use QT Core Library"
Switch="-DQT_CORE_LIB" />
<BoolProperty
Name="QtOpenGLLib"
Subcategory="QT Libraries"
HelpContext="0"
DisplayName="Use QT OpenGL Library"
Switch="-DQT_OPENGL_LIB" />
<BoolProperty
Name="QtMocNoWarnings"
Subcategory="General"
HelpContext="0"
DisplayName="Do not display warnings"
Description="do not display warnings"
Switch="/nw" />
<StringProperty
Name="QtMocPfx"
Subcategory="Output"
HelpContext="0"
HelpUrl="http://code.google.com/p/xr-qt-msvc/"
DisplayName="Output file postfix"
Description="A postfix is added to the source and object files generated to prevent conflict with your source files. [Example: _moc leads to a.hxx -&gt; a_moc.cpp]"
Switch="[value]" />
<StringProperty
Name="QtCommandLine"
Subcategory="General"
HelpContext="0"
HelpUrl="http://code.google.com/p/xr-qt-msvc/"
DisplayName="C++ Command Line Options"
Description="Copy the command line options from your C/C++ section to match the qt compilation with your setup. Make sure you remove the /Fo option, for more details refer to the documentation."
Switch="[value]" />
<StringProperty
Name="CommandLineTemplate"
DisplayName="Command Line"
Visible="False"
IncludeInCommandLine="False" />
<DynamicEnumProperty
Name="MOCBeforeTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute Before</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run before.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^MOCBeforeTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<DynamicEnumProperty
Name="MOCAfterTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute After</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run after.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^MOCAfterTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType=""
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<StringListProperty
Name="Outputs"
DisplayName="Outputs"
Visible="False"
IncludeInCommandLine="False" />
<StringProperty
Name="ExecutionDescription"
DisplayName="Execution Description"
Visible="False"
IncludeInCommandLine="False" />
<StringListProperty
Name="AdditionalDependencies"
DisplayName="Additional Dependencies"
IncludeInCommandLine="False"
Visible="false" />
<StringProperty
Subtype="AdditionalOptions"
Name="AdditionalOptions"
Category="Command Line">
<StringProperty.DisplayName>
<sys:String>Additional Options</sys:String>
</StringProperty.DisplayName>
<StringProperty.Description>
<sys:String>Additional Options</sys:String>
</StringProperty.Description>
</StringProperty>
</Rule>
<ItemType
Name="MOC"
DisplayName="Qt Meta Object Compiler" />
<FileExtension
Name="*.hxx"
ContentType="MOC" />
<ContentType
Name="MOC"
DisplayName="Qt Meta Object Compiler"
ItemType="MOC" />
<Rule
Name="QRC"
PageTemplate="tool"
DisplayName="Qt Resource Compiler"
Order="200">
<Rule.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="QRC" />
</Rule.DataSource>
<Rule.Categories>
<Category
Name="General">
<Category.DisplayName>
<sys:String>General</sys:String>
</Category.DisplayName>
</Category>
<Category
Name="Command Line"
Subtype="CommandLine">
<Category.DisplayName>
<sys:String>Command Line</sys:String>
</Category.DisplayName>
</Category>
</Rule.Categories>
<StringListProperty
Name="Inputs"
Category="Command Line"
IsRequired="true"
Switch=" ">
<StringListProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType="QRC"
SourceType="Item" />
</StringListProperty.DataSource>
</StringListProperty>
<StringProperty
Name="QtCommandLine"
Subcategory="General"
HelpContext="0"
HelpUrl="http://code.google.com/p/xr-core/wiki/QtRules"
DisplayName="C++ Command Line Options"
Description="Copy the command line options from your C/C++ section to match the qt compilation with your setup. Make sure you remove the /Fo option, for more details refer to the documentation."
Switch="[value]" />
<StringProperty
Name="QtQrcPfx"
Subcategory="Output"
HelpContext="0"
HelpUrl="http://code.google.com/p/xr-qt-msvc/"
DisplayName="Output file postfix"
Description="A postfix is added to the source and object files generated to prevent conflict with your source files. [Example: _qrc leads to a.qrc -&gt; a_qrc.cpp]"
Switch="[value]" />
<StringProperty
Name="CommandLineTemplate"
DisplayName="Command Line"
Visible="False"
IncludeInCommandLine="False" />
<DynamicEnumProperty
Name="QRCBeforeTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute Before</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run before.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^QRCBeforeTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<DynamicEnumProperty
Name="QRCAfterTargets"
Category="General"
EnumProvider="Targets"
IncludeInCommandLine="False">
<DynamicEnumProperty.DisplayName>
<sys:String>Execute After</sys:String>
</DynamicEnumProperty.DisplayName>
<DynamicEnumProperty.Description>
<sys:String>Specifies the targets for the build customization to run after.</sys:String>
</DynamicEnumProperty.Description>
<DynamicEnumProperty.ProviderSettings>
<NameValuePair
Name="Exclude"
Value="^QRCAfterTargets|^Compute" />
</DynamicEnumProperty.ProviderSettings>
<DynamicEnumProperty.DataSource>
<DataSource
Persistence="ProjectFile"
ItemType=""
HasConfigurationCondition="true" />
</DynamicEnumProperty.DataSource>
</DynamicEnumProperty>
<StringListProperty
Name="Outputs"
DisplayName="Outputs"
Visible="False"
IncludeInCommandLine="False" />
<StringProperty
Name="ExecutionDescription"
DisplayName="Execution Description"
Visible="False"
IncludeInCommandLine="False" />
<StringListProperty
Name="AdditionalDependencies"
DisplayName="Additional Dependencies"
IncludeInCommandLine="False"
Visible="false" />
<StringProperty
Subtype="AdditionalOptions"
Name="AdditionalOptions"
Category="Command Line">
<StringProperty.DisplayName>
<sys:String>Additional Options</sys:String>
</StringProperty.DisplayName>
<StringProperty.Description>
<sys:String>Additional Options</sys:String>
</StringProperty.Description>
</StringProperty>
</Rule>
<ItemType
Name="QRC"
DisplayName="Qt Resource Compiler" />
<FileExtension
Name="*.qrc"
ContentType="QRC" />
<ContentType
Name="QRC"
DisplayName="Qt Resource Compiler"
ItemType="QRC" />
</ProjectSchemaDefinitions>

View file

@ -0,0 +1,246 @@
#include <QHBoxLayout>
#include <QKeyEvent>
#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);
*/
}

View file

@ -0,0 +1,104 @@
#include <QThread>
#include <QGLWidget>
#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;
};

View file

@ -0,0 +1,36 @@
#include <QStandardItemModel>
#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)));
}
*/
}

View file

@ -0,0 +1,20 @@
#include <QDockWidget>
#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;
};

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CallStack</class>
<widget class="QDockWidget" name="CallStack">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Call stack</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTreeView" name="treeView">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,91 @@
#include <QDialogButtonBox>
#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));
}
}
}
*/

View file

@ -0,0 +1,52 @@
#ifndef _CONTROLLER_CONFIG_HXX_
#define _CONTROLLER_CONFIG_HXX_
#include <QDialog>
#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_

View file

@ -0,0 +1,308 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ControllerConfig</class>
<widget class="QWidget" name="ControllerConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>503</width>
<height>293</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Controller Configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QComboBox" name="activeControllerCB">
<item>
<property name="text">
<string>Controller 1</string>
</property>
</item>
<item>
<property name="text">
<string>Controller 2</string>
</property>
</item>
<item>
<property name="text">
<string>Controller 3</string>
</property>
</item>
<item>
<property name="text">
<string>Controller 4</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>Enabled</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="inputSourceCB">
<item>
<property name="text">
<string>Keyboard</string>
</property>
</item>
<item>
<property name="text">
<string>Joypad</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Active Controller:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Input Source:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="mainStickTab">
<attribute name="title">
<string>Main Stick</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="4">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="cStickTab">
<attribute name="title">
<string>C-Stick</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="dPadTab">
<attribute name="title">
<string>D-Pad</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="2">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="buttonsTab">
<attribute name="title">
<string>Buttons</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2"/>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
<slots>
<signal>ControlsChanged()</signal>
<signal>MainStickCleared()</signal>
<signal>CStickCleared()</signal>
<signal>DPadCleared()</signal>
<signal>ButtonsCleared()</signal>
<slot>OnControlsChanged()</slot>
<slot>OnMainStickCleared()</slot>
<slot>OnCStickCleared()</slot>
<slot>OnDPadCleared()</slot>
<slot>OnButtonsCleared()</slot>
</slots>
</ui>

View file

@ -0,0 +1,121 @@
#include <QPushButton>
#include <QStyle>
#include <QGridLayout>
#include <QKeyEvent>
#include <QHBoxLayout>
#include <QLabel>
#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);
}
*/

View file

@ -0,0 +1,78 @@
#ifndef _CONTROLLER_CONFIG_UTIL_HXX_
#define _CONTROLLER_CONFIG_UTIL_HXX_
#include <QWidget>
#include <QPushButton>
/* 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_

View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QCheckBox>
#include <QtGui/QComboBox>
#include <QtGui/QGridLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QSpacerItem>
#include <QtGui/QTabWidget>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
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

View file

@ -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));
}

View file

@ -0,0 +1,27 @@
#include "ui_cpu_regs.h"
#include <QDockWidget>
#include <QTreeWidgetItem>
//#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;
};

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ARMRegisters</class>
<widget class="QDockWidget" name="ARMRegisters">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>ARM registers</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTreeWidget" name="treeWidget">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<column>
<property name="text">
<string>Register</string>
</property>
</column>
<column>
<property name="text">
<string>Value</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

144
src/citra_qt/src/disasm.cpp Normal file
View file

@ -0,0 +1,144 @@
#include <QtGui>
#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();
}

View file

@ -0,0 +1,38 @@
#include <QDockWidget>
#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;
};

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DockWidget</class>
<widget class="QDockWidget" name="DockWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>430</width>
<height>401</height>
</rect>
</property>
<property name="windowTitle">
<string>Disassembly</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="button_step">
<property name="text">
<string>Step</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_pause">
<property name="text">
<string>Pause</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_continue">
<property name="text">
<string>Continue</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Step Into</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_breakpoint">
<property name="text">
<string>Set Breakpoint</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTreeView" name="treeView">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="indentation">
<number>20</number>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,111 @@
#include <QKeySequence>
#include <QSettings>
#include "hotkeys.hxx"
#include <map>
struct Hotkey
{
Hotkey() : shortcut(NULL), context(Qt::WindowShortcut) {}
QKeySequence keyseq;
QShortcut* shortcut;
Qt::ShortcutContext context;
};
typedef std::map<QString, Hotkey> HotkeyMap;
typedef std::map<QString, HotkeyMap> 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<QString>::iterator group = groups.begin(); group != groups.end(); ++group)
{
settings.beginGroup(*group);
QStringList hotkeys = settings.childGroups();
for (QList<QString>::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);
}

View file

@ -0,0 +1,50 @@
#include <QShortcut>
#include <QDialog>
#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;
};

View file

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>hotkeys</class>
<widget class="QDialog" name="hotkeys">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>363</width>
<height>388</height>
</rect>
</property>
<property name="windowTitle">
<string>Hotkey Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTreeWidget" name="treeWidget">
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectItems</enum>
</property>
<property name="headerHidden">
<bool>false</bool>
</property>
<column>
<property name="text">
<string>Action</string>
</property>
</column>
<column>
<property name="text">
<string>Hotkey</string>
</property>
</column>
<column>
<property name="text">
<string>Context</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>hotkeys</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>hotkeys</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

191
src/citra_qt/src/main.cpp Normal file
View file

@ -0,0 +1,191 @@
#include <QtGui>
#include <QDesktopWidget>
#include <QFileDialog>
#include "qhexedit.h"
#include "main.hxx"
#include "common.h"
#include "platform.h"
#if EMU_PLATFORM == PLATFORM_LINUX
#include <unistd.h>
#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();
}

47
src/citra_qt/src/main.hxx Normal file
View file

@ -0,0 +1,47 @@
#ifndef _CITRA_QT_MAIN_HXX_
#define _CITRA_QT_MAIN_HXX_
#include <QMainWindow>
#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_

171
src/citra_qt/src/main.ui Normal file
View file

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1081</width>
<height>730</height>
</rect>
</property>
<property name="windowTitle">
<string>Citra</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>src/pcafe/res/icon3_64x64.ico</normaloff>src/pcafe/res/icon3_64x64.ico</iconset>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<property name="dockNestingEnabled">
<bool>true</bool>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QHBoxLayout" name="horizontalLayout"/>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1081</width>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
<property name="title">
<string>&amp;File</string>
</property>
<addaction name="action_load_elf"/>
<addaction name="separator"/>
<addaction name="action_Exit"/>
</widget>
<widget class="QMenu" name="menu_Emulation">
<property name="title">
<string>&amp;Emulation</string>
</property>
<addaction name="action_Start"/>
<addaction name="action_Pause"/>
<addaction name="action_Stop"/>
<addaction name="separator"/>
<addaction name="action_Configure"/>
</widget>
<widget class="QMenu" name="menu_View">
<property name="title">
<string>&amp;View</string>
</property>
<addaction name="action_Single_Window_Mode"/>
<addaction name="action_Hotkeys"/>
</widget>
<widget class="QMenu" name="menu_Help">
<property name="title">
<string>&amp;Help</string>
</property>
<addaction name="action_About"/>
</widget>
<addaction name="menu_File"/>
<addaction name="menu_Emulation"/>
<addaction name="menu_View"/>
<addaction name="menu_Help"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="action_load_elf">
<property name="text">
<string>Load ELF ...</string>
</property>
</action>
<action name="action_Exit">
<property name="text">
<string>E&amp;xit</string>
</property>
</action>
<action name="action_Start">
<property name="text">
<string>&amp;Start</string>
</property>
</action>
<action name="action_Stop">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>&amp;Stop</string>
</property>
</action>
<action name="action_Pause">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>&amp;Pause</string>
</property>
<property name="visible">
<bool>false</bool>
</property>
</action>
<action name="action_About">
<property name="text">
<string>About Citra</string>
</property>
</action>
<action name="action_Single_Window_Mode">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Single Window Mode</string>
</property>
</action>
<action name="action_Hotkeys">
<property name="text">
<string>Configure &amp;Hotkeys ...</string>
</property>
</action>
<action name="action_Configure">
<property name="text">
<string>Configure ...</string>
</property>
</action>
</widget>
<resources/>
<connections>
<connection>
<sender>action_Exit</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>367</x>
<y>314</y>
</hint>
</hints>
</connection>
<connection>
<sender>action_Configure</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>OnConfigure()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>540</x>
<y>364</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>OnConfigure()</slot>
</slots>
</ui>

View file

@ -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));
}

View file

@ -0,0 +1,12 @@
#include "qhexedit.h"
class GRamView : public QHexEdit
{
Q_OBJECT
public:
GRamView(QWidget* parent = NULL);
public slots:
void OnCPUStepped();
};

View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDockWidget>
#include <QtGui/QHeaderView>
#include <QtGui/QTreeView>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
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

View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDockWidget>
#include <QtGui/QHeaderView>
#include <QtGui/QTreeWidget>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
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

View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDockWidget>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QPushButton>
#include <QtGui/QTreeView>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
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

View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QCheckBox>
#include <QtGui/QComboBox>
#include <QtGui/QDockWidget>
#include <QtGui/QGroupBox>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QRadioButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QSpinBox>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
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

View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QHeaderView>
#include <QtGui/QTreeWidget>
#include <QtGui/QVBoxLayout>
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

View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDockWidget>
#include <QtGui/QFormLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QPlainTextEdit>
#include <QtGui/QWidget>
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

149
src/citra_qt/src/ui_main.h Normal file
View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QStatusBar>
#include <QtGui/QWidget>
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

View file

@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLineEdit>
#include <QtGui/QPushButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWizard>
#include <QtGui/QWizardPage>
#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

View file

@ -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_

35
vsprops/qt.props Normal file
View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<QtIncludeDir>$(QTDIR)\include\</QtIncludeDir>
<QtLibraryDir>$(QTDIR)\lib\</QtLibraryDir>
</PropertyGroup>
<PropertyGroup>
<IncludePath>$(QtIncludeDir);$(QtIncludeDir)QtGui;$(QtIncludeDir)QtCore;$(QtIncludeDir)Qt;$(QtIncludeDir)QtOpenGL;$(QtIncludeDir)QtANGLE;$(QtIncludeDir)QtWidgets;$(IncludePath)</IncludePath>
<LibraryPath>$(QtLibraryDir);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<UIC />
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<UIC>
<QtUicPrefix>src/ui_</QtUicPrefix>
<QtUicExt>.h</QtUicExt>
</UIC>
<MOC>
<QtCommandLine>/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"</QtCommandLine>
<QtKeywords>false</QtKeywords>
</MOC>
<Link />
<ClCompile />
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="QtIncludeDir">
<Value>$(QtIncludeDir)</Value>
</BuildMacro>
<BuildMacro Include="QtLibraryDir">
<Value>$(QtLibraryDir)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>QtCored4.lib;QtGuid4.lib;QtOpenGLd4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<MOC>
<QtNoDebug>false</QtNoDebug>
<QtCommandLine>/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"</QtCommandLine>
</MOC>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>QtCore4.lib;QtGui4.lib;QtOpenGL4.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>