summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Mathieu Vaillancourt2014-03-31 22:26:50 -0400
committerGravatar Mathieu Vaillancourt2014-03-31 22:32:03 -0400
commit05be8d2f0c58f5de56bbf920743f91bd8584b4f2 (patch)
treec82d5c690c7fa9e252adf0c24616aa042535d517 /src
parentadded very hackish ARMulator core initialization and CPU stepping (diff)
downloadyuzu-05be8d2f0c58f5de56bbf920743f91bd8584b4f2.tar.gz
yuzu-05be8d2f0c58f5de56bbf920743f91bd8584b4f2.tar.xz
yuzu-05be8d2f0c58f5de56bbf920743f91bd8584b4f2.zip
Basic QT window
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/CMakeLists.txt38
-rw-r--r--src/citra_qt/citra_qt.vcxproj180
-rw-r--r--src/citra_qt/citra_qt.vcxproj.filters103
-rw-r--r--src/citra_qt/qt-build.props56
-rw-r--r--src/citra_qt/qt-build.targets242
-rw-r--r--src/citra_qt/qt-build.xml486
-rw-r--r--src/citra_qt/src/bootmanager.cpp246
-rw-r--r--src/citra_qt/src/bootmanager.hxx104
-rw-r--r--src/citra_qt/src/callstack.cpp36
-rw-r--r--src/citra_qt/src/callstack.hxx20
-rw-r--r--src/citra_qt/src/callstack.ui36
-rw-r--r--src/citra_qt/src/config/controller_config.cpp91
-rw-r--r--src/citra_qt/src/config/controller_config.hxx52
-rw-r--r--src/citra_qt/src/config/controller_config.ui308
-rw-r--r--src/citra_qt/src/config/controller_config_util.cpp121
-rw-r--r--src/citra_qt/src/config/controller_config_util.hxx78
-rw-r--r--src/citra_qt/src/config/ui_controller_config.h222
-rw-r--r--src/citra_qt/src/cpu_regs.cpp64
-rw-r--r--src/citra_qt/src/cpu_regs.hxx27
-rw-r--r--src/citra_qt/src/cpu_regs.ui40
-rw-r--r--src/citra_qt/src/disasm.cpp144
-rw-r--r--src/citra_qt/src/disasm.hxx38
-rw-r--r--src/citra_qt/src/disasm.ui78
-rw-r--r--src/citra_qt/src/hotkeys.cpp111
-rw-r--r--src/citra_qt/src/hotkeys.hxx50
-rw-r--r--src/citra_qt/src/hotkeys.ui89
-rw-r--r--src/citra_qt/src/main.cpp191
-rw-r--r--src/citra_qt/src/main.hxx47
-rw-r--r--src/citra_qt/src/main.ui171
-rw-r--r--src/citra_qt/src/ramview.cpp13
-rw-r--r--src/citra_qt/src/ramview.hxx12
-rw-r--r--src/citra_qt/src/ui_callstack.h68
-rw-r--r--src/citra_qt/src/ui_cpu_regs.h69
-rw-r--r--src/citra_qt/src/ui_disasm.h112
-rw-r--r--src/citra_qt/src/ui_gfx_fifo_player.h209
-rw-r--r--src/citra_qt/src/ui_hotkeys.h77
-rw-r--r--src/citra_qt/src/ui_image_info.h154
-rw-r--r--src/citra_qt/src/ui_main.h149
-rw-r--r--src/citra_qt/src/ui_welcome_wizard.h124
-rw-r--r--src/citra_qt/src/version.h7
40 files changed, 4463 insertions, 0 deletions
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt
new file mode 100644
index 000000000..facb99e90
--- /dev/null
+++ b/src/citra_qt/CMakeLists.txt
@@ -0,0 +1,38 @@
1set(SRCS
2 src/bootmanager.cpp
3 src/callstack.cpp
4 src/disasm.cpp
5 src/cpu_regs.cpp
6 src/hotkeys.cpp
7 src/main.cpp
8 src/ramview.cpp
9 src/config/controller_config.cpp
10 src/config/controller_config_util.cpp)
11
12qt4_wrap_ui(UI_HDRS
13 src/callstack.ui
14 src/disasm.ui
15 src/cpu_regs.ui
16 src/hotkeys.ui
17 src/main.ui
18 src/config/controller_config.ui)
19
20qt4_wrap_cpp(MOC_SRCS
21 src/bootmanager.hxx
22 src/callstack.hxx
23 src/disasm.hxx
24 src/cpu_regs.hxx
25 src/hotkeys.hxx
26 src/main.hxx
27 src/ramview.hxx
28 src/config/controller_config.hxx
29 src/config/controller_config_util.hxx)
30
31# add uic results to include directories
32include_directories(${CMAKE_CURRENT_BINARY_DIR})
33include_directories(./src/)
34
35add_executable(citra-qt ${SRCS} ${MOC_SRCS} ${UI_HDRS})
36target_link_libraries(citra-qt core common qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES})
37
38#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir})
diff --git a/src/citra_qt/citra_qt.vcxproj b/src/citra_qt/citra_qt.vcxproj
new file mode 100644
index 000000000..9164b280b
--- /dev/null
+++ b/src/citra_qt/citra_qt.vcxproj
@@ -0,0 +1,180 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup Label="ProjectConfigurations">
4 <ProjectConfiguration Include="Debug|Win32">
5 <Configuration>Debug</Configuration>
6 <Platform>Win32</Platform>
7 </ProjectConfiguration>
8 <ProjectConfiguration Include="Debug|x64">
9 <Configuration>Debug</Configuration>
10 <Platform>x64</Platform>
11 </ProjectConfiguration>
12 <ProjectConfiguration Include="Release|Win32">
13 <Configuration>Release</Configuration>
14 <Platform>Win32</Platform>
15 </ProjectConfiguration>
16 <ProjectConfiguration Include="Release|x64">
17 <Configuration>Release</Configuration>
18 <Platform>x64</Platform>
19 </ProjectConfiguration>
20 </ItemGroup>
21 <PropertyGroup Label="Globals">
22 <ProjectGuid>{A587F714-490F-407A-9E36-7AB7FA0D7BAB}</ProjectGuid>
23 <RootNamespace>citra_qt</RootNamespace>
24 </PropertyGroup>
25 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
26 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
27 <ConfigurationType>Application</ConfigurationType>
28 <UseDebugLibraries>true</UseDebugLibraries>
29 <PlatformToolset>v120</PlatformToolset>
30 </PropertyGroup>
31 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
32 <ConfigurationType>Application</ConfigurationType>
33 <UseDebugLibraries>true</UseDebugLibraries>
34 <PlatformToolset>v120</PlatformToolset>
35 </PropertyGroup>
36 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
37 <ConfigurationType>Application</ConfigurationType>
38 <UseDebugLibraries>false</UseDebugLibraries>
39 <PlatformToolset>v120</PlatformToolset>
40 </PropertyGroup>
41 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
42 <ConfigurationType>Application</ConfigurationType>
43 <UseDebugLibraries>false</UseDebugLibraries>
44 <PlatformToolset>v120</PlatformToolset>
45 </PropertyGroup>
46 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
47 <ImportGroup Label="ExtensionSettings">
48 <Import Project="qt-build.props" />
49 </ImportGroup>
50 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
51 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
52 <Import Project="..\..\vsprops\base.props" />
53 <Import Project="..\..\vsprops\externals.props" />
54 <Import Project="..\..\vsprops\qt.props" />
55 <Import Project="..\..\vsprops\qt_libs_debug.props" />
56 <Import Project="..\..\vsprops\code_generation_debug.props" />
57 <Import Project="..\..\vsprops\app.props" />
58 </ImportGroup>
59 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
60 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
61 <Import Project="..\..\vsprops\base.props" />
62 <Import Project="..\..\vsprops\externals.props" />
63 <Import Project="..\..\vsprops\qt.props" />
64 <Import Project="..\..\vsprops\qt_libs_debug.props" />
65 <Import Project="..\..\vsprops\code_generation_debug.props" />
66 <Import Project="..\..\vsprops\app.props" />
67 </ImportGroup>
68 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
69 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70 <Import Project="..\..\vsprops\base.props" />
71 <Import Project="..\..\vsprops\externals.props" />
72 <Import Project="..\..\vsprops\qt.props" />
73 <Import Project="..\..\vsprops\qt_libs_release.props" />
74 <Import Project="..\..\vsprops\code_generation_release.props" />
75 <Import Project="..\..\vsprops\app.props" />
76 </ImportGroup>
77 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
78 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
79 <Import Project="..\..\vsprops\base.props" />
80 <Import Project="..\..\vsprops\externals.props" />
81 <Import Project="..\..\vsprops\qt.props" />
82 <Import Project="..\..\vsprops\qt_libs_release.props" />
83 <Import Project="..\..\vsprops\code_generation_release.props" />
84 <Import Project="..\..\vsprops\app.props" />
85 </ImportGroup>
86 <PropertyGroup Label="UserMacros" />
87 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
88 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
89 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
90 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
91 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
92 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
93 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
94 <ClCompile />
95 <Link>
96 <IgnoreSpecificDefaultLibraries>
97 </IgnoreSpecificDefaultLibraries>
98 </Link>
99 <MOC />
100 <UIC />
101 </ItemDefinitionGroup>
102 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
103 <ClCompile />
104 <Link>
105 <IgnoreSpecificDefaultLibraries>
106 </IgnoreSpecificDefaultLibraries>
107 </Link>
108 <MOC />
109 <UIC />
110 </ItemDefinitionGroup>
111 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
112 <ClCompile />
113 <Link />
114 <UIC />
115 <UIC />
116 <MOC />
117 </ItemDefinitionGroup>
118 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
119 <ClCompile />
120 <Link />
121 <UIC />
122 <UIC />
123 <MOC />
124 </ItemDefinitionGroup>
125 <ItemGroup>
126 <ClCompile Include="..\..\externals\qhexedit\commands.cpp" />
127 <ClCompile Include="..\..\externals\qhexedit\qhexedit.cpp" />
128 <ClCompile Include="..\..\externals\qhexedit\qhexedit_p.cpp" />
129 <ClCompile Include="..\..\externals\qhexedit\xbytearray.cpp" />
130 <ClCompile Include="src\bootmanager.cpp" />
131 <ClCompile Include="src\callstack.cpp" />
132 <ClCompile Include="src\config\controller_config.cpp" />
133 <ClCompile Include="src\config\controller_config_util.cpp" />
134 <ClCompile Include="src\disasm.cpp" />
135 <ClCompile Include="src\cpu_regs.cpp" />
136 <ClCompile Include="src\hotkeys.cpp" />
137 <ClCompile Include="src\main.cpp" />
138 <ClCompile Include="src\ramview.cpp" />
139 </ItemGroup>
140 <ItemGroup>
141 <MOC Include="src\bootmanager.hxx" />
142 <MOC Include="src\callstack.hxx" />
143 <MOC Include="src\config\controller_config.hxx" />
144 <MOC Include="src\config\controller_config_util.hxx" />
145 <MOC Include="src\disasm.hxx" />
146 <MOC Include="src\cpu_regs.hxx" />
147 <MOC Include="src\hotkeys.hxx" />
148 <MOC Include="src\main.hxx" />
149 <MOC Include="src\ramview.hxx" />
150 </ItemGroup>
151 <ItemGroup>
152 <UIC Include="src\callstack.ui" />
153 <UIC Include="src\config\controller_config.ui">
154 <QtUicPrefix>src/config/ui_</QtUicPrefix>
155 </UIC>
156 <UIC Include="src\disasm.ui" />
157 <UIC Include="src\cpu_regs.ui" />
158 <UIC Include="src\hotkeys.ui" />
159 <UIC Include="src\main.ui" />
160 </ItemGroup>
161 <ItemGroup>
162 <MOC Include="..\..\externals\qhexedit\commands.h" />
163 <MOC Include="..\..\externals\qhexedit\qhexedit.h" />
164 <MOC Include="..\..\externals\qhexedit\qhexedit_p.h" />
165 <MOC Include="..\..\externals\qhexedit\xbytearray.h" />
166 <ClInclude Include="src\version.h" />
167 </ItemGroup>
168 <ItemGroup>
169 <ProjectReference Include="..\common\common.vcxproj">
170 <Project>{dfe335fc-755d-4baa-8452-94434f8a1edb}</Project>
171 </ProjectReference>
172 <ProjectReference Include="..\core\core.vcxproj">
173 <Project>{8aea7f29-3466-4786-a10d-6a4bd0610977}</Project>
174 </ProjectReference>
175 </ItemGroup>
176 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
177 <ImportGroup Label="ExtensionTargets">
178 <Import Project="qt-build.targets" />
179 </ImportGroup>
180</Project> \ No newline at end of file
diff --git a/src/citra_qt/citra_qt.vcxproj.filters b/src/citra_qt/citra_qt.vcxproj.filters
new file mode 100644
index 000000000..3900cc8e0
--- /dev/null
+++ b/src/citra_qt/citra_qt.vcxproj.filters
@@ -0,0 +1,103 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup>
4 <Filter Include="debugger">
5 <UniqueIdentifier>{1b8f77c1-61e8-4a9f-95f8-8d1c53015ad8}</UniqueIdentifier>
6 </Filter>
7 <Filter Include="qhexedit">
8 <UniqueIdentifier>{dede739c-939b-4147-9e72-4a326b97d237}</UniqueIdentifier>
9 </Filter>
10 <Filter Include="config">
11 <UniqueIdentifier>{80178741-d3ab-4031-892c-ec58490ea8bf}</UniqueIdentifier>
12 </Filter>
13 </ItemGroup>
14 <ItemGroup>
15 <ClCompile Include="src\main.cpp" />
16 <ClCompile Include="src\disasm.cpp">
17 <Filter>debugger</Filter>
18 </ClCompile>
19 <ClCompile Include="src\cpu_regs.cpp">
20 <Filter>debugger</Filter>
21 </ClCompile>
22 <ClCompile Include="src\bootmanager.cpp" />
23 <ClCompile Include="src\callstack.cpp">
24 <Filter>debugger</Filter>
25 </ClCompile>
26 <ClCompile Include="src\ramview.cpp">
27 <Filter>debugger</Filter>
28 </ClCompile>
29 <ClCompile Include="..\..\externals\qhexedit\commands.cpp">
30 <Filter>qhexedit</Filter>
31 </ClCompile>
32 <ClCompile Include="..\..\externals\qhexedit\qhexedit.cpp">
33 <Filter>qhexedit</Filter>
34 </ClCompile>
35 <ClCompile Include="..\..\externals\qhexedit\qhexedit_p.cpp">
36 <Filter>qhexedit</Filter>
37 </ClCompile>
38 <ClCompile Include="..\..\externals\qhexedit\xbytearray.cpp">
39 <Filter>qhexedit</Filter>
40 </ClCompile>
41 <ClCompile Include="src\hotkeys.cpp" />
42 <ClCompile Include="src\config\controller_config.cpp">
43 <Filter>config</Filter>
44 </ClCompile>
45 <ClCompile Include="src\config\controller_config_util.cpp">
46 <Filter>config</Filter>
47 </ClCompile>
48 </ItemGroup>
49 <ItemGroup>
50 <MOC Include="src\main.hxx" />
51 <MOC Include="src\cpu_regs.hxx">
52 <Filter>debugger</Filter>
53 </MOC>
54 <MOC Include="src\callstack.hxx">
55 <Filter>debugger</Filter>
56 </MOC>
57 <MOC Include="..\..\externals\qhexedit\commands.h">
58 <Filter>qhexedit</Filter>
59 </MOC>
60 <MOC Include="..\..\externals\qhexedit\xbytearray.h">
61 <Filter>qhexedit</Filter>
62 </MOC>
63 <MOC Include="..\..\externals\qhexedit\qhexedit_p.h">
64 <Filter>qhexedit</Filter>
65 </MOC>
66 <MOC Include="..\..\externals\qhexedit\qhexedit.h">
67 <Filter>qhexedit</Filter>
68 </MOC>
69 <MOC Include="src\ramview.hxx">
70 <Filter>debugger</Filter>
71 </MOC>
72 <MOC Include="src\disasm.hxx">
73 <Filter>debugger</Filter>
74 </MOC>
75 <MOC Include="src\bootmanager.hxx" />
76 <MOC Include="src\hotkeys.hxx" />
77 <MOC Include="src\config\controller_config.hxx">
78 <Filter>config</Filter>
79 </MOC>
80 <MOC Include="src\config\controller_config_util.hxx">
81 <Filter>config</Filter>
82 </MOC>
83 </ItemGroup>
84 <ItemGroup>
85 <UIC Include="src\main.ui" />
86 <UIC Include="src\cpu_regs.ui">
87 <Filter>debugger</Filter>
88 </UIC>
89 <UIC Include="src\disasm.ui">
90 <Filter>debugger</Filter>
91 </UIC>
92 <UIC Include="src\callstack.ui">
93 <Filter>debugger</Filter>
94 </UIC>
95 <UIC Include="src\hotkeys.ui" />
96 <UIC Include="src\config\controller_config.ui">
97 <Filter>config</Filter>
98 </UIC>
99 </ItemGroup>
100 <ItemGroup>
101 <ClInclude Include="src\version.h" />
102 </ItemGroup>
103</Project> \ No newline at end of file
diff --git a/src/citra_qt/qt-build.props b/src/citra_qt/qt-build.props
new file mode 100644
index 000000000..d4600006c
--- /dev/null
+++ b/src/citra_qt/qt-build.props
@@ -0,0 +1,56 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup
4 Condition="'$(UICBeforeTargets)' == '' and '$(UICAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
5 <UICBeforeTargets>Midl</UICBeforeTargets>
6 <UICAfterTargets>CustomBuild</UICAfterTargets>
7 </PropertyGroup>
8 <ItemDefinitionGroup>
9 <UIC>
10 <QtUicExt>.hpp</QtUicExt>
11 <QtUicPrefix>ui_</QtUicPrefix>
12 <CommandLineTemplate>%QTDIR%\bin\uic.exe [inputs] -o "[QtUicPrefix]%(FileName)[QtUicExt]"</CommandLineTemplate>
13 <Outputs>[QtUicPrefix]%(FileName)[QtUicExt]</Outputs>
14 <ExecutionDescription>%(FileName).ui</ExecutionDescription>
15 </UIC>
16 </ItemDefinitionGroup>
17 <PropertyGroup
18 Condition="'$(MOCBeforeTargets)' == '' and '$(MOCAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
19 <MOCBeforeTargets>Midl</MOCBeforeTargets>
20 <MOCAfterTargets>CustomBuild</MOCAfterTargets>
21 </PropertyGroup>
22 <ItemDefinitionGroup>
23 <MOC>
24 <QtShared>true</QtShared>
25 <QtThread>true</QtThread>
26 <QtUnicode>true</QtUnicode>
27 <QtLargeFile>true</QtLargeFile>
28 <QtKeywords>true</QtKeywords>
29 <QtNoDebug>true</QtNoDebug>
30 <QtGuiLib>true</QtGuiLib>
31 <QtCoreLib>true</QtCoreLib>
32 <QtOpenGLLib>False</QtOpenGLLib>
33 <QtMocNoWarnings>False</QtMocNoWarnings>
34 <QtMocPfx>_moc</QtMocPfx>
35 <QtMocFilename>%(FileName)%(QtMocPfx)</QtMocFilename>
36 <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>
37 <Outputs>$(IntDir)%(QtMocFilename).obj</Outputs>
38 <ExecutionDescription>%(FileName).hxx</ExecutionDescription>
39 <ShowOnlyRuleProperties>true</ShowOnlyRuleProperties>
40 </MOC>
41 </ItemDefinitionGroup>
42 <PropertyGroup
43 Condition="'$(QRCBeforeTargets)' == '' and '$(QRCAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
44 <QRCBeforeTargets>Midl</QRCBeforeTargets>
45 <QRCAfterTargets>CustomBuild</QRCAfterTargets>
46 </PropertyGroup>
47 <ItemDefinitionGroup>
48 <QRC>
49 <QtQrcPfx>_qrc</QtQrcPfx>
50 <QtQrcFileName>%(FileName)%(QtQrcPfx)</QtQrcFileName>
51 <CommandLineTemplate>%QTDIR%\bin\rcc.exe [inputs] -o $(IntDir)%(QtQrcFileName).cpp &amp;&amp; cl.exe $(IntDir)%(QtQrcFileName).cpp /c /Fo"$(IntDir)%(QtQrcFileName)" [QtCommandLine]</CommandLineTemplate>
52 <Outputs>$(IntDir)%(QtQrcFileName).obj</Outputs>
53 <ExecutionDescription>%(FileName).qrc</ExecutionDescription>
54 </QRC>
55 </ItemDefinitionGroup>
56</Project> \ No newline at end of file
diff --git a/src/citra_qt/qt-build.targets b/src/citra_qt/qt-build.targets
new file mode 100644
index 000000000..febec73c4
--- /dev/null
+++ b/src/citra_qt/qt-build.targets
@@ -0,0 +1,242 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup>
4 <PropertyPageSchema
5 Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
6 <AvailableItemName
7 Include="UIC">
8 <Targets>_UIC</Targets>
9 </AvailableItemName>
10 <AvailableItemName
11 Include="MOC">
12 <Targets>_MOC</Targets>
13 </AvailableItemName>
14 <AvailableItemName
15 Include="QRC">
16 <Targets>_QRC</Targets>
17 </AvailableItemName>
18 </ItemGroup>
19 <UsingTask
20 TaskName="UIC"
21 TaskFactory="XamlTaskFactory"
22 AssemblyName="Microsoft.Build.Tasks.v4.0">
23 <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
24 </UsingTask>
25 <UsingTask
26 TaskName="MOC"
27 TaskFactory="XamlTaskFactory"
28 AssemblyName="Microsoft.Build.Tasks.v4.0">
29 <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
30 </UsingTask>
31 <UsingTask
32 TaskName="QRC"
33 TaskFactory="XamlTaskFactory"
34 AssemblyName="Microsoft.Build.Tasks.v4.0">
35 <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
36 </UsingTask>
37 <Target
38 Name="_UIC"
39 BeforeTargets="$(UICBeforeTargets)"
40 AfterTargets="$(UICAfterTargets)"
41 Condition="'@(UIC)' != ''"
42 DependsOnTargets="_SelectedFiles;ComputeUICOutput"
43 Outputs="%(UIC.Outputs)"
44 Inputs="%(UIC.Identity);%(UIC.AdditionalDependencies);$(MSBuildProjectFile)">
45 <ItemGroup
46 Condition="'@(SelectedFiles)' != ''">
47 <UIC
48 Remove="@(UIC)"
49 Condition="'%(Identity)' != '@(SelectedFiles)'" />
50 </ItemGroup>
51 <ItemGroup>
52 <UIC_tlog
53 Include="%(UIC.Outputs)"
54 Condition="'%(UIC.Outputs)' != '' and '%(UIC.ExcludedFromBuild)' != 'true'">
55 <Source>@(UIC, '|')</Source>
56 </UIC_tlog>
57 </ItemGroup>
58 <Message
59 Importance="High"
60 Text="%(UIC.ExecutionDescription)" />
61 <WriteLinesToFile
62 File="$(IntDir)$(ProjectName).write.1.tlog"
63 Lines="^%(UIC_tlog.Source);@(UIC_tlog-&gt;'%(Fullpath)')" />
64 <UIC
65 Condition="'%(UIC.ExcludedFromBuild)' != 'true'"
66 CommandLineTemplate="%(UIC.CommandLineTemplate)"
67 QtUicExt="%(UIC.QtUicExt)"
68 QtUicPrefix="%(UIC.QtUicPrefix)"
69 AdditionalOptions="%(UIC.AdditionalOptions)"
70 Inputs="%(UIC.Identity)" />
71 </Target>
72 <PropertyGroup>
73 <ComputeLinkInputsTargets>
74 $(ComputeLinkInputsTargets);
75 ComputeUICOutput;
76 </ComputeLinkInputsTargets>
77 <ComputeLibInputsTargets>
78 $(ComputeLibInputsTargets);
79 ComputeUICOutput;
80 </ComputeLibInputsTargets>
81 </PropertyGroup>
82 <Target
83 Name="ComputeUICOutput"
84 Condition="'@(UIC)' != ''">
85 <ItemGroup>
86 <UICDirsToMake
87 Condition="'@(UIC)' != ''"
88 Include="%(UIC.Outputs)" />
89 <Link
90 Include="%(UICDirsToMake.Identity)"
91 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
92 <Lib
93 Include="%(UICDirsToMake.Identity)"
94 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
95 <ImpLib
96 Include="%(UICDirsToMake.Identity)"
97 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
98 </ItemGroup>
99 <MakeDir
100 Directories="@(UICDirsToMake-&gt;'%(RootDir)%(Directory)')" />
101 </Target>
102 <Target
103 Name="_MOC"
104 BeforeTargets="$(MOCBeforeTargets)"
105 AfterTargets="$(MOCAfterTargets)"
106 Condition="'@(MOC)' != ''"
107 DependsOnTargets="_SelectedFiles;ComputeMOCOutput"
108 Outputs="%(MOC.Outputs)"
109 Inputs="%(MOC.Identity);%(MOC.AdditionalDependencies);$(MSBuildProjectFile)">
110 <ItemGroup
111 Condition="'@(SelectedFiles)' != ''">
112 <MOC
113 Remove="@(MOC)"
114 Condition="'%(Identity)' != '@(SelectedFiles)'" />
115 </ItemGroup>
116 <ItemGroup>
117 <MOC_tlog
118 Include="%(MOC.Outputs)"
119 Condition="'%(MOC.Outputs)' != '' and '%(MOC.ExcludedFromBuild)' != 'true'">
120 <Source>@(MOC, '|')</Source>
121 </MOC_tlog>
122 </ItemGroup>
123 <Message
124 Importance="High"
125 Text="%(MOC.ExecutionDescription)" />
126 <WriteLinesToFile
127 File="$(IntDir)$(ProjectName).write.1.tlog"
128 Lines="^%(MOC_tlog.Source);@(MOC_tlog-&gt;'%(Fullpath)')" />
129 <MOC
130 Condition="'%(MOC.ExcludedFromBuild)' != 'true'"
131 CommandLineTemplate="%(MOC.CommandLineTemplate)"
132 QtShared="%(MOC.QtShared)"
133 QtThread="%(MOC.QtThread)"
134 QtUnicode="%(MOC.QtUnicode)"
135 QtLargeFile="%(MOC.QtLargeFile)"
136 QtKeywords="%(MOC.QtKeywords)"
137 QtNoDebug="%(MOC.QtNoDebug)"
138 QtGuiLib="%(MOC.QtGuiLib)"
139 QtCoreLib="%(MOC.QtCoreLib)"
140 QtOpenGLLib="%(MOC.QtOpenGLLib)"
141 QtMocNoWarnings="%(MOC.QtMocNoWarnings)"
142 QtMocPfx="%(MOC.QtMocPfx)"
143 QtCommandLine="%(MOC.QtCommandLine)"
144 AdditionalOptions="%(MOC.AdditionalOptions)"
145 Inputs="%(MOC.Identity)" />
146 </Target>
147 <PropertyGroup>
148 <ComputeLinkInputsTargets>
149 $(ComputeLinkInputsTargets);
150 ComputeMOCOutput;
151 </ComputeLinkInputsTargets>
152 <ComputeLibInputsTargets>
153 $(ComputeLibInputsTargets);
154 ComputeMOCOutput;
155 </ComputeLibInputsTargets>
156 </PropertyGroup>
157 <Target
158 Name="ComputeMOCOutput"
159 Condition="'@(MOC)' != ''">
160 <ItemGroup>
161 <MOCDirsToMake
162 Condition="'@(MOC)' != ''"
163 Include="%(MOC.Outputs)" />
164 <Link
165 Include="%(MOCDirsToMake.Identity)"
166 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
167 <Lib
168 Include="%(MOCDirsToMake.Identity)"
169 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
170 <ImpLib
171 Include="%(MOCDirsToMake.Identity)"
172 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
173 </ItemGroup>
174 <MakeDir
175 Directories="@(MOCDirsToMake-&gt;'%(RootDir)%(Directory)')" />
176 </Target>
177 <Target
178 Name="_QRC"
179 BeforeTargets="$(QRCBeforeTargets)"
180 AfterTargets="$(QRCAfterTargets)"
181 Condition="'@(QRC)' != ''"
182 DependsOnTargets="_SelectedFiles;ComputeQRCOutput"
183 Outputs="%(QRC.Outputs)"
184 Inputs="%(QRC.Identity);%(QRC.AdditionalDependencies);$(MSBuildProjectFile)">
185 <ItemGroup
186 Condition="'@(SelectedFiles)' != ''">
187 <QRC
188 Remove="@(QRC)"
189 Condition="'%(Identity)' != '@(SelectedFiles)'" />
190 </ItemGroup>
191 <ItemGroup>
192 <QRC_tlog
193 Include="%(QRC.Outputs)"
194 Condition="'%(QRC.Outputs)' != '' and '%(QRC.ExcludedFromBuild)' != 'true'">
195 <Source>@(QRC, '|')</Source>
196 </QRC_tlog>
197 </ItemGroup>
198 <Message
199 Importance="High"
200 Text="%(QRC.ExecutionDescription)" />
201 <WriteLinesToFile
202 File="$(IntDir)$(ProjectName).write.1.tlog"
203 Lines="^%(QRC_tlog.Source);@(QRC_tlog-&gt;'%(Fullpath)')" />
204 <QRC
205 Condition="'%(QRC.ExcludedFromBuild)' != 'true'"
206 CommandLineTemplate="%(QRC.CommandLineTemplate)"
207 QtCommandLine="%(QRC.QtCommandLine)"
208 QtQrcPfx="%(QRC.QtQrcPfx)"
209 AdditionalOptions="%(QRC.AdditionalOptions)"
210 Inputs="%(QRC.Identity)" />
211 </Target>
212 <PropertyGroup>
213 <ComputeLinkInputsTargets>
214 $(ComputeLinkInputsTargets);
215 ComputeQRCOutput;
216 </ComputeLinkInputsTargets>
217 <ComputeLibInputsTargets>
218 $(ComputeLibInputsTargets);
219 ComputeQRCOutput;
220 </ComputeLibInputsTargets>
221 </PropertyGroup>
222 <Target
223 Name="ComputeQRCOutput"
224 Condition="'@(QRC)' != ''">
225 <ItemGroup>
226 <QRCDirsToMake
227 Condition="'@(QRC)' != ''"
228 Include="%(QRC.Outputs)" />
229 <Link
230 Include="%(QRCDirsToMake.Identity)"
231 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
232 <Lib
233 Include="%(QRCDirsToMake.Identity)"
234 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
235 <ImpLib
236 Include="%(QRCDirsToMake.Identity)"
237 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
238 </ItemGroup>
239 <MakeDir
240 Directories="@(QRCDirsToMake-&gt;'%(RootDir)%(Directory)')" />
241 </Target>
242</Project> \ No newline at end of file
diff --git a/src/citra_qt/qt-build.xml b/src/citra_qt/qt-build.xml
new file mode 100644
index 000000000..1bc84aa99
--- /dev/null
+++ b/src/citra_qt/qt-build.xml
@@ -0,0 +1,486 @@
1<?xml version="1.0" encoding="utf-8"?>
2<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">
3 <Rule
4 Name="UIC"
5 PageTemplate="tool"
6 DisplayName="Qt UI Compiler"
7 Order="200">
8 <Rule.DataSource>
9 <DataSource
10 Persistence="ProjectFile"
11 ItemType="UIC" />
12 </Rule.DataSource>
13 <Rule.Categories>
14 <Category
15 Name="General">
16 <Category.DisplayName>
17 <sys:String>General</sys:String>
18 </Category.DisplayName>
19 </Category>
20 <Category
21 Name="Command Line"
22 Subtype="CommandLine">
23 <Category.DisplayName>
24 <sys:String>Command Line</sys:String>
25 </Category.DisplayName>
26 </Category>
27 </Rule.Categories>
28 <StringListProperty
29 Name="Inputs"
30 Category="Command Line"
31 IsRequired="true"
32 Switch=" ">
33 <StringListProperty.DataSource>
34 <DataSource
35 Persistence="ProjectFile"
36 ItemType="UIC"
37 SourceType="Item" />
38 </StringListProperty.DataSource>
39 </StringListProperty>
40 <StringProperty
41 Name="QtUicExt"
42 Subcategory="Output"
43 HelpContext="0"
44 HelpUrl="http://code.google.com/p/xr-qt-msvc/"
45 DisplayName="UI Header file extension"
46 Description="The header file extension generated by the UIC Compiler. (Example: .h)"
47 Switch="[value]" />
48 <StringProperty
49 Name="QtUicPrefix"
50 Subcategory="Output"
51 HelpContext="0"
52 HelpUrl="http://code.google.com/p/xr-qt-msvc/"
53 DisplayName="UI Header file prefix"
54 Description="The prefix string to be used for UIC output. ( usually ui_ )"
55 Switch="[value]" />
56 <StringProperty
57 Name="CommandLineTemplate"
58 DisplayName="Command Line"
59 Visible="False"
60 IncludeInCommandLine="False" />
61 <DynamicEnumProperty
62 Name="UICBeforeTargets"
63 Category="General"
64 EnumProvider="Targets"
65 IncludeInCommandLine="False">
66 <DynamicEnumProperty.DisplayName>
67 <sys:String>Execute Before</sys:String>
68 </DynamicEnumProperty.DisplayName>
69 <DynamicEnumProperty.Description>
70 <sys:String>Specifies the targets for the build customization to run before.</sys:String>
71 </DynamicEnumProperty.Description>
72 <DynamicEnumProperty.ProviderSettings>
73 <NameValuePair
74 Name="Exclude"
75 Value="^UICBeforeTargets|^Compute" />
76 </DynamicEnumProperty.ProviderSettings>
77 <DynamicEnumProperty.DataSource>
78 <DataSource
79 Persistence="ProjectFile"
80 HasConfigurationCondition="true" />
81 </DynamicEnumProperty.DataSource>
82 </DynamicEnumProperty>
83 <DynamicEnumProperty
84 Name="UICAfterTargets"
85 Category="General"
86 EnumProvider="Targets"
87 IncludeInCommandLine="False">
88 <DynamicEnumProperty.DisplayName>
89 <sys:String>Execute After</sys:String>
90 </DynamicEnumProperty.DisplayName>
91 <DynamicEnumProperty.Description>
92 <sys:String>Specifies the targets for the build customization to run after.</sys:String>
93 </DynamicEnumProperty.Description>
94 <DynamicEnumProperty.ProviderSettings>
95 <NameValuePair
96 Name="Exclude"
97 Value="^UICAfterTargets|^Compute" />
98 </DynamicEnumProperty.ProviderSettings>
99 <DynamicEnumProperty.DataSource>
100 <DataSource
101 Persistence="ProjectFile"
102 ItemType=""
103 HasConfigurationCondition="true" />
104 </DynamicEnumProperty.DataSource>
105 </DynamicEnumProperty>
106 <StringListProperty
107 Name="Outputs"
108 DisplayName="Outputs"
109 Visible="False"
110 IncludeInCommandLine="False" />
111 <StringProperty
112 Name="ExecutionDescription"
113 DisplayName="Execution Description"
114 Visible="False"
115 IncludeInCommandLine="False" />
116 <StringListProperty
117 Name="AdditionalDependencies"
118 DisplayName="Additional Dependencies"
119 IncludeInCommandLine="False"
120 Visible="false" />
121 <StringProperty
122 Subtype="AdditionalOptions"
123 Name="AdditionalOptions"
124 Category="Command Line">
125 <StringProperty.DisplayName>
126 <sys:String>Additional Options</sys:String>
127 </StringProperty.DisplayName>
128 <StringProperty.Description>
129 <sys:String>Additional Options</sys:String>
130 </StringProperty.Description>
131 </StringProperty>
132 </Rule>
133 <ItemType
134 Name="UIC"
135 DisplayName="Qt UI Compiler" />
136 <FileExtension
137 Name="*.ui"
138 ContentType="UIC" />
139 <ContentType
140 Name="UIC"
141 DisplayName="Qt UI Compiler"
142 ItemType="UIC" />
143 <Rule
144 Name="MOC"
145 PageTemplate="tool"
146 DisplayName="Qt Meta Object Compiler"
147 Order="200">
148 <Rule.DataSource>
149 <DataSource
150 Persistence="ProjectFile"
151 ItemType="MOC" />
152 </Rule.DataSource>
153 <Rule.Categories>
154 <Category
155 Name="General">
156 <Category.DisplayName>
157 <sys:String>General</sys:String>
158 </Category.DisplayName>
159 </Category>
160 <Category
161 Name="Command Line"
162 Subtype="CommandLine">
163 <Category.DisplayName>
164 <sys:String>Command Line</sys:String>
165 </Category.DisplayName>
166 </Category>
167 </Rule.Categories>
168 <StringListProperty
169 Name="Inputs"
170 Category="Command Line"
171 IsRequired="true"
172 Switch=" ">
173 <StringListProperty.DataSource>
174 <DataSource
175 Persistence="ProjectFile"
176 ItemType="MOC"
177 SourceType="Item" />
178 </StringListProperty.DataSource>
179 </StringListProperty>
180 <BoolProperty
181 Name="QtShared"
182 Subcategory="Moc Definitions"
183 HelpContext="0"
184 DisplayName="Use QT as a Shared Library?"
185 Description="Use QT as a Shared Library?"
186 Switch="-DQT_SHARED" />
187 <BoolProperty
188 Name="QtThread"
189 Subcategory="Moc Definitions"
190 HelpContext="0"
191 DisplayName="Multi-threaded Support?"
192 Switch="-DQT_THREAD_SUPPORT" />
193 <BoolProperty
194 Name="QtUnicode"
195 Subcategory="Moc Definitions"
196 HelpContext="0"
197 DisplayName="Unicode Support?"
198 Switch="-DUNICODE" />
199 <BoolProperty
200 Name="QtLargeFile"
201 Subcategory="Moc Definitions"
202 HelpContext="0"
203 DisplayName="Large File Support?"
204 Switch="-DQT_LARGEFILE_SUPPORT" />
205 <BoolProperty
206 Name="QtKeywords"
207 Subcategory="Moc Definitions"
208 HelpContext="0"
209 DisplayName="Disable QT Keywords."
210 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."
211 Switch="-DQT_NO_KEYWORDS" />
212 <BoolProperty
213 Name="QtNoDebug"
214 Subcategory="Moc Definitions"
215 HelpContext="0"
216 DisplayName="Disable QT Debuging"
217 Switch="-DQT_NO_DEBUG" />
218 <BoolProperty
219 Name="QtGuiLib"
220 Subcategory="QT Libraries"
221 HelpContext="0"
222 DisplayName="Use QT Gui Library"
223 Switch="-DQT_GUI_LIB" />
224 <BoolProperty
225 Name="QtCoreLib"
226 Subcategory="QT Libraries"
227 HelpContext="0"
228 DisplayName="Use QT Core Library"
229 Switch="-DQT_CORE_LIB" />
230 <BoolProperty
231 Name="QtOpenGLLib"
232 Subcategory="QT Libraries"
233 HelpContext="0"
234 DisplayName="Use QT OpenGL Library"
235 Switch="-DQT_OPENGL_LIB" />
236 <BoolProperty
237 Name="QtMocNoWarnings"
238 Subcategory="General"
239 HelpContext="0"
240 DisplayName="Do not display warnings"
241 Description="do not display warnings"
242 Switch="/nw" />
243 <StringProperty
244 Name="QtMocPfx"
245 Subcategory="Output"
246 HelpContext="0"
247 HelpUrl="http://code.google.com/p/xr-qt-msvc/"
248 DisplayName="Output file postfix"
249 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]"
250 Switch="[value]" />
251 <StringProperty
252 Name="QtCommandLine"
253 Subcategory="General"
254 HelpContext="0"
255 HelpUrl="http://code.google.com/p/xr-qt-msvc/"
256 DisplayName="C++ Command Line Options"
257 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."
258 Switch="[value]" />
259 <StringProperty
260 Name="CommandLineTemplate"
261 DisplayName="Command Line"
262 Visible="False"
263 IncludeInCommandLine="False" />
264 <DynamicEnumProperty
265 Name="MOCBeforeTargets"
266 Category="General"
267 EnumProvider="Targets"
268 IncludeInCommandLine="False">
269 <DynamicEnumProperty.DisplayName>
270 <sys:String>Execute Before</sys:String>
271 </DynamicEnumProperty.DisplayName>
272 <DynamicEnumProperty.Description>
273 <sys:String>Specifies the targets for the build customization to run before.</sys:String>
274 </DynamicEnumProperty.Description>
275 <DynamicEnumProperty.ProviderSettings>
276 <NameValuePair
277 Name="Exclude"
278 Value="^MOCBeforeTargets|^Compute" />
279 </DynamicEnumProperty.ProviderSettings>
280 <DynamicEnumProperty.DataSource>
281 <DataSource
282 Persistence="ProjectFile"
283 HasConfigurationCondition="true" />
284 </DynamicEnumProperty.DataSource>
285 </DynamicEnumProperty>
286 <DynamicEnumProperty
287 Name="MOCAfterTargets"
288 Category="General"
289 EnumProvider="Targets"
290 IncludeInCommandLine="False">
291 <DynamicEnumProperty.DisplayName>
292 <sys:String>Execute After</sys:String>
293 </DynamicEnumProperty.DisplayName>
294 <DynamicEnumProperty.Description>
295 <sys:String>Specifies the targets for the build customization to run after.</sys:String>
296 </DynamicEnumProperty.Description>
297 <DynamicEnumProperty.ProviderSettings>
298 <NameValuePair
299 Name="Exclude"
300 Value="^MOCAfterTargets|^Compute" />
301 </DynamicEnumProperty.ProviderSettings>
302 <DynamicEnumProperty.DataSource>
303 <DataSource
304 Persistence="ProjectFile"
305 ItemType=""
306 HasConfigurationCondition="true" />
307 </DynamicEnumProperty.DataSource>
308 </DynamicEnumProperty>
309 <StringListProperty
310 Name="Outputs"
311 DisplayName="Outputs"
312 Visible="False"
313 IncludeInCommandLine="False" />
314 <StringProperty
315 Name="ExecutionDescription"
316 DisplayName="Execution Description"
317 Visible="False"
318 IncludeInCommandLine="False" />
319 <StringListProperty
320 Name="AdditionalDependencies"
321 DisplayName="Additional Dependencies"
322 IncludeInCommandLine="False"
323 Visible="false" />
324 <StringProperty
325 Subtype="AdditionalOptions"
326 Name="AdditionalOptions"
327 Category="Command Line">
328 <StringProperty.DisplayName>
329 <sys:String>Additional Options</sys:String>
330 </StringProperty.DisplayName>
331 <StringProperty.Description>
332 <sys:String>Additional Options</sys:String>
333 </StringProperty.Description>
334 </StringProperty>
335 </Rule>
336 <ItemType
337 Name="MOC"
338 DisplayName="Qt Meta Object Compiler" />
339 <FileExtension
340 Name="*.hxx"
341 ContentType="MOC" />
342 <ContentType
343 Name="MOC"
344 DisplayName="Qt Meta Object Compiler"
345 ItemType="MOC" />
346 <Rule
347 Name="QRC"
348 PageTemplate="tool"
349 DisplayName="Qt Resource Compiler"
350 Order="200">
351 <Rule.DataSource>
352 <DataSource
353 Persistence="ProjectFile"
354 ItemType="QRC" />
355 </Rule.DataSource>
356 <Rule.Categories>
357 <Category
358 Name="General">
359 <Category.DisplayName>
360 <sys:String>General</sys:String>
361 </Category.DisplayName>
362 </Category>
363 <Category
364 Name="Command Line"
365 Subtype="CommandLine">
366 <Category.DisplayName>
367 <sys:String>Command Line</sys:String>
368 </Category.DisplayName>
369 </Category>
370 </Rule.Categories>
371 <StringListProperty
372 Name="Inputs"
373 Category="Command Line"
374 IsRequired="true"
375 Switch=" ">
376 <StringListProperty.DataSource>
377 <DataSource
378 Persistence="ProjectFile"
379 ItemType="QRC"
380 SourceType="Item" />
381 </StringListProperty.DataSource>
382 </StringListProperty>
383 <StringProperty
384 Name="QtCommandLine"
385 Subcategory="General"
386 HelpContext="0"
387 HelpUrl="http://code.google.com/p/xr-core/wiki/QtRules"
388 DisplayName="C++ Command Line Options"
389 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."
390 Switch="[value]" />
391 <StringProperty
392 Name="QtQrcPfx"
393 Subcategory="Output"
394 HelpContext="0"
395 HelpUrl="http://code.google.com/p/xr-qt-msvc/"
396 DisplayName="Output file postfix"
397 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]"
398 Switch="[value]" />
399 <StringProperty
400 Name="CommandLineTemplate"
401 DisplayName="Command Line"
402 Visible="False"
403 IncludeInCommandLine="False" />
404 <DynamicEnumProperty
405 Name="QRCBeforeTargets"
406 Category="General"
407 EnumProvider="Targets"
408 IncludeInCommandLine="False">
409 <DynamicEnumProperty.DisplayName>
410 <sys:String>Execute Before</sys:String>
411 </DynamicEnumProperty.DisplayName>
412 <DynamicEnumProperty.Description>
413 <sys:String>Specifies the targets for the build customization to run before.</sys:String>
414 </DynamicEnumProperty.Description>
415 <DynamicEnumProperty.ProviderSettings>
416 <NameValuePair
417 Name="Exclude"
418 Value="^QRCBeforeTargets|^Compute" />
419 </DynamicEnumProperty.ProviderSettings>
420 <DynamicEnumProperty.DataSource>
421 <DataSource
422 Persistence="ProjectFile"
423 HasConfigurationCondition="true" />
424 </DynamicEnumProperty.DataSource>
425 </DynamicEnumProperty>
426 <DynamicEnumProperty
427 Name="QRCAfterTargets"
428 Category="General"
429 EnumProvider="Targets"
430 IncludeInCommandLine="False">
431 <DynamicEnumProperty.DisplayName>
432 <sys:String>Execute After</sys:String>
433 </DynamicEnumProperty.DisplayName>
434 <DynamicEnumProperty.Description>
435 <sys:String>Specifies the targets for the build customization to run after.</sys:String>
436 </DynamicEnumProperty.Description>
437 <DynamicEnumProperty.ProviderSettings>
438 <NameValuePair
439 Name="Exclude"
440 Value="^QRCAfterTargets|^Compute" />
441 </DynamicEnumProperty.ProviderSettings>
442 <DynamicEnumProperty.DataSource>
443 <DataSource
444 Persistence="ProjectFile"
445 ItemType=""
446 HasConfigurationCondition="true" />
447 </DynamicEnumProperty.DataSource>
448 </DynamicEnumProperty>
449 <StringListProperty
450 Name="Outputs"
451 DisplayName="Outputs"
452 Visible="False"
453 IncludeInCommandLine="False" />
454 <StringProperty
455 Name="ExecutionDescription"
456 DisplayName="Execution Description"
457 Visible="False"
458 IncludeInCommandLine="False" />
459 <StringListProperty
460 Name="AdditionalDependencies"
461 DisplayName="Additional Dependencies"
462 IncludeInCommandLine="False"
463 Visible="false" />
464 <StringProperty
465 Subtype="AdditionalOptions"
466 Name="AdditionalOptions"
467 Category="Command Line">
468 <StringProperty.DisplayName>
469 <sys:String>Additional Options</sys:String>
470 </StringProperty.DisplayName>
471 <StringProperty.Description>
472 <sys:String>Additional Options</sys:String>
473 </StringProperty.Description>
474 </StringProperty>
475 </Rule>
476 <ItemType
477 Name="QRC"
478 DisplayName="Qt Resource Compiler" />
479 <FileExtension
480 Name="*.qrc"
481 ContentType="QRC" />
482 <ContentType
483 Name="QRC"
484 DisplayName="Qt Resource Compiler"
485 ItemType="QRC" />
486</ProjectSchemaDefinitions> \ No newline at end of file
diff --git a/src/citra_qt/src/bootmanager.cpp b/src/citra_qt/src/bootmanager.cpp
new file mode 100644
index 000000000..8d7b5e446
--- /dev/null
+++ b/src/citra_qt/src/bootmanager.cpp
@@ -0,0 +1,246 @@
1#include <QHBoxLayout>
2#include <QKeyEvent>
3
4#include "common.h"
5#include "bootmanager.hxx"
6
7#include "core.h"
8
9#include "version.h"
10
11#define APP_NAME "citra"
12#define APP_VERSION "0.1-" VERSION
13#define APP_TITLE APP_NAME " " APP_VERSION
14#define COPYRIGHT "Copyright (C) 2013-2014 Citra Team"
15
16EmuThread::EmuThread(GRenderWindow* render_window) : exec_cpu_step(false), cpu_running(true), render_window(render_window)
17{
18}
19
20void EmuThread::SetFilename(const char* filename)
21{
22 strcpy(this->filename, filename);
23}
24
25void EmuThread::run()
26{
27 //u32 tight_loop;
28
29 NOTICE_LOG(MASTER_LOG, APP_NAME " starting...\n");
30
31 if (Core::Init(/*render_window*/)) {
32 ERROR_LOG(MASTER_LOG, "core initialization failed, exiting...");
33 Core::Stop();
34 exit(1);
35 }
36
37 // Load a game or die...
38 Core::Start(); //autoboot for now
39 /*
40 if (E_OK == dvd::LoadBootableFile(filename)) {
41 if (common::g_config->enable_auto_boot()) {
42 core::Start();
43 } else {
44 LOG_ERROR(TMASTER, "Autoboot required in no-GUI mode... Exiting!\n");
45 }
46 } else {
47 LOG_ERROR(TMASTER, "Failed to load a bootable file... Exiting!\n");
48 exit(E_ERR);
49 }
50 */
51
52 /*
53 while(core::SYS_DIE != core::g_state)
54 {
55 if (core::SYS_RUNNING == core::g_state)
56 {
57 if(!cpu->is_on)
58 {
59 cpu->Start(); // Initialize and start CPU.
60 }
61 else
62 {
63 for(tight_loop = 0; tight_loop < 10000; ++tight_loop)
64 {
65 if (!cpu_running)
66 {
67 emit CPUStepped();
68 exec_cpu_step = false;
69 cpu->step = true;
70 while (!exec_cpu_step && !cpu_running && core::SYS_DIE != core::g_state);
71 }
72 cpu->execStep();
73 cpu->step = false;
74 }
75 }
76 }
77 else if (core::SYS_HALTED == core::g_state)
78 {
79 core::Stop();
80 }
81 }
82 */
83 Core::Stop();
84}
85
86void EmuThread::Stop()
87{
88 if (!isRunning())
89 {
90 INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning...");
91 return;
92 }
93
94 //core::g_state = core::SYS_DIE;
95
96 wait(1000);
97 if (isRunning())
98 {
99 WARN_LOG(MASTER_LOG, "EmuThread still running, terminating...");
100 terminate();
101 wait(1000);
102 if (isRunning())
103 WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here...");
104 }
105 INFO_LOG(MASTER_LOG, "EmuThread stopped");
106}
107
108
109// This class overrides paintEvent and resizeEvent to prevent the GUI thread from stealing GL context.
110// The corresponding functionality is handled in EmuThread instead
111class GGLWidgetInternal : public QGLWidget
112{
113public:
114 GGLWidgetInternal(GRenderWindow* parent) : QGLWidget(parent)
115 {
116 setAutoBufferSwap(false);
117 doneCurrent();
118 parent_ = parent;
119 }
120
121 void paintEvent(QPaintEvent* ev)
122 {
123 // Apparently, Windows doesn't display anything if we don't call this here.
124 // TODO: Breaks linux though because we aren't calling doneCurrent() ... -.-
125// makeCurrent();
126 }
127 void resizeEvent(QResizeEvent* ev) {
128 parent_->set_client_area_width(size().width());
129 parent_->set_client_area_height(size().height());
130 }
131private:
132 GRenderWindow* parent_;
133};
134
135
136EmuThread& GRenderWindow::GetEmuThread()
137{
138 return emu_thread;
139}
140
141GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this)
142{
143 // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose
144
145 child = new GGLWidgetInternal(this);
146
147 QBoxLayout* layout = new QHBoxLayout(this);
148 resize(640, 480); // TODO: Load size from config instead
149 layout->addWidget(child);
150 layout->setMargin(0);
151 setLayout(layout);
152
153 BackupGeometry();
154}
155
156GRenderWindow::~GRenderWindow()
157{
158 emu_thread.Stop();
159}
160
161void GRenderWindow::SwapBuffers()
162{
163 child->makeCurrent(); // TODO: Not necessary?
164 child->swapBuffers();
165}
166
167void GRenderWindow::closeEvent(QCloseEvent* event)
168{
169 emu_thread.Stop();
170 QWidget::closeEvent(event);
171}
172
173void GRenderWindow::MakeCurrent()
174{
175 child->makeCurrent();
176}
177
178void GRenderWindow::DoneCurrent()
179{
180 child->doneCurrent();
181}
182
183void GRenderWindow::PollEvents() {
184 // TODO(ShizZy): Does this belong here? This is a reasonable place to update the window title
185 // from the main thread, but this should probably be in an event handler...
186 /*
187 static char title[128];
188 sprintf(title, "%s (FPS: %02.02f)", window_title_.c_str(),
189 video_core::g_renderer->current_fps());
190 setWindowTitle(title);
191 */
192}
193
194void GRenderWindow::BackupGeometry()
195{
196 geometry = ((QGLWidget*)this)->saveGeometry();
197}
198
199void GRenderWindow::RestoreGeometry()
200{
201 // We don't want to back up the geometry here (obviously)
202 QWidget::restoreGeometry(geometry);
203}
204
205void GRenderWindow::restoreGeometry(const QByteArray& geometry)
206{
207 // Make sure users of this class don't need to deal with backing up the geometry themselves
208 QWidget::restoreGeometry(geometry);
209 BackupGeometry();
210}
211
212QByteArray GRenderWindow::saveGeometry()
213{
214 // If we are a top-level widget, store the current geometry
215 // otherwise, store the last backup
216 if (parent() == NULL)
217 return ((QGLWidget*)this)->saveGeometry();
218 else
219 return geometry;
220}
221
222void GRenderWindow::keyPressEvent(QKeyEvent* event)
223{
224 /*
225 bool key_processed = false;
226 for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel)
227 if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::PRESSED))
228 key_processed = true;
229
230 if (!key_processed)
231 QWidget::keyPressEvent(event);
232 */
233}
234
235void GRenderWindow::keyReleaseEvent(QKeyEvent* event)
236{
237 /*
238 bool key_processed = false;
239 for (unsigned int channel = 0; channel < 4 && controller_interface(); ++channel)
240 if (controller_interface()->SetControllerStatus(channel, event->key(), input_common::GCController::RELEASED))
241 key_processed = true;
242
243 if (!key_processed)
244 QWidget::keyPressEvent(event);
245 */
246} \ No newline at end of file
diff --git a/src/citra_qt/src/bootmanager.hxx b/src/citra_qt/src/bootmanager.hxx
new file mode 100644
index 000000000..943945961
--- /dev/null
+++ b/src/citra_qt/src/bootmanager.hxx
@@ -0,0 +1,104 @@
1#include <QThread>
2#include <QGLWidget>
3#include "common.h"
4#include "emu_window.h"
5
6class GRenderWindow;
7class QKeyEvent;
8
9class EmuThread : public QThread
10{
11 Q_OBJECT
12
13public:
14 /**
15 * Set image filename
16 *
17 * @param filename
18 * @warning Only call when not running!
19 */
20 void SetFilename(const char* filename);
21
22 /**
23 * Start emulation (on new thread)
24 *
25 * @warning Only call when not running!
26 */
27 void run();
28
29 /**
30 * Allow the CPU to process a single instruction (if cpu is not running)
31 *
32 * @note This function is thread-safe
33 */
34 void ExecStep() { exec_cpu_step = true; }
35
36 /**
37 * Allow the CPU to continue processing instructions without interruption
38 *
39 * @note This function is thread-safe
40 */
41 void SetCpuRunning(bool running) { cpu_running = running; }
42
43public slots:
44 /**
45 * Stop emulation and wait for the thread to finish.
46 *
47 * @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.
48 * @note: This function is thread-safe.
49 */
50 void Stop();
51
52private:
53 friend class GRenderWindow;
54
55 EmuThread(GRenderWindow* render_window);
56
57 char filename[MAX_PATH];
58
59 bool exec_cpu_step;
60 bool cpu_running;
61
62 GRenderWindow* render_window;
63
64signals:
65 /**
66 * Emitted when CPU when we've finished processing a single Gekko instruction
67 *
68 * @warning This will only be emitted when the CPU is not running (SetCpuRunning(false))
69 * @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)
70 */
71 void CPUStepped();
72};
73
74class GRenderWindow : public QWidget, public EmuWindow
75{
76public:
77 GRenderWindow(QWidget* parent = NULL);
78 ~GRenderWindow();
79
80 void closeEvent(QCloseEvent*);
81
82 // EmuWindow implementation
83 void SwapBuffers();
84 void MakeCurrent();
85 void DoneCurrent();
86 void PollEvents();
87
88 void BackupGeometry();
89 void RestoreGeometry();
90 void restoreGeometry(const QByteArray& geometry); // overridden
91 QByteArray saveGeometry(); // overridden
92
93 EmuThread& GetEmuThread();
94
95 void keyPressEvent(QKeyEvent* event);
96 void keyReleaseEvent(QKeyEvent* event);
97
98private:
99 QGLWidget* child;
100
101 EmuThread emu_thread;
102
103 QByteArray geometry;
104};
diff --git a/src/citra_qt/src/callstack.cpp b/src/citra_qt/src/callstack.cpp
new file mode 100644
index 000000000..2d62cb0d0
--- /dev/null
+++ b/src/citra_qt/src/callstack.cpp
@@ -0,0 +1,36 @@
1#include <QStandardItemModel>
2#include "callstack.hxx"
3
4//#include "debugger/debugger.h"
5
6GCallstackView::GCallstackView(QWidget* parent): QDockWidget(parent)
7{
8 ui.setupUi(this);
9
10 callstack_model = new QStandardItemModel(this);
11 callstack_model->setColumnCount(3);
12 callstack_model->setHeaderData(0, Qt::Horizontal, "Depth");
13 callstack_model->setHeaderData(1, Qt::Horizontal, "Address");
14 callstack_model->setHeaderData(2, Qt::Horizontal, "Function Name");
15 ui.treeView->setModel(callstack_model);
16
17 // TODO: Make single clicking a callstack entry jump to the corresponding disassembly position
18}
19
20void GCallstackView::OnCPUStepped()
21{
22 /*
23 Debugger::Callstack callstack;
24 Debugger::GetCallstack(callstack);
25 callstack_model->setRowCount(callstack.size());
26
27 for (int i = 0; i < callstack.size(); ++i)
28 for (Debugger::CallstackIterator it = callstack.begin(); it != callstack.end(); ++it)
29 {
30 Debugger::CallstackEntry entry = callstack[i];
31 callstack_model->setItem(i, 0, new QStandardItem(QString("%1").arg(i+1)));
32 callstack_model->setItem(i, 1, new QStandardItem(QString("0x%1").arg(entry.addr, 8, 16, QLatin1Char('0'))));
33 callstack_model->setItem(i, 2, new QStandardItem(QString::fromStdString(entry.name)));
34 }
35 */
36} \ No newline at end of file
diff --git a/src/citra_qt/src/callstack.hxx b/src/citra_qt/src/callstack.hxx
new file mode 100644
index 000000000..60b24f236
--- /dev/null
+++ b/src/citra_qt/src/callstack.hxx
@@ -0,0 +1,20 @@
1#include <QDockWidget>
2#include "ui_callstack.h"
3#include "platform.h"
4
5class QStandardItemModel;
6
7class GCallstackView : public QDockWidget
8{
9 Q_OBJECT
10
11public:
12 GCallstackView(QWidget* parent = 0);
13
14public slots:
15 void OnCPUStepped();
16
17private:
18 Ui::CallStack ui;
19 QStandardItemModel* callstack_model;
20};
diff --git a/src/citra_qt/src/callstack.ui b/src/citra_qt/src/callstack.ui
new file mode 100644
index 000000000..b3c4db632
--- /dev/null
+++ b/src/citra_qt/src/callstack.ui
@@ -0,0 +1,36 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>CallStack</class>
4 <widget class="QDockWidget" name="CallStack">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>400</width>
10 <height>300</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Call stack</string>
15 </property>
16 <widget class="QWidget" name="dockWidgetContents">
17 <layout class="QVBoxLayout" name="verticalLayout">
18 <item>
19 <widget class="QTreeView" name="treeView">
20 <property name="alternatingRowColors">
21 <bool>true</bool>
22 </property>
23 <property name="rootIsDecorated">
24 <bool>false</bool>
25 </property>
26 <property name="itemsExpandable">
27 <bool>false</bool>
28 </property>
29 </widget>
30 </item>
31 </layout>
32 </widget>
33 </widget>
34 <resources/>
35 <connections/>
36</ui>
diff --git a/src/citra_qt/src/config/controller_config.cpp b/src/citra_qt/src/config/controller_config.cpp
new file mode 100644
index 000000000..52dfb627c
--- /dev/null
+++ b/src/citra_qt/src/config/controller_config.cpp
@@ -0,0 +1,91 @@
1#include <QDialogButtonBox>
2
3#include "controller_config.hxx"
4#include "controller_config_util.hxx"
5
6/* TODO(bunnei): ImplementMe
7
8using common::Config;
9
10GControllerConfig::GControllerConfig(common::Config::ControllerPort* initial_config, QWidget* parent) : QWidget(parent)
11{
12 ui.setupUi(this);
13 ((QGridLayout*)ui.mainStickTab->layout())->addWidget(new GStickConfig(Config::ANALOG_LEFT, Config::ANALOG_RIGHT, Config::ANALOG_UP, Config::ANALOG_DOWN, this, this), 1, 1);
14 ((QGridLayout*)ui.cStickTab->layout())->addWidget(new GStickConfig(Config::C_LEFT, Config::C_RIGHT, Config::C_UP, Config::C_DOWN, this, this), 1, 1);
15 ((QGridLayout*)ui.dPadTab->layout())->addWidget(new GStickConfig(Config::DPAD_LEFT, Config::DPAD_RIGHT, Config::DPAD_UP, Config::DPAD_DOWN, this, this), 1, 1);
16
17 // TODO: Arrange these more compactly?
18 QVBoxLayout* layout = (QVBoxLayout*)ui.buttonsTab->layout();
19 layout->addWidget(new GButtonConfigGroup("A Button", Config::BUTTON_A, this, ui.buttonsTab));
20 layout->addWidget(new GButtonConfigGroup("B Button", Config::BUTTON_B, this, ui.buttonsTab));
21 layout->addWidget(new GButtonConfigGroup("X Button", Config::BUTTON_X, this, ui.buttonsTab));
22 layout->addWidget(new GButtonConfigGroup("Y Button", Config::BUTTON_Y, this, ui.buttonsTab));
23 layout->addWidget(new GButtonConfigGroup("Z Button", Config::BUTTON_Z, this, ui.buttonsTab));
24 layout->addWidget(new GButtonConfigGroup("L Trigger", Config::TRIGGER_L, this, ui.buttonsTab));
25 layout->addWidget(new GButtonConfigGroup("R Trigger", Config::TRIGGER_R, this, ui.buttonsTab));
26 layout->addWidget(new GButtonConfigGroup("Start Button", Config::BUTTON_START, this, ui.buttonsTab));
27
28 memcpy(config, initial_config, sizeof(config));
29
30 emit ActivePortChanged(config[0]);
31}
32
33void GControllerConfig::OnKeyConfigChanged(common::Config::Control id, int key, const QString& name)
34{
35 if (InputSourceJoypad())
36 {
37 config[GetActiveController()].pads.key_code[id] = key;
38 }
39 else
40 {
41 config[GetActiveController()].keys.key_code[id] = key;
42 }
43 emit ActivePortChanged(config[GetActiveController()]);
44}
45
46int GControllerConfig::GetActiveController()
47{
48 return ui.activeControllerCB->currentIndex();
49}
50
51bool GControllerConfig::InputSourceJoypad()
52{
53 return ui.inputSourceCB->currentIndex() == 1;
54}
55
56GControllerConfigDialog::GControllerConfigDialog(common::Config::ControllerPort* controller_ports, QWidget* parent) : QDialog(parent), config_ptr(controller_ports)
57{
58 setWindowTitle(tr("Input configuration"));
59
60 QVBoxLayout* layout = new QVBoxLayout(this);
61 config_widget = new GControllerConfig(controller_ports, this);
62 layout->addWidget(config_widget);
63
64 QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
65 layout->addWidget(buttons);
66
67 connect(buttons, SIGNAL(rejected()), this, SLOT(reject()));
68 connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
69
70 connect(this, SIGNAL(accepted()), this, SLOT(EnableChanges()));
71
72 layout->setSizeConstraint(QLayout::SetFixedSize);
73 setLayout(layout);
74 setModal(true);
75 show();
76}
77
78void GControllerConfigDialog::EnableChanges()
79{
80 for (unsigned int i = 0; i < 4; ++i)
81 {
82 memcpy(&config_ptr[i], &config_widget->GetControllerConfig(i), sizeof(common::Config::ControllerPort));
83
84 if (common::g_config) {
85 // Apply changes if running a game
86 memcpy(&common::g_config->controller_ports(i), &config_widget->GetControllerConfig(i), sizeof(common::Config::ControllerPort));
87 }
88 }
89}
90
91*/ \ No newline at end of file
diff --git a/src/citra_qt/src/config/controller_config.hxx b/src/citra_qt/src/config/controller_config.hxx
new file mode 100644
index 000000000..9ff86a110
--- /dev/null
+++ b/src/citra_qt/src/config/controller_config.hxx
@@ -0,0 +1,52 @@
1#ifndef _CONTROLLER_CONFIG_HXX_
2#define _CONTROLLER_CONFIG_HXX_
3
4#include <QDialog>
5
6#include "ui_controller_config.h"
7
8/* TODO(bunnei): ImplementMe
9
10#include "config.h"
11
12class GControllerConfig : public QWidget
13{
14 Q_OBJECT
15
16public:
17 GControllerConfig(common::Config::ControllerPort* initial_config, QWidget* parent = NULL);
18
19 const common::Config::ControllerPort& GetControllerConfig(int index) const { return config[index]; }
20
21signals:
22 void ActivePortChanged(const common::Config::ControllerPort&);
23
24public slots:
25 void OnKeyConfigChanged(common::Config::Control id, int key, const QString& name);
26
27private:
28 int GetActiveController();
29 bool InputSourceJoypad();
30
31 Ui::ControllerConfig ui;
32 common::Config::ControllerPort config[4];
33};
34
35class GControllerConfigDialog : public QDialog
36{
37 Q_OBJECT
38
39public:
40 GControllerConfigDialog(common::Config::ControllerPort* controller_ports, QWidget* parent = NULL);
41
42public slots:
43 void EnableChanges();
44
45private:
46 GControllerConfig* config_widget;
47 common::Config::ControllerPort* config_ptr;
48};
49
50*/
51
52#endif // _CONTROLLER_CONFIG_HXX_
diff --git a/src/citra_qt/src/config/controller_config.ui b/src/citra_qt/src/config/controller_config.ui
new file mode 100644
index 000000000..9f650047b
--- /dev/null
+++ b/src/citra_qt/src/config/controller_config.ui
@@ -0,0 +1,308 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>ControllerConfig</class>
4 <widget class="QWidget" name="ControllerConfig">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>503</width>
10 <height>293</height>
11 </rect>
12 </property>
13 <property name="sizePolicy">
14 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
15 <horstretch>0</horstretch>
16 <verstretch>0</verstretch>
17 </sizepolicy>
18 </property>
19 <property name="windowTitle">
20 <string>Controller Configuration</string>
21 </property>
22 <layout class="QVBoxLayout" name="verticalLayout">
23 <property name="sizeConstraint">
24 <enum>QLayout::SetFixedSize</enum>
25 </property>
26 <item>
27 <layout class="QGridLayout" name="gridLayout">
28 <item row="1" column="1">
29 <widget class="QComboBox" name="activeControllerCB">
30 <item>
31 <property name="text">
32 <string>Controller 1</string>
33 </property>
34 </item>
35 <item>
36 <property name="text">
37 <string>Controller 2</string>
38 </property>
39 </item>
40 <item>
41 <property name="text">
42 <string>Controller 3</string>
43 </property>
44 </item>
45 <item>
46 <property name="text">
47 <string>Controller 4</string>
48 </property>
49 </item>
50 </widget>
51 </item>
52 <item row="0" column="2">
53 <spacer name="horizontalSpacer">
54 <property name="orientation">
55 <enum>Qt::Horizontal</enum>
56 </property>
57 <property name="sizeHint" stdset="0">
58 <size>
59 <width>40</width>
60 <height>20</height>
61 </size>
62 </property>
63 </spacer>
64 </item>
65 <item row="1" column="2">
66 <widget class="QCheckBox" name="checkBox">
67 <property name="text">
68 <string>Enabled</string>
69 </property>
70 </widget>
71 </item>
72 <item row="0" column="1">
73 <widget class="QComboBox" name="inputSourceCB">
74 <item>
75 <property name="text">
76 <string>Keyboard</string>
77 </property>
78 </item>
79 <item>
80 <property name="text">
81 <string>Joypad</string>
82 </property>
83 </item>
84 </widget>
85 </item>
86 <item row="1" column="0">
87 <widget class="QLabel" name="label_2">
88 <property name="text">
89 <string>Active Controller:</string>
90 </property>
91 </widget>
92 </item>
93 <item row="0" column="0">
94 <widget class="QLabel" name="label">
95 <property name="text">
96 <string>Input Source:</string>
97 </property>
98 </widget>
99 </item>
100 </layout>
101 </item>
102 <item>
103 <widget class="QTabWidget" name="tabWidget">
104 <property name="currentIndex">
105 <number>0</number>
106 </property>
107 <widget class="QWidget" name="mainStickTab">
108 <attribute name="title">
109 <string>Main Stick</string>
110 </attribute>
111 <layout class="QGridLayout" name="gridLayout_3">
112 <item row="2" column="2">
113 <spacer name="verticalSpacer_2">
114 <property name="orientation">
115 <enum>Qt::Vertical</enum>
116 </property>
117 <property name="sizeHint" stdset="0">
118 <size>
119 <width>20</width>
120 <height>40</height>
121 </size>
122 </property>
123 </spacer>
124 </item>
125 <item row="0" column="2">
126 <spacer name="verticalSpacer_3">
127 <property name="orientation">
128 <enum>Qt::Vertical</enum>
129 </property>
130 <property name="sizeHint" stdset="0">
131 <size>
132 <width>20</width>
133 <height>40</height>
134 </size>
135 </property>
136 </spacer>
137 </item>
138 <item row="1" column="0">
139 <spacer name="horizontalSpacer_4">
140 <property name="orientation">
141 <enum>Qt::Horizontal</enum>
142 </property>
143 <property name="sizeHint" stdset="0">
144 <size>
145 <width>40</width>
146 <height>20</height>
147 </size>
148 </property>
149 </spacer>
150 </item>
151 <item row="1" column="4">
152 <spacer name="horizontalSpacer_3">
153 <property name="orientation">
154 <enum>Qt::Horizontal</enum>
155 </property>
156 <property name="sizeHint" stdset="0">
157 <size>
158 <width>40</width>
159 <height>20</height>
160 </size>
161 </property>
162 </spacer>
163 </item>
164 </layout>
165 </widget>
166 <widget class="QWidget" name="cStickTab">
167 <attribute name="title">
168 <string>C-Stick</string>
169 </attribute>
170 <layout class="QGridLayout" name="gridLayout_4">
171 <item row="1" column="0">
172 <spacer name="horizontalSpacer_6">
173 <property name="orientation">
174 <enum>Qt::Horizontal</enum>
175 </property>
176 <property name="sizeHint" stdset="0">
177 <size>
178 <width>40</width>
179 <height>0</height>
180 </size>
181 </property>
182 </spacer>
183 </item>
184 <item row="0" column="1">
185 <spacer name="verticalSpacer_5">
186 <property name="orientation">
187 <enum>Qt::Vertical</enum>
188 </property>
189 <property name="sizeHint" stdset="0">
190 <size>
191 <width>20</width>
192 <height>40</height>
193 </size>
194 </property>
195 </spacer>
196 </item>
197 <item row="2" column="1">
198 <spacer name="verticalSpacer_4">
199 <property name="orientation">
200 <enum>Qt::Vertical</enum>
201 </property>
202 <property name="sizeHint" stdset="0">
203 <size>
204 <width>20</width>
205 <height>40</height>
206 </size>
207 </property>
208 </spacer>
209 </item>
210 <item row="1" column="2">
211 <spacer name="horizontalSpacer_5">
212 <property name="orientation">
213 <enum>Qt::Horizontal</enum>
214 </property>
215 <property name="sizeHint" stdset="0">
216 <size>
217 <width>40</width>
218 <height>20</height>
219 </size>
220 </property>
221 </spacer>
222 </item>
223 </layout>
224 </widget>
225 <widget class="QWidget" name="dPadTab">
226 <attribute name="title">
227 <string>D-Pad</string>
228 </attribute>
229 <layout class="QGridLayout" name="gridLayout_5">
230 <item row="1" column="2">
231 <spacer name="horizontalSpacer_7">
232 <property name="orientation">
233 <enum>Qt::Horizontal</enum>
234 </property>
235 <property name="sizeHint" stdset="0">
236 <size>
237 <width>40</width>
238 <height>20</height>
239 </size>
240 </property>
241 </spacer>
242 </item>
243 <item row="0" column="1">
244 <spacer name="verticalSpacer_7">
245 <property name="orientation">
246 <enum>Qt::Vertical</enum>
247 </property>
248 <property name="sizeHint" stdset="0">
249 <size>
250 <width>20</width>
251 <height>40</height>
252 </size>
253 </property>
254 </spacer>
255 </item>
256 <item row="2" column="1">
257 <spacer name="verticalSpacer_6">
258 <property name="orientation">
259 <enum>Qt::Vertical</enum>
260 </property>
261 <property name="sizeHint" stdset="0">
262 <size>
263 <width>20</width>
264 <height>40</height>
265 </size>
266 </property>
267 </spacer>
268 </item>
269 <item row="1" column="0">
270 <spacer name="horizontalSpacer_8">
271 <property name="orientation">
272 <enum>Qt::Horizontal</enum>
273 </property>
274 <property name="sizeHint" stdset="0">
275 <size>
276 <width>40</width>
277 <height>20</height>
278 </size>
279 </property>
280 </spacer>
281 </item>
282 </layout>
283 </widget>
284 <widget class="QWidget" name="buttonsTab">
285 <attribute name="title">
286 <string>Buttons</string>
287 </attribute>
288 <layout class="QVBoxLayout" name="verticalLayout_2"/>
289 </widget>
290 </widget>
291 </item>
292 </layout>
293 </widget>
294 <resources/>
295 <connections/>
296 <slots>
297 <signal>ControlsChanged()</signal>
298 <signal>MainStickCleared()</signal>
299 <signal>CStickCleared()</signal>
300 <signal>DPadCleared()</signal>
301 <signal>ButtonsCleared()</signal>
302 <slot>OnControlsChanged()</slot>
303 <slot>OnMainStickCleared()</slot>
304 <slot>OnCStickCleared()</slot>
305 <slot>OnDPadCleared()</slot>
306 <slot>OnButtonsCleared()</slot>
307 </slots>
308</ui>
diff --git a/src/citra_qt/src/config/controller_config_util.cpp b/src/citra_qt/src/config/controller_config_util.cpp
new file mode 100644
index 000000000..c5426570b
--- /dev/null
+++ b/src/citra_qt/src/config/controller_config_util.cpp
@@ -0,0 +1,121 @@
1#include <QPushButton>
2#include <QStyle>
3#include <QGridLayout>
4#include <QKeyEvent>
5#include <QHBoxLayout>
6#include <QLabel>
7
8#include "controller_config_util.hxx"
9
10/* TODO(bunnei): ImplementMe
11GStickConfig::GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent) : QWidget(parent)
12{
13 left = new GKeyConfigButton(leftid, style()->standardIcon(QStyle::SP_ArrowLeft), QString(), change_receiver, this);
14 right = new GKeyConfigButton(rightid, style()->standardIcon(QStyle::SP_ArrowRight), QString(), change_receiver, this);
15 up = new GKeyConfigButton(upid, style()->standardIcon(QStyle::SP_ArrowUp), QString(), change_receiver, this);
16 down = new GKeyConfigButton(downid, style()->standardIcon(QStyle::SP_ArrowDown), QString(), change_receiver, this);
17 clear = new QPushButton(tr("Clear"), this);
18
19 QGridLayout* layout = new QGridLayout(this);
20 layout->addWidget(left, 1, 0);
21 layout->addWidget(right, 1, 2);
22 layout->addWidget(up, 0, 1);
23 layout->addWidget(down, 2, 1);
24 layout->addWidget(clear, 1, 1);
25
26 setLayout(layout);
27}
28
29GKeyConfigButton::GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent) : QPushButton(icon, text, parent), id(id), inputGrabbed(false)
30{
31 connect(this, SIGNAL(clicked()), this, SLOT(OnClicked()));
32 connect(this, SIGNAL(KeyAssigned(common::Config::Control, int, const QString&)), change_receiver, SLOT(OnKeyConfigChanged(common::Config::Control, int, const QString&)));
33 connect(change_receiver, SIGNAL(ActivePortChanged(const common::Config::ControllerPort&)), this, SLOT(OnActivePortChanged(const common::Config::ControllerPort&)));
34}
35
36GKeyConfigButton::GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent) : QPushButton(text, parent), id(id), inputGrabbed(false)
37{
38 connect(this, SIGNAL(clicked()), this, SLOT(OnClicked()));
39 connect(this, SIGNAL(KeyAssigned(common::Config::Control, int, const QString&)), change_receiver, SLOT(OnKeyConfigChanged(common::Config::Control, int, const QString&)));
40 connect(change_receiver, SIGNAL(ActivePortChanged(const common::Config::ControllerPort&)), this, SLOT(OnActivePortChanged(const common::Config::ControllerPort&)));
41}
42
43void GKeyConfigButton::OnActivePortChanged(const common::Config::ControllerPort& config)
44{
45 // TODO: Doesn't use joypad struct if that's the input source...
46 QString text = QKeySequence(config.keys.key_code[id]).toString(); // has a nicer format
47 if (config.keys.key_code[id] == Qt::Key_Shift) text = tr("Shift");
48 else if (config.keys.key_code[id] == Qt::Key_Control) text = tr("Control");
49 else if (config.keys.key_code[id] == Qt::Key_Alt) text = tr("Alt");
50 else if (config.keys.key_code[id] == Qt::Key_Meta) text = tr("Meta");
51 setText(text);
52}
53
54void GKeyConfigButton::OnClicked()
55{
56 grabKeyboard();
57 grabMouse();
58 inputGrabbed = true;
59
60 old_text = text();
61 setText(tr("Input..."));
62}
63
64void GKeyConfigButton::keyPressEvent(QKeyEvent* event)
65{
66 if (inputGrabbed)
67 {
68 releaseKeyboard();
69 releaseMouse();
70 setText(QString());
71
72 // TODO: Doesn't capture "return" key
73 // TODO: This doesn't quite work well, yet... find a better way
74 QString text = QKeySequence(event->key()).toString(); // has a nicer format than event->text()
75 int key = event->key();
76 if (event->modifiers() == Qt::ShiftModifier) { text = tr("Shift"); key = Qt::Key_Shift; }
77 else if (event->modifiers() == Qt::ControlModifier) { text = tr("Ctrl"); key = Qt::Key_Control; }
78 else if (event->modifiers() == Qt::AltModifier) { text = tr("Alt"); key = Qt::Key_Alt; }
79 else if (event->modifiers() == Qt::MetaModifier) { text = tr("Meta"); key = Qt::Key_Meta; }
80
81 setText(old_text);
82 emit KeyAssigned(id, key, text);
83
84 inputGrabbed = false;
85
86 // TODO: Keys like "return" cause another keyPressEvent to be generated after this one...
87 }
88
89 QPushButton::keyPressEvent(event); // TODO: Necessary?
90}
91
92void GKeyConfigButton::mousePressEvent(QMouseEvent* event)
93{
94 // Abort key assignment
95 if (inputGrabbed)
96 {
97 releaseKeyboard();
98 releaseMouse();
99 setText(old_text);
100 inputGrabbed = false;
101 }
102
103 QAbstractButton::mousePressEvent(event);
104}
105
106GButtonConfigGroup::GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent) : QWidget(parent), id(id)
107{
108 QHBoxLayout* layout = new QHBoxLayout(this);
109
110 QPushButton* clear_button = new QPushButton(tr("Clear"));
111
112 layout->addWidget(new QLabel(name, this));
113 layout->addWidget(config_button = new GKeyConfigButton(id, QString(), change_receiver, this));
114 layout->addWidget(clear_button);
115
116 // TODO: connect config_button, clear_button
117
118 setLayout(layout);
119}
120
121*/ \ No newline at end of file
diff --git a/src/citra_qt/src/config/controller_config_util.hxx b/src/citra_qt/src/config/controller_config_util.hxx
new file mode 100644
index 000000000..af38f126c
--- /dev/null
+++ b/src/citra_qt/src/config/controller_config_util.hxx
@@ -0,0 +1,78 @@
1#ifndef _CONTROLLER_CONFIG_UTIL_HXX_
2#define _CONTROLLER_CONFIG_UTIL_HXX_
3
4#include <QWidget>
5#include <QPushButton>
6
7/* TODO(bunnei): ImplementMe
8
9#include "config.h"
10
11class GStickConfig : public QWidget
12{
13 Q_OBJECT
14
15public:
16 // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot!
17 GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent = NULL);
18
19signals:
20 void LeftChanged();
21 void RightChanged();
22 void UpChanged();
23 void DownChanged();
24
25private:
26 QPushButton* left;
27 QPushButton* right;
28 QPushButton* up;
29 QPushButton* down;
30
31 QPushButton* clear;
32};
33
34class GKeyConfigButton : public QPushButton
35{
36 Q_OBJECT
37
38public:
39 // TODO: change_receiver also needs to have an ActivePortChanged(const common::Config::ControllerPort&) signal
40 // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot!
41 GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent);
42 GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent);
43
44signals:
45 void KeyAssigned(common::Config::Control id, int key, const QString& text);
46
47private slots:
48 void OnActivePortChanged(const common::Config::ControllerPort& config);
49
50 void OnClicked();
51
52 void keyPressEvent(QKeyEvent* event); // TODO: bGrabbed?
53 void mousePressEvent(QMouseEvent* event);
54
55private:
56 common::Config::Control id;
57 bool inputGrabbed;
58
59 QString old_text;
60};
61
62class GButtonConfigGroup : public QWidget
63{
64 Q_OBJECT
65
66public:
67 // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot!
68 GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent = NULL);
69
70private:
71 GKeyConfigButton* config_button;
72
73 common::Config::Control id;
74};
75
76*/
77
78#endif // _CONTROLLER_CONFIG_HXX_
diff --git a/src/citra_qt/src/config/ui_controller_config.h b/src/citra_qt/src/config/ui_controller_config.h
new file mode 100644
index 000000000..f84364a77
--- /dev/null
+++ b/src/citra_qt/src/config/ui_controller_config.h
@@ -0,0 +1,222 @@
1/********************************************************************************
2** Form generated from reading UI file 'controller_config.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_CONTROLLER_CONFIG_H
10#define UI_CONTROLLER_CONFIG_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QCheckBox>
17#include <QtGui/QComboBox>
18#include <QtGui/QGridLayout>
19#include <QtGui/QHeaderView>
20#include <QtGui/QLabel>
21#include <QtGui/QSpacerItem>
22#include <QtGui/QTabWidget>
23#include <QtGui/QVBoxLayout>
24#include <QtGui/QWidget>
25
26QT_BEGIN_NAMESPACE
27
28class Ui_ControllerConfig
29{
30public:
31 QVBoxLayout *verticalLayout;
32 QGridLayout *gridLayout;
33 QComboBox *activeControllerCB;
34 QSpacerItem *horizontalSpacer;
35 QCheckBox *checkBox;
36 QComboBox *inputSourceCB;
37 QLabel *label_2;
38 QLabel *label;
39 QTabWidget *tabWidget;
40 QWidget *mainStickTab;
41 QGridLayout *gridLayout_3;
42 QSpacerItem *verticalSpacer_2;
43 QSpacerItem *verticalSpacer_3;
44 QSpacerItem *horizontalSpacer_4;
45 QSpacerItem *horizontalSpacer_3;
46 QWidget *cStickTab;
47 QGridLayout *gridLayout_4;
48 QSpacerItem *horizontalSpacer_6;
49 QSpacerItem *verticalSpacer_5;
50 QSpacerItem *verticalSpacer_4;
51 QSpacerItem *horizontalSpacer_5;
52 QWidget *dPadTab;
53 QGridLayout *gridLayout_5;
54 QSpacerItem *horizontalSpacer_7;
55 QSpacerItem *verticalSpacer_7;
56 QSpacerItem *verticalSpacer_6;
57 QSpacerItem *horizontalSpacer_8;
58 QWidget *buttonsTab;
59 QVBoxLayout *verticalLayout_2;
60
61 void setupUi(QWidget *ControllerConfig)
62 {
63 if (ControllerConfig->objectName().isEmpty())
64 ControllerConfig->setObjectName(QString::fromUtf8("ControllerConfig"));
65 ControllerConfig->resize(503, 293);
66 QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
67 sizePolicy.setHorizontalStretch(0);
68 sizePolicy.setVerticalStretch(0);
69 sizePolicy.setHeightForWidth(ControllerConfig->sizePolicy().hasHeightForWidth());
70 ControllerConfig->setSizePolicy(sizePolicy);
71 verticalLayout = new QVBoxLayout(ControllerConfig);
72 verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
73 verticalLayout->setSizeConstraint(QLayout::SetFixedSize);
74 gridLayout = new QGridLayout();
75 gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
76 activeControllerCB = new QComboBox(ControllerConfig);
77 activeControllerCB->setObjectName(QString::fromUtf8("activeControllerCB"));
78
79 gridLayout->addWidget(activeControllerCB, 1, 1, 1, 1);
80
81 horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
82
83 gridLayout->addItem(horizontalSpacer, 0, 2, 1, 1);
84
85 checkBox = new QCheckBox(ControllerConfig);
86 checkBox->setObjectName(QString::fromUtf8("checkBox"));
87
88 gridLayout->addWidget(checkBox, 1, 2, 1, 1);
89
90 inputSourceCB = new QComboBox(ControllerConfig);
91 inputSourceCB->setObjectName(QString::fromUtf8("inputSourceCB"));
92
93 gridLayout->addWidget(inputSourceCB, 0, 1, 1, 1);
94
95 label_2 = new QLabel(ControllerConfig);
96 label_2->setObjectName(QString::fromUtf8("label_2"));
97
98 gridLayout->addWidget(label_2, 1, 0, 1, 1);
99
100 label = new QLabel(ControllerConfig);
101 label->setObjectName(QString::fromUtf8("label"));
102
103 gridLayout->addWidget(label, 0, 0, 1, 1);
104
105
106 verticalLayout->addLayout(gridLayout);
107
108 tabWidget = new QTabWidget(ControllerConfig);
109 tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
110 mainStickTab = new QWidget();
111 mainStickTab->setObjectName(QString::fromUtf8("mainStickTab"));
112 gridLayout_3 = new QGridLayout(mainStickTab);
113 gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
114 verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
115
116 gridLayout_3->addItem(verticalSpacer_2, 2, 2, 1, 1);
117
118 verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
119
120 gridLayout_3->addItem(verticalSpacer_3, 0, 2, 1, 1);
121
122 horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
123
124 gridLayout_3->addItem(horizontalSpacer_4, 1, 0, 1, 1);
125
126 horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
127
128 gridLayout_3->addItem(horizontalSpacer_3, 1, 4, 1, 1);
129
130 tabWidget->addTab(mainStickTab, QString());
131 cStickTab = new QWidget();
132 cStickTab->setObjectName(QString::fromUtf8("cStickTab"));
133 gridLayout_4 = new QGridLayout(cStickTab);
134 gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
135 horizontalSpacer_6 = new QSpacerItem(40, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
136
137 gridLayout_4->addItem(horizontalSpacer_6, 1, 0, 1, 1);
138
139 verticalSpacer_5 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
140
141 gridLayout_4->addItem(verticalSpacer_5, 0, 1, 1, 1);
142
143 verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
144
145 gridLayout_4->addItem(verticalSpacer_4, 2, 1, 1, 1);
146
147 horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
148
149 gridLayout_4->addItem(horizontalSpacer_5, 1, 2, 1, 1);
150
151 tabWidget->addTab(cStickTab, QString());
152 dPadTab = new QWidget();
153 dPadTab->setObjectName(QString::fromUtf8("dPadTab"));
154 gridLayout_5 = new QGridLayout(dPadTab);
155 gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
156 horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
157
158 gridLayout_5->addItem(horizontalSpacer_7, 1, 2, 1, 1);
159
160 verticalSpacer_7 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
161
162 gridLayout_5->addItem(verticalSpacer_7, 0, 1, 1, 1);
163
164 verticalSpacer_6 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
165
166 gridLayout_5->addItem(verticalSpacer_6, 2, 1, 1, 1);
167
168 horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
169
170 gridLayout_5->addItem(horizontalSpacer_8, 1, 0, 1, 1);
171
172 tabWidget->addTab(dPadTab, QString());
173 buttonsTab = new QWidget();
174 buttonsTab->setObjectName(QString::fromUtf8("buttonsTab"));
175 verticalLayout_2 = new QVBoxLayout(buttonsTab);
176 verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
177 tabWidget->addTab(buttonsTab, QString());
178
179 verticalLayout->addWidget(tabWidget);
180
181
182 retranslateUi(ControllerConfig);
183
184 tabWidget->setCurrentIndex(0);
185
186
187 QMetaObject::connectSlotsByName(ControllerConfig);
188 } // setupUi
189
190 void retranslateUi(QWidget *ControllerConfig)
191 {
192 ControllerConfig->setWindowTitle(QApplication::translate("ControllerConfig", "Controller Configuration", 0, QApplication::UnicodeUTF8));
193 activeControllerCB->clear();
194 activeControllerCB->insertItems(0, QStringList()
195 << QApplication::translate("ControllerConfig", "Controller 1", 0, QApplication::UnicodeUTF8)
196 << QApplication::translate("ControllerConfig", "Controller 2", 0, QApplication::UnicodeUTF8)
197 << QApplication::translate("ControllerConfig", "Controller 3", 0, QApplication::UnicodeUTF8)
198 << QApplication::translate("ControllerConfig", "Controller 4", 0, QApplication::UnicodeUTF8)
199 );
200 checkBox->setText(QApplication::translate("ControllerConfig", "Enabled", 0, QApplication::UnicodeUTF8));
201 inputSourceCB->clear();
202 inputSourceCB->insertItems(0, QStringList()
203 << QApplication::translate("ControllerConfig", "Keyboard", 0, QApplication::UnicodeUTF8)
204 << QApplication::translate("ControllerConfig", "Joypad", 0, QApplication::UnicodeUTF8)
205 );
206 label_2->setText(QApplication::translate("ControllerConfig", "Active Controller:", 0, QApplication::UnicodeUTF8));
207 label->setText(QApplication::translate("ControllerConfig", "Input Source:", 0, QApplication::UnicodeUTF8));
208 tabWidget->setTabText(tabWidget->indexOf(mainStickTab), QApplication::translate("ControllerConfig", "Main Stick", 0, QApplication::UnicodeUTF8));
209 tabWidget->setTabText(tabWidget->indexOf(cStickTab), QApplication::translate("ControllerConfig", "C-Stick", 0, QApplication::UnicodeUTF8));
210 tabWidget->setTabText(tabWidget->indexOf(dPadTab), QApplication::translate("ControllerConfig", "D-Pad", 0, QApplication::UnicodeUTF8));
211 tabWidget->setTabText(tabWidget->indexOf(buttonsTab), QApplication::translate("ControllerConfig", "Buttons", 0, QApplication::UnicodeUTF8));
212 } // retranslateUi
213
214};
215
216namespace Ui {
217 class ControllerConfig: public Ui_ControllerConfig {};
218} // namespace Ui
219
220QT_END_NAMESPACE
221
222#endif // UI_CONTROLLER_CONFIG_H
diff --git a/src/citra_qt/src/cpu_regs.cpp b/src/citra_qt/src/cpu_regs.cpp
new file mode 100644
index 000000000..5d240b4bc
--- /dev/null
+++ b/src/citra_qt/src/cpu_regs.cpp
@@ -0,0 +1,64 @@
1#include "cpu_regs.hxx"
2
3//#include "powerpc/cpu_core_regs.h"
4
5GARM11RegsView::GARM11RegsView(QWidget* parent) : QDockWidget(parent)
6{
7 cpu_regs_ui.setupUi(this);
8
9 tree = cpu_regs_ui.treeWidget;
10 tree->addTopLevelItem(registers = new QTreeWidgetItem(QStringList("Registers")));
11 tree->addTopLevelItem(CSPR = new QTreeWidgetItem(QStringList("CSPR")));
12
13 //const Qt::ItemFlags child_flags = Qt::ItemIsEditable | Qt::ItemIsEnabled;
14 //registers->setFlags(child_flags);
15 //CSPR->setFlags(child_flags);
16
17 for (int i = 0; i < 16; ++i)
18 {
19 QTreeWidgetItem* child = new QTreeWidgetItem(QStringList(QString("R[%1]").arg(i, 2, 10, QLatin1Char('0'))));
20 //child->setFlags(child_flags);
21 registers->addChild(child);
22 }
23
24 CSPR->addChild(new QTreeWidgetItem(QStringList("M")));
25 CSPR->addChild(new QTreeWidgetItem(QStringList("T")));
26 CSPR->addChild(new QTreeWidgetItem(QStringList("F")));
27 CSPR->addChild(new QTreeWidgetItem(QStringList("I")));
28 CSPR->addChild(new QTreeWidgetItem(QStringList("A")));
29 CSPR->addChild(new QTreeWidgetItem(QStringList("E")));
30 CSPR->addChild(new QTreeWidgetItem(QStringList("IT")));
31 CSPR->addChild(new QTreeWidgetItem(QStringList("GE")));
32 CSPR->addChild(new QTreeWidgetItem(QStringList("DNM")));
33 CSPR->addChild(new QTreeWidgetItem(QStringList("J")));
34 CSPR->addChild(new QTreeWidgetItem(QStringList("Q")));
35 CSPR->addChild(new QTreeWidgetItem(QStringList("V")));
36 CSPR->addChild(new QTreeWidgetItem(QStringList("C")));
37 CSPR->addChild(new QTreeWidgetItem(QStringList("Z")));
38 CSPR->addChild(new QTreeWidgetItem(QStringList("N")));
39}
40
41void GARM11RegsView::OnCPUStepped()
42{
43 //TODO (Vail) replace values
44 int value = 0;
45 for (int i = 0; i < 16; ++i)
46 registers->child(i)->setText(1, QString("0x%1").arg(i, 8, 16, QLatin1Char('0')));
47
48 CSPR->child(0)->setText(1, QString("%1").arg(value));
49 CSPR->child(1)->setText(1, QString("%1").arg(value));
50 CSPR->child(2)->setText(1, QString("%1").arg(value));
51 CSPR->child(3)->setText(1, QString("%1").arg(value));
52 CSPR->child(4)->setText(1, QString("%1").arg(value));
53 CSPR->child(5)->setText(1, QString("%1").arg(value));
54 CSPR->child(6)->setText(1, QString("%1").arg(value));
55 CSPR->child(7)->setText(1, QString("%1").arg(value));
56 CSPR->child(8)->setText(1, QString("%1").arg(value));
57 CSPR->child(9)->setText(1, QString("%1").arg(value));
58 CSPR->child(10)->setText(1, QString("%1").arg(value));
59 CSPR->child(11)->setText(1, QString("%1").arg(value));
60 CSPR->child(12)->setText(1, QString("%1").arg(value));
61 CSPR->child(13)->setText(1, QString("%1").arg(value));
62 CSPR->child(14)->setText(1, QString("%1").arg(value));
63 CSPR->child(15)->setText(1, QString("%1").arg(value));
64}
diff --git a/src/citra_qt/src/cpu_regs.hxx b/src/citra_qt/src/cpu_regs.hxx
new file mode 100644
index 000000000..27c194bde
--- /dev/null
+++ b/src/citra_qt/src/cpu_regs.hxx
@@ -0,0 +1,27 @@
1#include "ui_cpu_regs.h"
2
3#include <QDockWidget>
4#include <QTreeWidgetItem>
5
6//#include "ui_gekko_regs.h"
7
8class QTreeWidget;
9
10class GARM11RegsView : public QDockWidget
11{
12 Q_OBJECT
13
14public:
15 GARM11RegsView(QWidget* parent = NULL);
16
17public slots:
18 void OnCPUStepped();
19
20private:
21 Ui::ARMRegisters cpu_regs_ui;
22
23 QTreeWidget* tree;
24
25 QTreeWidgetItem* registers;
26 QTreeWidgetItem* CSPR;
27};
diff --git a/src/citra_qt/src/cpu_regs.ui b/src/citra_qt/src/cpu_regs.ui
new file mode 100644
index 000000000..6537c9cd6
--- /dev/null
+++ b/src/citra_qt/src/cpu_regs.ui
@@ -0,0 +1,40 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>ARMRegisters</class>
4 <widget class="QDockWidget" name="ARMRegisters">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>400</width>
10 <height>300</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>ARM registers</string>
15 </property>
16 <widget class="QWidget" name="dockWidgetContents">
17 <layout class="QVBoxLayout" name="verticalLayout">
18 <item>
19 <widget class="QTreeWidget" name="treeWidget">
20 <property name="alternatingRowColors">
21 <bool>true</bool>
22 </property>
23 <column>
24 <property name="text">
25 <string>Register</string>
26 </property>
27 </column>
28 <column>
29 <property name="text">
30 <string>Value</string>
31 </property>
32 </column>
33 </widget>
34 </item>
35 </layout>
36 </widget>
37 </widget>
38 <resources/>
39 <connections/>
40</ui>
diff --git a/src/citra_qt/src/disasm.cpp b/src/citra_qt/src/disasm.cpp
new file mode 100644
index 000000000..6e4087b23
--- /dev/null
+++ b/src/citra_qt/src/disasm.cpp
@@ -0,0 +1,144 @@
1#include <QtGui>
2#include "ui_disasm.h"
3#include "disasm.hxx"
4
5#include "bootmanager.hxx"
6#include "hotkeys.hxx"
7
8#include "common.h"
9#include "mem_map.h"
10
11#include "break_points.h"
12//#include "powerpc/cpu_core_regs.h"
13#include "arm/disassembler/arm_disasm.h"
14
15//#include "powerpc/interpreter/cpu_int.h"
16
17GDisAsmView::GDisAsmView(QWidget* parent, EmuThread& emu_thread) : QDockWidget(parent), base_addr(0), emu_thread(emu_thread)
18{
19 disasm_ui.setupUi(this);
20
21 breakpoints = new BreakPoints();
22
23 model = new QStandardItemModel(this);
24 model->setColumnCount(3);
25 disasm_ui.treeView->setModel(model);
26
27 RegisterHotkey("Disassembler", "Step", QKeySequence(Qt::Key_F10), Qt::ApplicationShortcut);
28 RegisterHotkey("Disassembler", "Step into", QKeySequence(Qt::Key_F11), Qt::ApplicationShortcut);
29// RegisterHotkey("Disassembler", "Pause", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut);
30 RegisterHotkey("Disassembler", "Continue", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut);
31 RegisterHotkey("Disassembler", "Set Breakpoint", QKeySequence(Qt::Key_F9), Qt::ApplicationShortcut);
32
33 connect(disasm_ui.button_breakpoint, SIGNAL(clicked()), this, SLOT(OnSetBreakpoint()));
34 connect(disasm_ui.button_step, SIGNAL(clicked()), this, SLOT(OnStep()));
35 connect(disasm_ui.button_pause, SIGNAL(clicked()), this, SLOT(OnPause()));
36 connect(disasm_ui.button_continue, SIGNAL(clicked()), this, SLOT(OnContinue()));
37 connect(GetHotkey("Disassembler", "Step", this), SIGNAL(activated()), this, SLOT(OnStep()));
38 connect(GetHotkey("Disassembler", "Step into", this), SIGNAL(activated()), this, SLOT(OnStepInto()));
39// connect(GetHotkey("Disassembler", "Pause", this), SIGNAL(activated()), this, SLOT(OnPause()));
40 connect(GetHotkey("Disassembler", "Continue", this), SIGNAL(activated()), this, SLOT(OnContinue()));
41 connect(GetHotkey("Disassembler", "Set Breakpoint", this), SIGNAL(activated()), this, SLOT(OnSetBreakpoint()));
42}
43
44void GDisAsmView::OnSetBreakpoint()
45{
46 if (SelectedRow() == -1)
47 return;
48
49 u32 address = base_addr + 4 * SelectedRow();
50 if (breakpoints->IsAddressBreakPoint(address))
51 {
52 breakpoints->Remove(address);
53 model->item(SelectedRow(), 0)->setBackground(QBrush());
54 model->item(SelectedRow(), 1)->setBackground(QBrush());
55 model->item(SelectedRow(), 2)->setBackground(QBrush());
56 }
57 else
58 {
59 breakpoints->Add(address);
60 model->item(SelectedRow(), 0)->setBackground(Qt::red);
61 model->item(SelectedRow(), 1)->setBackground(Qt::red);
62 model->item(SelectedRow(), 2)->setBackground(Qt::red);
63 }
64}
65
66void GDisAsmView::OnStep()
67{
68 emu_thread.SetCpuRunning(false);
69 emu_thread.ExecStep();
70}
71
72void GDisAsmView::OnPause()
73{
74 emu_thread.SetCpuRunning(false);
75}
76
77void GDisAsmView::OnContinue()
78{
79 emu_thread.SetCpuRunning(true);
80}
81
82void GDisAsmView::OnCPUStepped()
83{
84 /*
85 base_addr = ireg.PC - 52;
86 unsigned int curInstAddr = base_addr;
87 int counter = 0;
88 QModelIndex cur_instr_index;
89 model->setRowCount(100);
90 while(true)
91 {
92 u32 opcode = *(u32*)(&Mem_RAM[curInstAddr & RAM_MASK]);
93
94 char out1[64];
95 char out2[128];
96 u32 out3 = 0;
97 memset(out1, 0, sizeof(out1));
98 memset(out2, 0, sizeof(out2));
99
100 // NOTE: out3 (nextInstAddr) seems to be bugged, better don't use it...
101 DisassembleGekko(out1, out2, opcode, curInstAddr, &out3);
102 model->setItem(counter, 0, new QStandardItem(QString("0x%1").arg((uint)curInstAddr, 8, 16, QLatin1Char('0'))));
103 model->setItem(counter, 1, new QStandardItem(QString(out1)));
104 model->setItem(counter, 2, new QStandardItem(QString(out2)));
105
106 if (ireg.PC == curInstAddr)
107 {
108 model->item(counter, 0)->setBackground(Qt::yellow);
109 model->item(counter, 1)->setBackground(Qt::yellow);
110 model->item(counter, 2)->setBackground(Qt::yellow);
111 cur_instr_index = model->index(counter, 0);
112 }
113 else if (Debugger::IsBreakpoint(curInstAddr))
114 {
115 model->item(counter, 0)->setBackground(Qt::red);
116 model->item(counter, 1)->setBackground(Qt::red);
117 model->item(counter, 2)->setBackground(Qt::red);
118 }
119 else
120 {
121 model->item(counter, 0)->setBackground(QBrush());
122 model->item(counter, 1)->setBackground(QBrush());
123 model->item(counter, 2)->setBackground(QBrush());
124 }
125 curInstAddr += 4;
126
127 ++counter;
128 if (counter >= 100) break;
129 }
130 disasm_ui.treeView->resizeColumnToContents(0);
131 disasm_ui.treeView->resizeColumnToContents(1);
132 disasm_ui.treeView->resizeColumnToContents(2);
133 disasm_ui.treeView->scrollTo(cur_instr_index); // QAbstractItemView::PositionAtCenter?
134 */
135}
136
137int GDisAsmView::SelectedRow()
138{
139 QModelIndex index = disasm_ui.treeView->selectionModel()->currentIndex();
140 if (!index.isValid())
141 return -1;
142
143 return model->itemFromIndex(disasm_ui.treeView->selectionModel()->currentIndex())->row();
144} \ No newline at end of file
diff --git a/src/citra_qt/src/disasm.hxx b/src/citra_qt/src/disasm.hxx
new file mode 100644
index 000000000..648107114
--- /dev/null
+++ b/src/citra_qt/src/disasm.hxx
@@ -0,0 +1,38 @@
1#include <QDockWidget>
2#include "ui_disasm.h"
3
4#include "common.h"
5#include "break_points.h"
6
7class QAction;
8class QStandardItemModel;
9class EmuThread;
10
11class GDisAsmView : public QDockWidget
12{
13 Q_OBJECT
14
15public:
16 GDisAsmView(QWidget* parent, EmuThread& emu_thread);
17
18public slots:
19 void OnSetBreakpoint();
20 void OnStep();
21 void OnPause();
22 void OnContinue();
23
24 void OnCPUStepped();
25
26private:
27 // returns -1 if no row is selected
28 int SelectedRow();
29
30 Ui::DockWidget disasm_ui;
31 QStandardItemModel* model;
32
33 u32 base_addr;
34
35 BreakPoints* breakpoints;
36
37 EmuThread& emu_thread;
38};
diff --git a/src/citra_qt/src/disasm.ui b/src/citra_qt/src/disasm.ui
new file mode 100644
index 000000000..fb3845164
--- /dev/null
+++ b/src/citra_qt/src/disasm.ui
@@ -0,0 +1,78 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>DockWidget</class>
4 <widget class="QDockWidget" name="DockWidget">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>430</width>
10 <height>401</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Disassembly</string>
15 </property>
16 <widget class="QWidget" name="dockWidgetContents">
17 <layout class="QVBoxLayout" name="verticalLayout">
18 <item>
19 <layout class="QHBoxLayout" name="horizontalLayout">
20 <item>
21 <widget class="QPushButton" name="button_step">
22 <property name="text">
23 <string>Step</string>
24 </property>
25 </widget>
26 </item>
27 <item>
28 <widget class="QPushButton" name="button_pause">
29 <property name="text">
30 <string>Pause</string>
31 </property>
32 </widget>
33 </item>
34 <item>
35 <widget class="QPushButton" name="button_continue">
36 <property name="text">
37 <string>Continue</string>
38 </property>
39 </widget>
40 </item>
41 <item>
42 <widget class="QPushButton" name="pushButton">
43 <property name="text">
44 <string>Step Into</string>
45 </property>
46 </widget>
47 </item>
48 <item>
49 <widget class="QPushButton" name="button_breakpoint">
50 <property name="text">
51 <string>Set Breakpoint</string>
52 </property>
53 </widget>
54 </item>
55 </layout>
56 </item>
57 <item>
58 <widget class="QTreeView" name="treeView">
59 <property name="alternatingRowColors">
60 <bool>true</bool>
61 </property>
62 <property name="indentation">
63 <number>20</number>
64 </property>
65 <property name="rootIsDecorated">
66 <bool>false</bool>
67 </property>
68 <attribute name="headerVisible">
69 <bool>false</bool>
70 </attribute>
71 </widget>
72 </item>
73 </layout>
74 </widget>
75 </widget>
76 <resources/>
77 <connections/>
78</ui>
diff --git a/src/citra_qt/src/hotkeys.cpp b/src/citra_qt/src/hotkeys.cpp
new file mode 100644
index 000000000..1aa1e8b96
--- /dev/null
+++ b/src/citra_qt/src/hotkeys.cpp
@@ -0,0 +1,111 @@
1#include <QKeySequence>
2#include <QSettings>
3#include "hotkeys.hxx"
4#include <map>
5
6struct Hotkey
7{
8 Hotkey() : shortcut(NULL), context(Qt::WindowShortcut) {}
9
10 QKeySequence keyseq;
11 QShortcut* shortcut;
12 Qt::ShortcutContext context;
13};
14
15typedef std::map<QString, Hotkey> HotkeyMap;
16typedef std::map<QString, HotkeyMap> HotkeyGroupMap;
17
18HotkeyGroupMap hotkey_groups;
19
20void SaveHotkeys(QSettings& settings)
21{
22 settings.beginGroup("Shortcuts");
23
24 for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group)
25 {
26 settings.beginGroup(group->first);
27 for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey)
28 {
29 settings.beginGroup(hotkey->first);
30 settings.setValue(QString("KeySeq"), hotkey->second.keyseq.toString());
31 settings.setValue(QString("Context"), hotkey->second.context);
32 settings.endGroup();
33 }
34 settings.endGroup();
35 }
36 settings.endGroup();
37}
38
39void LoadHotkeys(QSettings& settings)
40{
41 settings.beginGroup("Shortcuts");
42
43 // Make sure NOT to use a reference here because it would become invalid once we call beginGroup()
44 QStringList groups = settings.childGroups();
45 for (QList<QString>::iterator group = groups.begin(); group != groups.end(); ++group)
46 {
47 settings.beginGroup(*group);
48
49 QStringList hotkeys = settings.childGroups();
50 for (QList<QString>::iterator hotkey = hotkeys.begin(); hotkey != hotkeys.end(); ++hotkey)
51 {
52 settings.beginGroup(*hotkey);
53
54 // RegisterHotkey assigns default keybindings, so use old values as default parameters
55 Hotkey& hk = hotkey_groups[*group][*hotkey];
56 hk.keyseq = QKeySequence::fromString(settings.value("KeySeq", hk.keyseq.toString()).toString());
57 hk.context = (Qt::ShortcutContext)settings.value("Context", hk.context).toInt();
58 if (hk.shortcut)
59 hk.shortcut->setKey(hk.keyseq);
60
61 settings.endGroup();
62 }
63
64 settings.endGroup();
65 }
66
67 settings.endGroup();
68}
69
70void RegisterHotkey(const QString& group, const QString& action, const QKeySequence& default_keyseq, Qt::ShortcutContext default_context)
71{
72 if (hotkey_groups[group].find(action) == hotkey_groups[group].end())
73 {
74 hotkey_groups[group][action].keyseq = default_keyseq;
75 hotkey_groups[group][action].context = default_context;
76 }
77}
78
79QShortcut* GetHotkey(const QString& group, const QString& action, QWidget* widget)
80{
81 Hotkey& hk = hotkey_groups[group][action];
82
83 if (!hk.shortcut)
84 hk.shortcut = new QShortcut(hk.keyseq, widget, NULL, NULL, hk.context);
85
86 return hk.shortcut;
87}
88
89
90GHotkeysDialog::GHotkeysDialog(QWidget* parent): QDialog(parent)
91{
92 ui.setupUi(this);
93
94 for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group)
95 {
96 QTreeWidgetItem* toplevel_item = new QTreeWidgetItem(QStringList(group->first));
97 for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey)
98 {
99 QStringList columns;
100 columns << hotkey->first << hotkey->second.keyseq.toString();
101 QTreeWidgetItem* item = new QTreeWidgetItem(columns);
102 toplevel_item->addChild(item);
103 }
104 ui.treeWidget->addTopLevelItem(toplevel_item);
105 }
106 // TODO: Make context configurable as well (hiding the column for now)
107 ui.treeWidget->setColumnCount(2);
108
109 ui.treeWidget->resizeColumnToContents(0);
110 ui.treeWidget->resizeColumnToContents(1);
111}
diff --git a/src/citra_qt/src/hotkeys.hxx b/src/citra_qt/src/hotkeys.hxx
new file mode 100644
index 000000000..66ef7bb4e
--- /dev/null
+++ b/src/citra_qt/src/hotkeys.hxx
@@ -0,0 +1,50 @@
1#include <QShortcut>
2#include <QDialog>
3#include "ui_hotkeys.h"
4
5class QKeySequence;
6class QSettings;
7
8/**
9 * Register a hotkey.
10 *
11 * @param group General group this hotkey belongs to (e.g. "Main Window", "Debugger")
12 * @param action Name of the action (e.g. "Start Emulation", "Load Image")
13 * @param default_keyseq Default key sequence to assign if the hotkey wasn't present in the settings file before
14 * @param default_context Default context to assign if the hotkey wasn't present in the settings file before
15 * @warning Both the group and action strings will be displayed in the hotkey settings dialog
16 */
17void RegisterHotkey(const QString& group, const QString& action, const QKeySequence& default_keyseq = QKeySequence(), Qt::ShortcutContext default_context = Qt::WindowShortcut);
18
19/**
20 * Returns a QShortcut object whose activated() signal can be connected to other QObjects' slots.
21 *
22 * @param widget Parent widget of the returned QShortcut.
23 * @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.
24 */
25QShortcut* GetHotkey(const QString& group, const QString& action, QWidget* widget);
26
27/**
28 * Saves all registered hotkeys to the settings file.
29 *
30 * @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.
31 */
32void SaveHotkeys(QSettings& settings);
33
34/**
35 * Loads hotkeys from the settings file.
36 *
37 * @note Yet unregistered hotkeys which are present in the settings will automatically be registered.
38 */
39void LoadHotkeys(QSettings& settings);
40
41class GHotkeysDialog : public QDialog
42{
43 Q_OBJECT
44
45public:
46 GHotkeysDialog(QWidget* parent = NULL);
47
48private:
49 Ui::hotkeys ui;
50};
diff --git a/src/citra_qt/src/hotkeys.ui b/src/citra_qt/src/hotkeys.ui
new file mode 100644
index 000000000..38a9a14d1
--- /dev/null
+++ b/src/citra_qt/src/hotkeys.ui
@@ -0,0 +1,89 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>hotkeys</class>
4 <widget class="QDialog" name="hotkeys">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>363</width>
10 <height>388</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Hotkey Settings</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">
17 <item>
18 <widget class="QTreeWidget" name="treeWidget">
19 <property name="selectionBehavior">
20 <enum>QAbstractItemView::SelectItems</enum>
21 </property>
22 <property name="headerHidden">
23 <bool>false</bool>
24 </property>
25 <column>
26 <property name="text">
27 <string>Action</string>
28 </property>
29 </column>
30 <column>
31 <property name="text">
32 <string>Hotkey</string>
33 </property>
34 </column>
35 <column>
36 <property name="text">
37 <string>Context</string>
38 </property>
39 </column>
40 </widget>
41 </item>
42 <item>
43 <widget class="QDialogButtonBox" name="buttonBox">
44 <property name="orientation">
45 <enum>Qt::Horizontal</enum>
46 </property>
47 <property name="standardButtons">
48 <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
49 </property>
50 </widget>
51 </item>
52 </layout>
53 </widget>
54 <resources/>
55 <connections>
56 <connection>
57 <sender>buttonBox</sender>
58 <signal>accepted()</signal>
59 <receiver>hotkeys</receiver>
60 <slot>accept()</slot>
61 <hints>
62 <hint type="sourcelabel">
63 <x>248</x>
64 <y>254</y>
65 </hint>
66 <hint type="destinationlabel">
67 <x>157</x>
68 <y>274</y>
69 </hint>
70 </hints>
71 </connection>
72 <connection>
73 <sender>buttonBox</sender>
74 <signal>rejected()</signal>
75 <receiver>hotkeys</receiver>
76 <slot>reject()</slot>
77 <hints>
78 <hint type="sourcelabel">
79 <x>316</x>
80 <y>260</y>
81 </hint>
82 <hint type="destinationlabel">
83 <x>286</x>
84 <y>274</y>
85 </hint>
86 </hints>
87 </connection>
88 </connections>
89</ui>
diff --git a/src/citra_qt/src/main.cpp b/src/citra_qt/src/main.cpp
new file mode 100644
index 000000000..02893809b
--- /dev/null
+++ b/src/citra_qt/src/main.cpp
@@ -0,0 +1,191 @@
1#include <QtGui>
2#include <QDesktopWidget>
3#include <QFileDialog>
4#include "qhexedit.h"
5#include "main.hxx"
6
7#include "common.h"
8#include "platform.h"
9#if EMU_PLATFORM == PLATFORM_LINUX
10#include <unistd.h>
11#endif
12
13#include "bootmanager.hxx"
14#include "hotkeys.hxx"
15
16//debugger
17#include "disasm.hxx"
18#include "cpu_regs.hxx"
19#include "callstack.hxx"
20#include "ramview.hxx"
21
22#include "core.h"
23#include "version.h"
24
25
26GMainWindow::GMainWindow()
27{
28 ui.setupUi(this);
29 statusBar()->hide();
30
31 render_window = new GRenderWindow;
32 render_window->hide();
33
34 GDisAsmView* disasm = new GDisAsmView(this, render_window->GetEmuThread());
35 addDockWidget(Qt::BottomDockWidgetArea, disasm);
36 disasm->hide();
37
38 GARM11RegsView* arm_regs = new GARM11RegsView(this);
39 addDockWidget(Qt::RightDockWidgetArea, arm_regs);
40 arm_regs->hide();
41
42 QMenu* debug_menu = ui.menu_View->addMenu(tr("Debugging"));
43 debug_menu->addAction(disasm->toggleViewAction());
44 debug_menu->addAction(arm_regs->toggleViewAction());
45
46 // Set default UI state
47 // geometry: 55% of the window contents are in the upper screen half, 45% in the lower half
48 QDesktopWidget* desktop = ((QApplication*)QApplication::instance())->desktop();
49 QRect screenRect = desktop->screenGeometry(this);
50 int x, y, w, h;
51 w = screenRect.width() * 2 / 3;
52 h = screenRect.height() / 2;
53 x = (screenRect.x() + screenRect.width()) / 2 - w / 2;
54 y = (screenRect.y() + screenRect.height()) / 2 - h * 55 / 100;
55 setGeometry(x, y, w, h);
56
57
58 // Restore UI state
59 QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Citra team", "Citra");
60 restoreGeometry(settings.value("geometry").toByteArray());
61 restoreState(settings.value("state").toByteArray());
62 render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray());
63
64 ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", false).toBool());
65 SetupEmuWindowMode();
66
67 // Setup connections
68 connect(ui.action_load_elf, SIGNAL(triggered()), this, SLOT(OnMenuLoadELF()));
69 connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame()));
70 connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame()));
71 connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
72 connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(SetupEmuWindowMode()));
73 connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog()));
74
75 // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views before the CPU continues
76 connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), disasm, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection);
77 connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), arm_regs, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection);
78 //connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), ram_edit, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection);
79 //connect(&render_window->GetEmuThread(), SIGNAL(CPUStepped()), callstack, SLOT(OnCPUStepped()), Qt::BlockingQueuedConnection);
80
81 // Setup hotkeys
82 RegisterHotkey("Main Window", "Load Image", QKeySequence::Open);
83 RegisterHotkey("Main Window", "Start Emulation");
84 LoadHotkeys(settings);
85
86 connect(GetHotkey("Main Window", "Load Image", this), SIGNAL(activated()), this, SLOT(OnMenuLoadImage()));
87 connect(GetHotkey("Main Window", "Start Emulation", this), SIGNAL(activated()), this, SLOT(OnStartGame()));
88
89 show();
90}
91
92GMainWindow::~GMainWindow()
93{
94 // will get automatically deleted otherwise
95 if (render_window->parent() == NULL)
96 delete render_window;
97}
98
99void GMainWindow::BootGame(const char* filename)
100{
101 render_window->DoneCurrent(); // make sure EmuThread can access GL context
102 render_window->GetEmuThread().SetFilename(filename);
103 render_window->GetEmuThread().start();
104
105 SetupEmuWindowMode();
106 render_window->show();
107}
108
109void GMainWindow::OnMenuLoadELF()
110{
111 QString filename = QFileDialog::getOpenFileName(this, tr("Load ELF"), QString(), QString());
112 if (filename.size())
113 BootGame(filename.toLatin1().data());
114}
115
116void GMainWindow::OnStartGame()
117{
118}
119
120void GMainWindow::OnPauseGame()
121{
122}
123
124void GMainWindow::OnStopGame()
125{
126}
127
128void GMainWindow::OnOpenHotkeysDialog()
129{
130 GHotkeysDialog dialog(this);
131 dialog.exec();
132}
133
134
135void GMainWindow::SetupEmuWindowMode()
136{
137 if (!render_window->GetEmuThread().isRunning())
138 return;
139
140 bool enable = ui.action_Single_Window_Mode->isChecked();
141 if (enable && render_window->parent() == NULL) // switch to single window mode
142 {
143 render_window->BackupGeometry();
144 ui.horizontalLayout->addWidget(render_window);
145 render_window->setVisible(true);
146 render_window->DoneCurrent();
147 }
148 else if (!enable && render_window->parent() != NULL) // switch to multiple windows mode
149 {
150 ui.horizontalLayout->removeWidget(render_window);
151 render_window->setParent(NULL);
152 render_window->setVisible(true);
153 render_window->DoneCurrent();
154 render_window->RestoreGeometry();
155 }
156}
157
158void GMainWindow::OnConfigure()
159{
160 //GControllerConfigDialog* dialog = new GControllerConfigDialog(controller_ports, this);
161}
162
163void GMainWindow::closeEvent(QCloseEvent* event)
164{
165 // Save window layout
166 QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Citra team", "Citra");
167 settings.setValue("geometry", saveGeometry());
168 settings.setValue("state", saveState());
169 settings.setValue("geometryRenderWindow", render_window->saveGeometry());
170 settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked());
171 settings.setValue("firstStart", false);
172 SaveHotkeys(settings);
173
174 render_window->close();
175
176 QWidget::closeEvent(event);
177}
178
179#ifdef main
180#undef main
181#endif
182
183int __cdecl main(int argc, char* argv[])
184{
185 QApplication::setAttribute(Qt::AA_X11InitThreads);
186 QApplication app(argc, argv);
187 GMainWindow main_window;
188
189 main_window.show();
190 return app.exec();
191}
diff --git a/src/citra_qt/src/main.hxx b/src/citra_qt/src/main.hxx
new file mode 100644
index 000000000..81ee3860f
--- /dev/null
+++ b/src/citra_qt/src/main.hxx
@@ -0,0 +1,47 @@
1#ifndef _CITRA_QT_MAIN_HXX_
2#define _CITRA_QT_MAIN_HXX_
3
4#include <QMainWindow>
5
6#include "ui_main.h"
7
8class GImageInfo;
9class GRenderWindow;
10
11class GMainWindow : public QMainWindow
12{
13 Q_OBJECT
14
15 // TODO: Make use of this!
16 enum {
17 UI_IDLE,
18 UI_EMU_BOOTING,
19 UI_EMU_RUNNING,
20 UI_EMU_STOPPING,
21 };
22
23public:
24 GMainWindow();
25 ~GMainWindow();
26
27private:
28 void BootGame(const char* filename);
29
30 void closeEvent(QCloseEvent* event);
31
32private slots:
33 void OnStartGame();
34 void OnPauseGame();
35 void OnStopGame();
36 void OnMenuLoadELF();
37 void OnOpenHotkeysDialog();
38 void SetupEmuWindowMode();
39 void OnConfigure();
40
41private:
42 Ui::MainWindow ui;
43
44 GRenderWindow* render_window;
45};
46
47#endif // _CITRA_QT_MAIN_HXX_
diff --git a/src/citra_qt/src/main.ui b/src/citra_qt/src/main.ui
new file mode 100644
index 000000000..83d1e1f0c
--- /dev/null
+++ b/src/citra_qt/src/main.ui
@@ -0,0 +1,171 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>MainWindow</class>
4 <widget class="QMainWindow" name="MainWindow">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>1081</width>
10 <height>730</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Citra</string>
15 </property>
16 <property name="windowIcon">
17 <iconset>
18 <normaloff>src/pcafe/res/icon3_64x64.ico</normaloff>src/pcafe/res/icon3_64x64.ico</iconset>
19 </property>
20 <property name="tabShape">
21 <enum>QTabWidget::Rounded</enum>
22 </property>
23 <property name="dockNestingEnabled">
24 <bool>true</bool>
25 </property>
26 <widget class="QWidget" name="centralwidget">
27 <layout class="QHBoxLayout" name="horizontalLayout"/>
28 </widget>
29 <widget class="QMenuBar" name="menubar">
30 <property name="geometry">
31 <rect>
32 <x>0</x>
33 <y>0</y>
34 <width>1081</width>
35 <height>20</height>
36 </rect>
37 </property>
38 <widget class="QMenu" name="menu_File">
39 <property name="title">
40 <string>&amp;File</string>
41 </property>
42 <addaction name="action_load_elf"/>
43 <addaction name="separator"/>
44 <addaction name="action_Exit"/>
45 </widget>
46 <widget class="QMenu" name="menu_Emulation">
47 <property name="title">
48 <string>&amp;Emulation</string>
49 </property>
50 <addaction name="action_Start"/>
51 <addaction name="action_Pause"/>
52 <addaction name="action_Stop"/>
53 <addaction name="separator"/>
54 <addaction name="action_Configure"/>
55 </widget>
56 <widget class="QMenu" name="menu_View">
57 <property name="title">
58 <string>&amp;View</string>
59 </property>
60 <addaction name="action_Single_Window_Mode"/>
61 <addaction name="action_Hotkeys"/>
62 </widget>
63 <widget class="QMenu" name="menu_Help">
64 <property name="title">
65 <string>&amp;Help</string>
66 </property>
67 <addaction name="action_About"/>
68 </widget>
69 <addaction name="menu_File"/>
70 <addaction name="menu_Emulation"/>
71 <addaction name="menu_View"/>
72 <addaction name="menu_Help"/>
73 </widget>
74 <widget class="QStatusBar" name="statusbar"/>
75 <action name="action_load_elf">
76 <property name="text">
77 <string>Load ELF ...</string>
78 </property>
79 </action>
80 <action name="action_Exit">
81 <property name="text">
82 <string>E&amp;xit</string>
83 </property>
84 </action>
85 <action name="action_Start">
86 <property name="text">
87 <string>&amp;Start</string>
88 </property>
89 </action>
90 <action name="action_Stop">
91 <property name="enabled">
92 <bool>false</bool>
93 </property>
94 <property name="text">
95 <string>&amp;Stop</string>
96 </property>
97 </action>
98 <action name="action_Pause">
99 <property name="enabled">
100 <bool>false</bool>
101 </property>
102 <property name="text">
103 <string>&amp;Pause</string>
104 </property>
105 <property name="visible">
106 <bool>false</bool>
107 </property>
108 </action>
109 <action name="action_About">
110 <property name="text">
111 <string>About Citra</string>
112 </property>
113 </action>
114 <action name="action_Single_Window_Mode">
115 <property name="checkable">
116 <bool>true</bool>
117 </property>
118 <property name="text">
119 <string>Single Window Mode</string>
120 </property>
121 </action>
122 <action name="action_Hotkeys">
123 <property name="text">
124 <string>Configure &amp;Hotkeys ...</string>
125 </property>
126 </action>
127 <action name="action_Configure">
128 <property name="text">
129 <string>Configure ...</string>
130 </property>
131 </action>
132 </widget>
133 <resources/>
134 <connections>
135 <connection>
136 <sender>action_Exit</sender>
137 <signal>triggered()</signal>
138 <receiver>MainWindow</receiver>
139 <slot>close()</slot>
140 <hints>
141 <hint type="sourcelabel">
142 <x>-1</x>
143 <y>-1</y>
144 </hint>
145 <hint type="destinationlabel">
146 <x>367</x>
147 <y>314</y>
148 </hint>
149 </hints>
150 </connection>
151 <connection>
152 <sender>action_Configure</sender>
153 <signal>triggered()</signal>
154 <receiver>MainWindow</receiver>
155 <slot>OnConfigure()</slot>
156 <hints>
157 <hint type="sourcelabel">
158 <x>-1</x>
159 <y>-1</y>
160 </hint>
161 <hint type="destinationlabel">
162 <x>540</x>
163 <y>364</y>
164 </hint>
165 </hints>
166 </connection>
167 </connections>
168 <slots>
169 <slot>OnConfigure()</slot>
170 </slots>
171</ui>
diff --git a/src/citra_qt/src/ramview.cpp b/src/citra_qt/src/ramview.cpp
new file mode 100644
index 000000000..8cc252af6
--- /dev/null
+++ b/src/citra_qt/src/ramview.cpp
@@ -0,0 +1,13 @@
1#include "ramview.hxx"
2
3#include "common.h"
4#include "memory.h"
5GRamView::GRamView(QWidget* parent) : QHexEdit(parent)
6{
7}
8
9void GRamView::OnCPUStepped()
10{
11 // TODO: QHexEdit doesn't show vertical scroll bars for > 10MB data streams...
12 //setData(QByteArray((const char*)Mem_RAM,sizeof(Mem_RAM)/8));
13} \ No newline at end of file
diff --git a/src/citra_qt/src/ramview.hxx b/src/citra_qt/src/ramview.hxx
new file mode 100644
index 000000000..1db1546aa
--- /dev/null
+++ b/src/citra_qt/src/ramview.hxx
@@ -0,0 +1,12 @@
1#include "qhexedit.h"
2
3class GRamView : public QHexEdit
4{
5 Q_OBJECT
6
7public:
8 GRamView(QWidget* parent = NULL);
9
10public slots:
11 void OnCPUStepped();
12};
diff --git a/src/citra_qt/src/ui_callstack.h b/src/citra_qt/src/ui_callstack.h
new file mode 100644
index 000000000..75d10253c
--- /dev/null
+++ b/src/citra_qt/src/ui_callstack.h
@@ -0,0 +1,68 @@
1/********************************************************************************
2** Form generated from reading UI file 'callstack.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_CALLSTACK_H
10#define UI_CALLSTACK_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QDockWidget>
17#include <QtGui/QHeaderView>
18#include <QtGui/QTreeView>
19#include <QtGui/QVBoxLayout>
20#include <QtGui/QWidget>
21
22QT_BEGIN_NAMESPACE
23
24class Ui_CallStack
25{
26public:
27 QWidget *dockWidgetContents;
28 QVBoxLayout *verticalLayout;
29 QTreeView *treeView;
30
31 void setupUi(QDockWidget *CallStack)
32 {
33 if (CallStack->objectName().isEmpty())
34 CallStack->setObjectName(QString::fromUtf8("CallStack"));
35 CallStack->resize(400, 300);
36 dockWidgetContents = new QWidget();
37 dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents"));
38 verticalLayout = new QVBoxLayout(dockWidgetContents);
39 verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
40 treeView = new QTreeView(dockWidgetContents);
41 treeView->setObjectName(QString::fromUtf8("treeView"));
42 treeView->setAlternatingRowColors(true);
43 treeView->setRootIsDecorated(false);
44 treeView->setItemsExpandable(false);
45
46 verticalLayout->addWidget(treeView);
47
48 CallStack->setWidget(dockWidgetContents);
49
50 retranslateUi(CallStack);
51
52 QMetaObject::connectSlotsByName(CallStack);
53 } // setupUi
54
55 void retranslateUi(QDockWidget *CallStack)
56 {
57 CallStack->setWindowTitle(QApplication::translate("CallStack", "Call stack", 0, QApplication::UnicodeUTF8));
58 } // retranslateUi
59
60};
61
62namespace Ui {
63 class CallStack: public Ui_CallStack {};
64} // namespace Ui
65
66QT_END_NAMESPACE
67
68#endif // UI_CALLSTACK_H
diff --git a/src/citra_qt/src/ui_cpu_regs.h b/src/citra_qt/src/ui_cpu_regs.h
new file mode 100644
index 000000000..b8a80b3f2
--- /dev/null
+++ b/src/citra_qt/src/ui_cpu_regs.h
@@ -0,0 +1,69 @@
1/********************************************************************************
2** Form generated from reading UI file 'cpu_regs.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_CPU_REGS_H
10#define UI_CPU_REGS_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QDockWidget>
17#include <QtGui/QHeaderView>
18#include <QtGui/QTreeWidget>
19#include <QtGui/QVBoxLayout>
20#include <QtGui/QWidget>
21
22QT_BEGIN_NAMESPACE
23
24class Ui_ARMRegisters
25{
26public:
27 QWidget *dockWidgetContents;
28 QVBoxLayout *verticalLayout;
29 QTreeWidget *treeWidget;
30
31 void setupUi(QDockWidget *ARMRegisters)
32 {
33 if (ARMRegisters->objectName().isEmpty())
34 ARMRegisters->setObjectName(QString::fromUtf8("ARMRegisters"));
35 ARMRegisters->resize(400, 300);
36 dockWidgetContents = new QWidget();
37 dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents"));
38 verticalLayout = new QVBoxLayout(dockWidgetContents);
39 verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
40 treeWidget = new QTreeWidget(dockWidgetContents);
41 treeWidget->setObjectName(QString::fromUtf8("treeWidget"));
42 treeWidget->setAlternatingRowColors(true);
43
44 verticalLayout->addWidget(treeWidget);
45
46 ARMRegisters->setWidget(dockWidgetContents);
47
48 retranslateUi(ARMRegisters);
49
50 QMetaObject::connectSlotsByName(ARMRegisters);
51 } // setupUi
52
53 void retranslateUi(QDockWidget *ARMRegisters)
54 {
55 ARMRegisters->setWindowTitle(QApplication::translate("ARMRegisters", "ARM registers", 0, QApplication::UnicodeUTF8));
56 QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem();
57 ___qtreewidgetitem->setText(1, QApplication::translate("ARMRegisters", "Value", 0, QApplication::UnicodeUTF8));
58 ___qtreewidgetitem->setText(0, QApplication::translate("ARMRegisters", "Register", 0, QApplication::UnicodeUTF8));
59 } // retranslateUi
60
61};
62
63namespace Ui {
64 class ARMRegisters: public Ui_ARMRegisters {};
65} // namespace Ui
66
67QT_END_NAMESPACE
68
69#endif // UI_CPU_REGS_H
diff --git a/src/citra_qt/src/ui_disasm.h b/src/citra_qt/src/ui_disasm.h
new file mode 100644
index 000000000..697a224cb
--- /dev/null
+++ b/src/citra_qt/src/ui_disasm.h
@@ -0,0 +1,112 @@
1/********************************************************************************
2** Form generated from reading UI file 'disasm.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_DISASM_H
10#define UI_DISASM_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QDockWidget>
17#include <QtGui/QHBoxLayout>
18#include <QtGui/QHeaderView>
19#include <QtGui/QPushButton>
20#include <QtGui/QTreeView>
21#include <QtGui/QVBoxLayout>
22#include <QtGui/QWidget>
23
24QT_BEGIN_NAMESPACE
25
26class Ui_DockWidget
27{
28public:
29 QWidget *dockWidgetContents;
30 QVBoxLayout *verticalLayout;
31 QHBoxLayout *horizontalLayout;
32 QPushButton *button_step;
33 QPushButton *button_pause;
34 QPushButton *button_continue;
35 QPushButton *pushButton;
36 QPushButton *button_breakpoint;
37 QTreeView *treeView;
38
39 void setupUi(QDockWidget *DockWidget)
40 {
41 if (DockWidget->objectName().isEmpty())
42 DockWidget->setObjectName(QString::fromUtf8("DockWidget"));
43 DockWidget->resize(430, 401);
44 dockWidgetContents = new QWidget();
45 dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents"));
46 verticalLayout = new QVBoxLayout(dockWidgetContents);
47 verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
48 horizontalLayout = new QHBoxLayout();
49 horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
50 button_step = new QPushButton(dockWidgetContents);
51 button_step->setObjectName(QString::fromUtf8("button_step"));
52
53 horizontalLayout->addWidget(button_step);
54
55 button_pause = new QPushButton(dockWidgetContents);
56 button_pause->setObjectName(QString::fromUtf8("button_pause"));
57
58 horizontalLayout->addWidget(button_pause);
59
60 button_continue = new QPushButton(dockWidgetContents);
61 button_continue->setObjectName(QString::fromUtf8("button_continue"));
62
63 horizontalLayout->addWidget(button_continue);
64
65 pushButton = new QPushButton(dockWidgetContents);
66 pushButton->setObjectName(QString::fromUtf8("pushButton"));
67
68 horizontalLayout->addWidget(pushButton);
69
70 button_breakpoint = new QPushButton(dockWidgetContents);
71 button_breakpoint->setObjectName(QString::fromUtf8("button_breakpoint"));
72
73 horizontalLayout->addWidget(button_breakpoint);
74
75
76 verticalLayout->addLayout(horizontalLayout);
77
78 treeView = new QTreeView(dockWidgetContents);
79 treeView->setObjectName(QString::fromUtf8("treeView"));
80 treeView->setAlternatingRowColors(true);
81 treeView->setIndentation(20);
82 treeView->setRootIsDecorated(false);
83 treeView->header()->setVisible(false);
84
85 verticalLayout->addWidget(treeView);
86
87 DockWidget->setWidget(dockWidgetContents);
88
89 retranslateUi(DockWidget);
90
91 QMetaObject::connectSlotsByName(DockWidget);
92 } // setupUi
93
94 void retranslateUi(QDockWidget *DockWidget)
95 {
96 DockWidget->setWindowTitle(QApplication::translate("DockWidget", "Disassembly", 0, QApplication::UnicodeUTF8));
97 button_step->setText(QApplication::translate("DockWidget", "Step", 0, QApplication::UnicodeUTF8));
98 button_pause->setText(QApplication::translate("DockWidget", "Pause", 0, QApplication::UnicodeUTF8));
99 button_continue->setText(QApplication::translate("DockWidget", "Continue", 0, QApplication::UnicodeUTF8));
100 pushButton->setText(QApplication::translate("DockWidget", "Step Into", 0, QApplication::UnicodeUTF8));
101 button_breakpoint->setText(QApplication::translate("DockWidget", "Set Breakpoint", 0, QApplication::UnicodeUTF8));
102 } // retranslateUi
103
104};
105
106namespace Ui {
107 class DockWidget: public Ui_DockWidget {};
108} // namespace Ui
109
110QT_END_NAMESPACE
111
112#endif // UI_DISASM_H
diff --git a/src/citra_qt/src/ui_gfx_fifo_player.h b/src/citra_qt/src/ui_gfx_fifo_player.h
new file mode 100644
index 000000000..a65f56abd
--- /dev/null
+++ b/src/citra_qt/src/ui_gfx_fifo_player.h
@@ -0,0 +1,209 @@
1/********************************************************************************
2** Form generated from reading UI file 'gfx_fifo_player.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_GFX_FIFO_PLAYER_H
10#define UI_GFX_FIFO_PLAYER_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QCheckBox>
17#include <QtGui/QComboBox>
18#include <QtGui/QDockWidget>
19#include <QtGui/QGroupBox>
20#include <QtGui/QHBoxLayout>
21#include <QtGui/QHeaderView>
22#include <QtGui/QLabel>
23#include <QtGui/QPushButton>
24#include <QtGui/QRadioButton>
25#include <QtGui/QSpacerItem>
26#include <QtGui/QSpinBox>
27#include <QtGui/QVBoxLayout>
28#include <QtGui/QWidget>
29
30QT_BEGIN_NAMESPACE
31
32class Ui_GfxFifoPlayerControl
33{
34public:
35 QWidget *recordingGroup;
36 QVBoxLayout *verticalLayout;
37 QGroupBox *groupBox;
38 QVBoxLayout *verticalLayout_2;
39 QRadioButton *stopManuallyButton;
40 QHBoxLayout *horizontalLayout;
41 QRadioButton *radioButton_2;
42 QSpinBox *spinBox;
43 QComboBox *comboBox;
44 QSpacerItem *horizontalSpacer_2;
45 QSpacerItem *horizontalSpacer;
46 QCheckBox *pauseWhenDoneCheckbox;
47 QHBoxLayout *horizontalLayout_2;
48 QPushButton *startStopRecordingButton;
49 QPushButton *saveRecordingButton;
50 QGroupBox *playbackGroup;
51 QVBoxLayout *verticalLayout_3;
52 QHBoxLayout *horizontalLayout_3;
53 QLabel *label;
54 QComboBox *playbackSourceCombobox;
55 QCheckBox *checkBox_2;
56 QPushButton *startPlaybackButton;
57 QSpacerItem *verticalSpacer;
58
59 void setupUi(QDockWidget *GfxFifoPlayerControl)
60 {
61 if (GfxFifoPlayerControl->objectName().isEmpty())
62 GfxFifoPlayerControl->setObjectName(QString::fromUtf8("GfxFifoPlayerControl"));
63 GfxFifoPlayerControl->resize(275, 297);
64 recordingGroup = new QWidget();
65 recordingGroup->setObjectName(QString::fromUtf8("recordingGroup"));
66 verticalLayout = new QVBoxLayout(recordingGroup);
67 verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
68 groupBox = new QGroupBox(recordingGroup);
69 groupBox->setObjectName(QString::fromUtf8("groupBox"));
70 verticalLayout_2 = new QVBoxLayout(groupBox);
71 verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
72 stopManuallyButton = new QRadioButton(groupBox);
73 stopManuallyButton->setObjectName(QString::fromUtf8("stopManuallyButton"));
74 stopManuallyButton->setChecked(true);
75
76 verticalLayout_2->addWidget(stopManuallyButton);
77
78 horizontalLayout = new QHBoxLayout();
79 horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
80 radioButton_2 = new QRadioButton(groupBox);
81 radioButton_2->setObjectName(QString::fromUtf8("radioButton_2"));
82
83 horizontalLayout->addWidget(radioButton_2);
84
85 spinBox = new QSpinBox(groupBox);
86 spinBox->setObjectName(QString::fromUtf8("spinBox"));
87 spinBox->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
88 spinBox->setMinimum(1);
89 spinBox->setMaximum(99999);
90
91 horizontalLayout->addWidget(spinBox);
92
93 comboBox = new QComboBox(groupBox);
94 comboBox->setObjectName(QString::fromUtf8("comboBox"));
95
96 horizontalLayout->addWidget(comboBox);
97
98 horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
99
100 horizontalLayout->addItem(horizontalSpacer_2);
101
102 horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
103
104 horizontalLayout->addItem(horizontalSpacer);
105
106
107 verticalLayout_2->addLayout(horizontalLayout);
108
109 pauseWhenDoneCheckbox = new QCheckBox(groupBox);
110 pauseWhenDoneCheckbox->setObjectName(QString::fromUtf8("pauseWhenDoneCheckbox"));
111
112 verticalLayout_2->addWidget(pauseWhenDoneCheckbox);
113
114 horizontalLayout_2 = new QHBoxLayout();
115 horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
116 startStopRecordingButton = new QPushButton(groupBox);
117 startStopRecordingButton->setObjectName(QString::fromUtf8("startStopRecordingButton"));
118
119 horizontalLayout_2->addWidget(startStopRecordingButton);
120
121 saveRecordingButton = new QPushButton(groupBox);
122 saveRecordingButton->setObjectName(QString::fromUtf8("saveRecordingButton"));
123 saveRecordingButton->setEnabled(false);
124
125 horizontalLayout_2->addWidget(saveRecordingButton);
126
127
128 verticalLayout_2->addLayout(horizontalLayout_2);
129
130
131 verticalLayout->addWidget(groupBox);
132
133 playbackGroup = new QGroupBox(recordingGroup);
134 playbackGroup->setObjectName(QString::fromUtf8("playbackGroup"));
135 verticalLayout_3 = new QVBoxLayout(playbackGroup);
136 verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
137 horizontalLayout_3 = new QHBoxLayout();
138 horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
139 label = new QLabel(playbackGroup);
140 label->setObjectName(QString::fromUtf8("label"));
141
142 horizontalLayout_3->addWidget(label);
143
144 playbackSourceCombobox = new QComboBox(playbackGroup);
145 playbackSourceCombobox->setObjectName(QString::fromUtf8("playbackSourceCombobox"));
146
147 horizontalLayout_3->addWidget(playbackSourceCombobox);
148
149
150 verticalLayout_3->addLayout(horizontalLayout_3);
151
152 checkBox_2 = new QCheckBox(playbackGroup);
153 checkBox_2->setObjectName(QString::fromUtf8("checkBox_2"));
154
155 verticalLayout_3->addWidget(checkBox_2);
156
157 startPlaybackButton = new QPushButton(playbackGroup);
158 startPlaybackButton->setObjectName(QString::fromUtf8("startPlaybackButton"));
159
160 verticalLayout_3->addWidget(startPlaybackButton);
161
162 verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
163
164 verticalLayout_3->addItem(verticalSpacer);
165
166
167 verticalLayout->addWidget(playbackGroup);
168
169 GfxFifoPlayerControl->setWidget(recordingGroup);
170
171 retranslateUi(GfxFifoPlayerControl);
172
173 QMetaObject::connectSlotsByName(GfxFifoPlayerControl);
174 } // setupUi
175
176 void retranslateUi(QDockWidget *GfxFifoPlayerControl)
177 {
178 GfxFifoPlayerControl->setWindowTitle(QApplication::translate("GfxFifoPlayerControl", "Fifo Player", 0, QApplication::UnicodeUTF8));
179 groupBox->setTitle(QApplication::translate("GfxFifoPlayerControl", "Recording", 0, QApplication::UnicodeUTF8));
180 stopManuallyButton->setText(QApplication::translate("GfxFifoPlayerControl", "Stop manually", 0, QApplication::UnicodeUTF8));
181 radioButton_2->setText(QApplication::translate("GfxFifoPlayerControl", "Stop after", 0, QApplication::UnicodeUTF8));
182 comboBox->clear();
183 comboBox->insertItems(0, QStringList()
184 << QApplication::translate("GfxFifoPlayerControl", "Frames", 0, QApplication::UnicodeUTF8)
185 << QApplication::translate("GfxFifoPlayerControl", "Flushes", 0, QApplication::UnicodeUTF8)
186 );
187 pauseWhenDoneCheckbox->setText(QApplication::translate("GfxFifoPlayerControl", "Pause when done", 0, QApplication::UnicodeUTF8));
188 startStopRecordingButton->setText(QApplication::translate("GfxFifoPlayerControl", "Start", 0, QApplication::UnicodeUTF8));
189 saveRecordingButton->setText(QApplication::translate("GfxFifoPlayerControl", "Save to File...", 0, QApplication::UnicodeUTF8));
190 playbackGroup->setTitle(QApplication::translate("GfxFifoPlayerControl", "Playback", 0, QApplication::UnicodeUTF8));
191 label->setText(QApplication::translate("GfxFifoPlayerControl", "Playback source:", 0, QApplication::UnicodeUTF8));
192 playbackSourceCombobox->clear();
193 playbackSourceCombobox->insertItems(0, QStringList()
194 << QApplication::translate("GfxFifoPlayerControl", "Last Recording", 0, QApplication::UnicodeUTF8)
195 << QApplication::translate("GfxFifoPlayerControl", "From File...", 0, QApplication::UnicodeUTF8)
196 );
197 checkBox_2->setText(QApplication::translate("GfxFifoPlayerControl", "Loop", 0, QApplication::UnicodeUTF8));
198 startPlaybackButton->setText(QApplication::translate("GfxFifoPlayerControl", "Start", 0, QApplication::UnicodeUTF8));
199 } // retranslateUi
200
201};
202
203namespace Ui {
204 class GfxFifoPlayerControl: public Ui_GfxFifoPlayerControl {};
205} // namespace Ui
206
207QT_END_NAMESPACE
208
209#endif // UI_GFX_FIFO_PLAYER_H
diff --git a/src/citra_qt/src/ui_hotkeys.h b/src/citra_qt/src/ui_hotkeys.h
new file mode 100644
index 000000000..5b2cee6f4
--- /dev/null
+++ b/src/citra_qt/src/ui_hotkeys.h
@@ -0,0 +1,77 @@
1/********************************************************************************
2** Form generated from reading UI file 'hotkeys.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_HOTKEYS_H
10#define UI_HOTKEYS_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QDialog>
17#include <QtGui/QDialogButtonBox>
18#include <QtGui/QHeaderView>
19#include <QtGui/QTreeWidget>
20#include <QtGui/QVBoxLayout>
21
22QT_BEGIN_NAMESPACE
23
24class Ui_hotkeys
25{
26public:
27 QVBoxLayout *verticalLayout;
28 QTreeWidget *treeWidget;
29 QDialogButtonBox *buttonBox;
30
31 void setupUi(QDialog *hotkeys)
32 {
33 if (hotkeys->objectName().isEmpty())
34 hotkeys->setObjectName(QString::fromUtf8("hotkeys"));
35 hotkeys->resize(363, 388);
36 verticalLayout = new QVBoxLayout(hotkeys);
37 verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
38 treeWidget = new QTreeWidget(hotkeys);
39 treeWidget->setObjectName(QString::fromUtf8("treeWidget"));
40 treeWidget->setSelectionBehavior(QAbstractItemView::SelectItems);
41 treeWidget->setHeaderHidden(false);
42
43 verticalLayout->addWidget(treeWidget);
44
45 buttonBox = new QDialogButtonBox(hotkeys);
46 buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
47 buttonBox->setOrientation(Qt::Horizontal);
48 buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset);
49
50 verticalLayout->addWidget(buttonBox);
51
52
53 retranslateUi(hotkeys);
54 QObject::connect(buttonBox, SIGNAL(accepted()), hotkeys, SLOT(accept()));
55 QObject::connect(buttonBox, SIGNAL(rejected()), hotkeys, SLOT(reject()));
56
57 QMetaObject::connectSlotsByName(hotkeys);
58 } // setupUi
59
60 void retranslateUi(QDialog *hotkeys)
61 {
62 hotkeys->setWindowTitle(QApplication::translate("hotkeys", "Hotkey Settings", 0, QApplication::UnicodeUTF8));
63 QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem();
64 ___qtreewidgetitem->setText(2, QApplication::translate("hotkeys", "Context", 0, QApplication::UnicodeUTF8));
65 ___qtreewidgetitem->setText(1, QApplication::translate("hotkeys", "Hotkey", 0, QApplication::UnicodeUTF8));
66 ___qtreewidgetitem->setText(0, QApplication::translate("hotkeys", "Action", 0, QApplication::UnicodeUTF8));
67 } // retranslateUi
68
69};
70
71namespace Ui {
72 class hotkeys: public Ui_hotkeys {};
73} // namespace Ui
74
75QT_END_NAMESPACE
76
77#endif // UI_HOTKEYS_H
diff --git a/src/citra_qt/src/ui_image_info.h b/src/citra_qt/src/ui_image_info.h
new file mode 100644
index 000000000..a6aaa3d8d
--- /dev/null
+++ b/src/citra_qt/src/ui_image_info.h
@@ -0,0 +1,154 @@
1/********************************************************************************
2** Form generated from reading UI file 'image_info.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_IMAGE_INFO_H
10#define UI_IMAGE_INFO_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QDockWidget>
17#include <QtGui/QFormLayout>
18#include <QtGui/QHeaderView>
19#include <QtGui/QLabel>
20#include <QtGui/QLineEdit>
21#include <QtGui/QPlainTextEdit>
22#include <QtGui/QWidget>
23
24QT_BEGIN_NAMESPACE
25
26class Ui_ImageInfo
27{
28public:
29 QWidget *dockWidgetContents;
30 QFormLayout *formLayout;
31 QLabel *label_name;
32 QLabel *label_gameid;
33 QLabel *label_country;
34 QLabel *label_bannertext;
35 QLineEdit *line_name;
36 QLineEdit *line_gameid;
37 QLineEdit *line_country;
38 QLabel *label_banner;
39 QLabel *label_developer;
40 QLineEdit *line_developer;
41 QLabel *label_description;
42 QPlainTextEdit *edit_description;
43
44 void setupUi(QDockWidget *ImageInfo)
45 {
46 if (ImageInfo->objectName().isEmpty())
47 ImageInfo->setObjectName(QString::fromUtf8("ImageInfo"));
48 ImageInfo->resize(400, 300);
49 dockWidgetContents = new QWidget();
50 dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents"));
51 formLayout = new QFormLayout(dockWidgetContents);
52 formLayout->setObjectName(QString::fromUtf8("formLayout"));
53 label_name = new QLabel(dockWidgetContents);
54 label_name->setObjectName(QString::fromUtf8("label_name"));
55
56 formLayout->setWidget(1, QFormLayout::LabelRole, label_name);
57
58 label_gameid = new QLabel(dockWidgetContents);
59 label_gameid->setObjectName(QString::fromUtf8("label_gameid"));
60
61 formLayout->setWidget(4, QFormLayout::LabelRole, label_gameid);
62
63 label_country = new QLabel(dockWidgetContents);
64 label_country->setObjectName(QString::fromUtf8("label_country"));
65
66 formLayout->setWidget(5, QFormLayout::LabelRole, label_country);
67
68 label_bannertext = new QLabel(dockWidgetContents);
69 label_bannertext->setObjectName(QString::fromUtf8("label_bannertext"));
70
71 formLayout->setWidget(9, QFormLayout::LabelRole, label_bannertext);
72
73 line_name = new QLineEdit(dockWidgetContents);
74 line_name->setObjectName(QString::fromUtf8("line_name"));
75 line_name->setEnabled(true);
76 line_name->setReadOnly(true);
77
78 formLayout->setWidget(1, QFormLayout::FieldRole, line_name);
79
80 line_gameid = new QLineEdit(dockWidgetContents);
81 line_gameid->setObjectName(QString::fromUtf8("line_gameid"));
82 line_gameid->setEnabled(true);
83 line_gameid->setReadOnly(true);
84
85 formLayout->setWidget(4, QFormLayout::FieldRole, line_gameid);
86
87 line_country = new QLineEdit(dockWidgetContents);
88 line_country->setObjectName(QString::fromUtf8("line_country"));
89 line_country->setEnabled(true);
90 line_country->setReadOnly(true);
91
92 formLayout->setWidget(5, QFormLayout::FieldRole, line_country);
93
94 label_banner = new QLabel(dockWidgetContents);
95 label_banner->setObjectName(QString::fromUtf8("label_banner"));
96 label_banner->setAlignment(Qt::AlignCenter);
97
98 formLayout->setWidget(9, QFormLayout::FieldRole, label_banner);
99
100 label_developer = new QLabel(dockWidgetContents);
101 label_developer->setObjectName(QString::fromUtf8("label_developer"));
102
103 formLayout->setWidget(3, QFormLayout::LabelRole, label_developer);
104
105 line_developer = new QLineEdit(dockWidgetContents);
106 line_developer->setObjectName(QString::fromUtf8("line_developer"));
107 line_developer->setReadOnly(true);
108
109 formLayout->setWidget(3, QFormLayout::FieldRole, line_developer);
110
111 label_description = new QLabel(dockWidgetContents);
112 label_description->setObjectName(QString::fromUtf8("label_description"));
113
114 formLayout->setWidget(7, QFormLayout::LabelRole, label_description);
115
116 edit_description = new QPlainTextEdit(dockWidgetContents);
117 edit_description->setObjectName(QString::fromUtf8("edit_description"));
118 edit_description->setMaximumSize(QSize(16777215, 80));
119 edit_description->setReadOnly(true);
120 edit_description->setPlainText(QString::fromUtf8(""));
121
122 formLayout->setWidget(7, QFormLayout::FieldRole, edit_description);
123
124 ImageInfo->setWidget(dockWidgetContents);
125
126 retranslateUi(ImageInfo);
127
128 QMetaObject::connectSlotsByName(ImageInfo);
129 } // setupUi
130
131 void retranslateUi(QDockWidget *ImageInfo)
132 {
133 ImageInfo->setWindowTitle(QApplication::translate("ImageInfo", "Image Info", 0, QApplication::UnicodeUTF8));
134 label_name->setText(QApplication::translate("ImageInfo", "Name", 0, QApplication::UnicodeUTF8));
135 label_gameid->setText(QApplication::translate("ImageInfo", "Game ID", 0, QApplication::UnicodeUTF8));
136 label_country->setText(QApplication::translate("ImageInfo", "Country", 0, QApplication::UnicodeUTF8));
137 label_bannertext->setText(QApplication::translate("ImageInfo", "Banner", 0, QApplication::UnicodeUTF8));
138 line_name->setText(QString());
139 line_gameid->setText(QString());
140 line_country->setText(QApplication::translate("ImageInfo", "EUROPE", 0, QApplication::UnicodeUTF8));
141 label_banner->setText(QString());
142 label_developer->setText(QApplication::translate("ImageInfo", "Developer", 0, QApplication::UnicodeUTF8));
143 label_description->setText(QApplication::translate("ImageInfo", "Description", 0, QApplication::UnicodeUTF8));
144 } // retranslateUi
145
146};
147
148namespace Ui {
149 class ImageInfo: public Ui_ImageInfo {};
150} // namespace Ui
151
152QT_END_NAMESPACE
153
154#endif // UI_IMAGE_INFO_H
diff --git a/src/citra_qt/src/ui_main.h b/src/citra_qt/src/ui_main.h
new file mode 100644
index 000000000..693fa70bd
--- /dev/null
+++ b/src/citra_qt/src/ui_main.h
@@ -0,0 +1,149 @@
1/********************************************************************************
2** Form generated from reading UI file 'main.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_MAIN_H
10#define UI_MAIN_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QHBoxLayout>
17#include <QtGui/QHeaderView>
18#include <QtGui/QMainWindow>
19#include <QtGui/QMenu>
20#include <QtGui/QMenuBar>
21#include <QtGui/QStatusBar>
22#include <QtGui/QWidget>
23
24QT_BEGIN_NAMESPACE
25
26class Ui_MainWindow
27{
28public:
29 QAction *action_load_elf;
30 QAction *action_Exit;
31 QAction *action_Start;
32 QAction *action_Stop;
33 QAction *action_Pause;
34 QAction *action_About;
35 QAction *action_Single_Window_Mode;
36 QAction *action_Hotkeys;
37 QAction *action_Configure;
38 QWidget *centralwidget;
39 QHBoxLayout *horizontalLayout;
40 QMenuBar *menubar;
41 QMenu *menu_File;
42 QMenu *menu_Emulation;
43 QMenu *menu_View;
44 QMenu *menu_Help;
45 QStatusBar *statusbar;
46
47 void setupUi(QMainWindow *MainWindow)
48 {
49 if (MainWindow->objectName().isEmpty())
50 MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
51 MainWindow->resize(1081, 730);
52 QIcon icon;
53 icon.addFile(QString::fromUtf8("src/pcafe/res/icon3_64x64.ico"), QSize(), QIcon::Normal, QIcon::Off);
54 MainWindow->setWindowIcon(icon);
55 MainWindow->setTabShape(QTabWidget::Rounded);
56 MainWindow->setDockNestingEnabled(true);
57 action_load_elf = new QAction(MainWindow);
58 action_load_elf->setObjectName(QString::fromUtf8("action_load_elf"));
59 action_Exit = new QAction(MainWindow);
60 action_Exit->setObjectName(QString::fromUtf8("action_Exit"));
61 action_Start = new QAction(MainWindow);
62 action_Start->setObjectName(QString::fromUtf8("action_Start"));
63 action_Stop = new QAction(MainWindow);
64 action_Stop->setObjectName(QString::fromUtf8("action_Stop"));
65 action_Stop->setEnabled(false);
66 action_Pause = new QAction(MainWindow);
67 action_Pause->setObjectName(QString::fromUtf8("action_Pause"));
68 action_Pause->setEnabled(false);
69 action_Pause->setVisible(false);
70 action_About = new QAction(MainWindow);
71 action_About->setObjectName(QString::fromUtf8("action_About"));
72 action_Single_Window_Mode = new QAction(MainWindow);
73 action_Single_Window_Mode->setObjectName(QString::fromUtf8("action_Single_Window_Mode"));
74 action_Single_Window_Mode->setCheckable(true);
75 action_Hotkeys = new QAction(MainWindow);
76 action_Hotkeys->setObjectName(QString::fromUtf8("action_Hotkeys"));
77 action_Configure = new QAction(MainWindow);
78 action_Configure->setObjectName(QString::fromUtf8("action_Configure"));
79 centralwidget = new QWidget(MainWindow);
80 centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
81 horizontalLayout = new QHBoxLayout(centralwidget);
82 horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
83 MainWindow->setCentralWidget(centralwidget);
84 menubar = new QMenuBar(MainWindow);
85 menubar->setObjectName(QString::fromUtf8("menubar"));
86 menubar->setGeometry(QRect(0, 0, 1081, 20));
87 menu_File = new QMenu(menubar);
88 menu_File->setObjectName(QString::fromUtf8("menu_File"));
89 menu_Emulation = new QMenu(menubar);
90 menu_Emulation->setObjectName(QString::fromUtf8("menu_Emulation"));
91 menu_View = new QMenu(menubar);
92 menu_View->setObjectName(QString::fromUtf8("menu_View"));
93 menu_Help = new QMenu(menubar);
94 menu_Help->setObjectName(QString::fromUtf8("menu_Help"));
95 MainWindow->setMenuBar(menubar);
96 statusbar = new QStatusBar(MainWindow);
97 statusbar->setObjectName(QString::fromUtf8("statusbar"));
98 MainWindow->setStatusBar(statusbar);
99
100 menubar->addAction(menu_File->menuAction());
101 menubar->addAction(menu_Emulation->menuAction());
102 menubar->addAction(menu_View->menuAction());
103 menubar->addAction(menu_Help->menuAction());
104 menu_File->addAction(action_load_elf);
105 menu_File->addSeparator();
106 menu_File->addAction(action_Exit);
107 menu_Emulation->addAction(action_Start);
108 menu_Emulation->addAction(action_Pause);
109 menu_Emulation->addAction(action_Stop);
110 menu_Emulation->addSeparator();
111 menu_Emulation->addAction(action_Configure);
112 menu_View->addAction(action_Single_Window_Mode);
113 menu_View->addAction(action_Hotkeys);
114 menu_Help->addAction(action_About);
115
116 retranslateUi(MainWindow);
117 QObject::connect(action_Exit, SIGNAL(triggered()), MainWindow, SLOT(close()));
118 QObject::connect(action_Configure, SIGNAL(triggered()), MainWindow, SLOT(OnConfigure()));
119
120 QMetaObject::connectSlotsByName(MainWindow);
121 } // setupUi
122
123 void retranslateUi(QMainWindow *MainWindow)
124 {
125 MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Citra", 0, QApplication::UnicodeUTF8));
126 action_load_elf->setText(QApplication::translate("MainWindow", "Load ELF ...", 0, QApplication::UnicodeUTF8));
127 action_Exit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8));
128 action_Start->setText(QApplication::translate("MainWindow", "&Start", 0, QApplication::UnicodeUTF8));
129 action_Stop->setText(QApplication::translate("MainWindow", "&Stop", 0, QApplication::UnicodeUTF8));
130 action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8));
131 action_About->setText(QApplication::translate("MainWindow", "About Citra", 0, QApplication::UnicodeUTF8));
132 action_Single_Window_Mode->setText(QApplication::translate("MainWindow", "Single Window Mode", 0, QApplication::UnicodeUTF8));
133 action_Hotkeys->setText(QApplication::translate("MainWindow", "Configure &Hotkeys ...", 0, QApplication::UnicodeUTF8));
134 action_Configure->setText(QApplication::translate("MainWindow", "Configure ...", 0, QApplication::UnicodeUTF8));
135 menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8));
136 menu_Emulation->setTitle(QApplication::translate("MainWindow", "&Emulation", 0, QApplication::UnicodeUTF8));
137 menu_View->setTitle(QApplication::translate("MainWindow", "&View", 0, QApplication::UnicodeUTF8));
138 menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", 0, QApplication::UnicodeUTF8));
139 } // retranslateUi
140
141};
142
143namespace Ui {
144 class MainWindow: public Ui_MainWindow {};
145} // namespace Ui
146
147QT_END_NAMESPACE
148
149#endif // UI_MAIN_H
diff --git a/src/citra_qt/src/ui_welcome_wizard.h b/src/citra_qt/src/ui_welcome_wizard.h
new file mode 100644
index 000000000..0cc5ceb49
--- /dev/null
+++ b/src/citra_qt/src/ui_welcome_wizard.h
@@ -0,0 +1,124 @@
1/********************************************************************************
2** Form generated from reading UI file 'welcome_wizard.ui'
3**
4** Created by: Qt User Interface Compiler version 4.8.5
5**
6** WARNING! All changes made in this file will be lost when recompiling UI file!
7********************************************************************************/
8
9#ifndef UI_WELCOME_WIZARD_H
10#define UI_WELCOME_WIZARD_H
11
12#include <QtCore/QVariant>
13#include <QtGui/QAction>
14#include <QtGui/QApplication>
15#include <QtGui/QButtonGroup>
16#include <QtGui/QHBoxLayout>
17#include <QtGui/QHeaderView>
18#include <QtGui/QLineEdit>
19#include <QtGui/QPushButton>
20#include <QtGui/QSpacerItem>
21#include <QtGui/QVBoxLayout>
22#include <QtGui/QWizard>
23#include <QtGui/QWizardPage>
24#include "path_list.hxx"
25
26QT_BEGIN_NAMESPACE
27
28class Ui_WelcomeWizard
29{
30public:
31 QWizardPage *wizardPage1;
32 QWizardPage *wizardPage2;
33 QVBoxLayout *verticalLayout_2;
34 QHBoxLayout *horizontalLayout;
35 QLineEdit *edit_path;
36 QPushButton *button_browse_path;
37 QHBoxLayout *horizontalLayout_2;
38 GPathList *path_list;
39 QVBoxLayout *verticalLayout_3;
40 QPushButton *button_add_path;
41 QSpacerItem *verticalSpacer;
42
43 void setupUi(QWizard *WelcomeWizard)
44 {
45 if (WelcomeWizard->objectName().isEmpty())
46 WelcomeWizard->setObjectName(QString::fromUtf8("WelcomeWizard"));
47 WelcomeWizard->resize(510, 300);
48 WelcomeWizard->setModal(true);
49 wizardPage1 = new QWizardPage();
50 wizardPage1->setObjectName(QString::fromUtf8("wizardPage1"));
51 WelcomeWizard->addPage(wizardPage1);
52 wizardPage2 = new QWizardPage();
53 wizardPage2->setObjectName(QString::fromUtf8("wizardPage2"));
54 verticalLayout_2 = new QVBoxLayout(wizardPage2);
55 verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
56 horizontalLayout = new QHBoxLayout();
57 horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
58 edit_path = new QLineEdit(wizardPage2);
59 edit_path->setObjectName(QString::fromUtf8("edit_path"));
60 edit_path->setReadOnly(true);
61
62 horizontalLayout->addWidget(edit_path);
63
64 button_browse_path = new QPushButton(wizardPage2);
65 button_browse_path->setObjectName(QString::fromUtf8("button_browse_path"));
66
67 horizontalLayout->addWidget(button_browse_path);
68
69
70 verticalLayout_2->addLayout(horizontalLayout);
71
72 horizontalLayout_2 = new QHBoxLayout();
73 horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
74 path_list = new GPathList(wizardPage2);
75 path_list->setObjectName(QString::fromUtf8("path_list"));
76
77 horizontalLayout_2->addWidget(path_list);
78
79 verticalLayout_3 = new QVBoxLayout();
80 verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
81 button_add_path = new QPushButton(wizardPage2);
82 button_add_path->setObjectName(QString::fromUtf8("button_add_path"));
83
84 verticalLayout_3->addWidget(button_add_path);
85
86 verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
87
88 verticalLayout_3->addItem(verticalSpacer);
89
90
91 horizontalLayout_2->addLayout(verticalLayout_3);
92
93
94 verticalLayout_2->addLayout(horizontalLayout_2);
95
96 WelcomeWizard->addPage(wizardPage2);
97
98 retranslateUi(WelcomeWizard);
99
100 QMetaObject::connectSlotsByName(WelcomeWizard);
101 } // setupUi
102
103 void retranslateUi(QWizard *WelcomeWizard)
104 {
105 WelcomeWizard->setWindowTitle(QApplication::translate("WelcomeWizard", "Welcome", 0, QApplication::UnicodeUTF8));
106 wizardPage1->setTitle(QApplication::translate("WelcomeWizard", "Welcome", 0, QApplication::UnicodeUTF8));
107 wizardPage1->setSubTitle(QApplication::translate("WelcomeWizard", "This wizard will guide you through the initial configuration.", 0, QApplication::UnicodeUTF8));
108 wizardPage2->setTitle(QApplication::translate("WelcomeWizard", "ISO paths", 0, QApplication::UnicodeUTF8));
109 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));
110 edit_path->setText(QString());
111 edit_path->setPlaceholderText(QApplication::translate("WelcomeWizard", "Select a path to add ...", 0, QApplication::UnicodeUTF8));
112 button_browse_path->setText(QString());
113 button_add_path->setText(QString());
114 } // retranslateUi
115
116};
117
118namespace Ui {
119 class WelcomeWizard: public Ui_WelcomeWizard {};
120} // namespace Ui
121
122QT_END_NAMESPACE
123
124#endif // UI_WELCOME_WIZARD_H
diff --git a/src/citra_qt/src/version.h b/src/citra_qt/src/version.h
new file mode 100644
index 000000000..07022de5c
--- /dev/null
+++ b/src/citra_qt/src/version.h
@@ -0,0 +1,7 @@
1// TODO: Supposed to be generated...
2// GENERATED - Do not edit!
3#ifndef VERSION_H_
4#define VERSION_H_
5#define __BUILD__ "40"
6#define VERSION __BUILD__
7#endif // VERSION_H_