mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Merge pull request #1090 from shuffle2/dolphin-qt
DolphinQt -- initial commit
This commit is contained in:
@ -6,3 +6,7 @@ add_subdirectory(DolphinWX)
|
||||
add_subdirectory(InputCommon)
|
||||
add_subdirectory(VideoCommon)
|
||||
add_subdirectory(VideoBackends)
|
||||
|
||||
if(ENABLE_QT)
|
||||
add_subdirectory(DolphinQt)
|
||||
endif()
|
||||
|
33
Source/Core/DolphinQt/AboutDialog.cpp
Normal file
33
Source/Core/DolphinQt/AboutDialog.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2014 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
#include "AboutDialog.h"
|
||||
#include "ui_AboutDialog.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/StdMakeUnique.h"
|
||||
|
||||
DAboutDialog::DAboutDialog(QWidget* p)
|
||||
: QDialog(p)
|
||||
{
|
||||
ui = std::make_unique<Ui::DAboutDialog>();
|
||||
ui->setupUi(this);
|
||||
ui->label->setText(ui->label->text().arg(QLatin1String(scm_desc_str),
|
||||
QStringLiteral("2014"),
|
||||
QLatin1String(scm_branch_str),
|
||||
QLatin1String(scm_rev_git_str),
|
||||
QStringLiteral(__DATE__),
|
||||
QStringLiteral(__TIME__)));
|
||||
}
|
||||
|
||||
DAboutDialog::~DAboutDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void DAboutDialog::on_label_linkActivated(const QString &link)
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(link));
|
||||
}
|
28
Source/Core/DolphinQt/AboutDialog.h
Normal file
28
Source/Core/DolphinQt/AboutDialog.h
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2014 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <QDialog>
|
||||
|
||||
// Predefinitions
|
||||
namespace Ui {
|
||||
class DAboutDialog;
|
||||
}
|
||||
|
||||
class DAboutDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DAboutDialog(QWidget* p = nullptr);
|
||||
~DAboutDialog();
|
||||
|
||||
private slots:
|
||||
void on_label_linkActivated(const QString& link);
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::DAboutDialog> ui;
|
||||
};
|
103
Source/Core/DolphinQt/AboutDialog.ui
Normal file
103
Source/Core/DolphinQt/AboutDialog.ui
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DAboutDialog</class>
|
||||
<widget class="QDialog" name="DAboutDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>375</width>
|
||||
<height>534</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>375</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>375</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About Dolphin</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><big><b>Dolphin</b></big> %1<br>
|
||||
© 2003-%2 Dolphin Team<br>
|
||||
Branch: %3<br>
|
||||
Revision: %4<br>
|
||||
Compiled: %5 @ %6<br>
|
||||
Dolphin is a GameCube/Wii emulator, which was originally written by F|RES and ector. Today Dolphin is an open source project with many contributors, too many to list. If interested, just go check out <a href="https://github.com/dolphin-emu/dolphin">the project page</a>.<br>
|
||||
<br>
|
||||
Special thanks to Bushing, Costis, CrowTRobo, Marcan, Segher, Titanik, or9, and Hotquik for their reverse engineering and docs/demos.<br>
|
||||
<br>
|
||||
Big thanks to Gilles Mouchard whose Microlib PPC emulator gave our development a kickstart.<br>
|
||||
<br>
|
||||
Thanks to Frank Wille for his PowerPC disassembler, which or9 and we modified to include Gekko specifics.<br>
|
||||
<br>
|
||||
Thanks to hcs/destop for their GC ADPCM decoder.<br>
|
||||
<br>
|
||||
We are not affiliated with Nintendo in any way. GameCube and Wii are trademarks of Nintendo. This emulator should not be used to play games you do not legally own.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>DAboutDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
28
Source/Core/DolphinQt/CMakeLists.txt
Normal file
28
Source/Core/DolphinQt/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
||||
# because of generated UI files
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
set(SRCS
|
||||
AboutDialog.cpp
|
||||
AboutDialog.h
|
||||
Main.cpp
|
||||
MainWindow.cpp
|
||||
MainWindow.h)
|
||||
|
||||
set(UIS
|
||||
AboutDialog.ui
|
||||
MainWindow.ui)
|
||||
|
||||
set(LIBS common)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(DOLPHINQT_BINARY DolphinQt)
|
||||
else()
|
||||
set(DOLPHINQT_BINARY dolphin-emu-qt)
|
||||
endif()
|
||||
|
||||
qt5_wrap_ui(UI_HEADERS ${UIS})
|
||||
add_executable(${DOLPHINQT_BINARY} ${SRCS} ${UI_HEADERS})
|
||||
target_link_libraries(${DOLPHINQT_BINARY} ${LIBS})
|
||||
qt5_use_modules(${DOLPHINQT_BINARY} Widgets)
|
152
Source/Core/DolphinQt/DolphinQt.vcxproj
Normal file
152
Source/Core/DolphinQt/DolphinQt.vcxproj
Normal file
@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{69D2B16E-122A-4E5D-8C37-8EC7B0F7CEB0}</ProjectGuid>
|
||||
<!--
|
||||
Enable this once wxwidgets is completely removed
|
||||
<ProjectName>Dolphin</ProjectName>
|
||||
-->
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\VSProps\Base.props" />
|
||||
<Import Project="..\..\VSProps\PCHUse.props" />
|
||||
<Import Project="..\..\VSProps\QtCompile.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<BaseAddress>0x00400000</BaseAddress>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<FixedBaseAddress>true</FixedBaseAddress>
|
||||
<AdditionalLibraryDirectories>$(ExternalsDir)OpenAL\$(PlatformName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>iphlpapi.lib;winmm.lib;setupapi.lib;vfw32.lib;opengl32.lib;glu32.lib;rpcrt4.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<!--QRC and UI files are handled automatically-->
|
||||
<ItemGroup>
|
||||
<QtResource Include="*.qrc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUi Include="*.ui" />
|
||||
</ItemGroup>
|
||||
<!--MOC files need to be listed. Perhaps scan for Q_OBJECT in the future? (like automoc)-->
|
||||
<!--NOTE: When adding moc'd files, you must list the outputs in the following ItemGroup!-->
|
||||
<ItemGroup>
|
||||
<QtMoc Include="AboutDialog.h" />
|
||||
<QtMoc Include="MainWindow.h" />
|
||||
</ItemGroup>
|
||||
<!--TODO figure out how to get QtMoc to add outputs to ClCompile's inputs...-->
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(QtMocOutPrefix)AboutDialog.cpp" />
|
||||
<ClCompile Include="$(QtMocOutPrefix)MainWindow.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AboutDialog.cpp" />
|
||||
<ClCompile Include="Main.cpp" />
|
||||
<ClCompile Include="MainWindow.cpp" />
|
||||
</ItemGroup>
|
||||
<!--Put standard C/C++ headers here-->
|
||||
<!--
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Main.h" />
|
||||
</ItemGroup>
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Text Include="CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(ExternalsDir)Bochs_disasm\Bochs_disasm.vcxproj">
|
||||
<Project>{8ada04d7-6db1-4da4-ab55-64fb12a0997b}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(ExternalsDir)libpng\png\png.vcxproj">
|
||||
<Project>{4c9f135b-a85e-430c-bad4-4c67ef5fc12c}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(ExternalsDir)LZO\LZO.vcxproj">
|
||||
<Project>{ab993f38-c31d-4897-b139-a620c42bc565}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(ExternalsDir)SFML\build\vc2010\SFML_Network.vcxproj">
|
||||
<Project>{93d73454-2512-424e-9cda-4bb357fe13dd}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(ExternalsDir)zlib\zlib.vcxproj">
|
||||
<Project>{ff213b23-2c26-4214-9f88-85271e557e87}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)AudioCommon\AudioCommon.vcxproj">
|
||||
<Project>{54aa7840-5beb-4a0c-9452-74ba4cc7fd44}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)Common\Common.vcxproj">
|
||||
<Project>{2e6c348c-c75c-4d94-8d1e-9c1fcbf3efe4}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)Common\SCMRevGen.vcxproj">
|
||||
<Project>{41279555-f94f-4ebc-99de-af863c10c5c4}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)Core\Core.vcxproj">
|
||||
<Project>{e54cf649-140e-4255-81a5-30a673c1fb36}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)DiscIO\DiscIO.vcxproj">
|
||||
<Project>{160bdc25-5626-4b0d-bdd8-2953d9777fb5}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)InputCommon\InputCommon.vcxproj">
|
||||
<Project>{6bbd47cf-91fd-4077-b676-8b76980178a9}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)VideoBackends\D3D\D3D.vcxproj">
|
||||
<Project>{96020103-4ba5-4fd2-b4aa-5b6d24492d4e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)VideoBackends\OGL\OGL.vcxproj">
|
||||
<Project>{ec1a314c-5588-4506-9c1e-2e58e5817f75}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)VideoBackends\Software\Software.vcxproj">
|
||||
<Project>{a4c423aa-f57c-46c7-a172-d1a777017d29}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="$(CoreDir)VideoCommon\VideoCommon.vcxproj">
|
||||
<Project>{3de9ee35-3e91-4f27-a014-2866ad8c3fe3}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\VSProps\QtCompile.targets" />
|
||||
</ImportGroup>
|
||||
<!--Copy Exe, Data directory and DLLs which should be located in the executable directory-->
|
||||
<ItemGroup>
|
||||
<DataDirFiles Include="$(DolphinRootDir)Data\**\*.*" />
|
||||
<ExternalDlls Include="$(ExternalsDir)OpenAL\$(PlatformName)\*.dll;$(ExternalsDir)msvcrt\$(PlatformName)\*.dll" />
|
||||
<BinaryFiles Include="$(TargetPath)" />
|
||||
<AllInputFiles Include="@(DataDirFiles);@(ExternalDlls);@(BinaryFiles)" />
|
||||
</ItemGroup>
|
||||
<!--Disable copying to binary dir for now on the buildbot to prevent packaging of the outputs-->
|
||||
<Target Name="AfterBuild" Inputs="@(AllInputFiles)" Outputs="@(AllInputFiles -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
Condition="'$(I_AM_BUILDACUS)'==''">
|
||||
<Message Text="Copying Data directory..." Importance="High" />
|
||||
<Copy SourceFiles="@(DataDirFiles)" DestinationFolder="$(BinaryOutputDir)%(RecursiveDir)" Condition="!Exists('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(DataDirFiles.Extension)') OR $([System.DateTime]::Parse('%(ModifiedTime)').Ticks) > $([System.IO.File]::GetLastWriteTime('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(DataDirFiles.Extension)').Ticks)" />
|
||||
<Message Text="Copying External .dlls" Importance="High" />
|
||||
<Copy SourceFiles="@(ExternalDlls)" DestinationFolder="$(BinaryOutputDir)" Condition="!Exists('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(ExternalDlls.Extension)') OR $([System.DateTime]::Parse('%(ModifiedTime)').Ticks) > $([System.IO.File]::GetLastWriteTime('$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(ExternalDlls.Extension)').Ticks)" />
|
||||
<Message Text="Copy: @(BinaryFiles) -> $(BinaryOutputDir)" Importance="High" />
|
||||
<Copy SourceFiles="@(BinaryFiles)" DestinationFolder="$(BinaryOutputDir)" />
|
||||
</Target>
|
||||
</Project>
|
10
Source/Core/DolphinQt/DolphinQt.vcxproj.user
Normal file
10
Source/Core/DolphinQt/DolphinQt.vcxproj.user
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<!--For some stupid reason this has to be in the .user file...-->
|
||||
<LocalDebuggerCommand>$(BinaryOutputDir)$(TargetFileName)</LocalDebuggerCommand>
|
||||
<LocalDebuggerWorkingDirectory>$(BinaryOutputDir)</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<ShowAllFiles>false</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
54
Source/Core/DolphinQt/Main.cpp
Normal file
54
Source/Core/DolphinQt/Main.cpp
Normal file
@ -0,0 +1,54 @@
|
||||
// Copyright 2014 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDesktopServices>
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include <QSysInfo>
|
||||
#include <QUrl>
|
||||
|
||||
#include "MainWindow.h"
|
||||
|
||||
static bool IsOsSupported()
|
||||
{
|
||||
#ifdef Q_OS_OSX
|
||||
return QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7;
|
||||
#elif defined(Q_OS_WIN)
|
||||
return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) >= QSysInfo::WV_VISTA;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static QString LowestSupportedOsVersion()
|
||||
{
|
||||
#ifdef Q_OS_OSX
|
||||
return QStringLiteral("Mac OS X 10.7");
|
||||
#elif defined(Q_OS_WIN)
|
||||
return QStringLiteral("Windows Vista SP2");
|
||||
#else
|
||||
return QStringLiteral("Unknown");
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
// TODO: Add command line options
|
||||
|
||||
if (!IsOsSupported())
|
||||
{
|
||||
QMessageBox::critical(nullptr, QObject::tr("Unsupported OS"),
|
||||
QObject::tr("Dolphin requires %1 or greater.\n"
|
||||
"Please upgrade to %1 or greater to use Dolphin.")
|
||||
.arg(LowestSupportedOsVersion()));
|
||||
return 1;
|
||||
}
|
||||
|
||||
DMainWindow w;
|
||||
w.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
43
Source/Core/DolphinQt/MainWindow.cpp
Normal file
43
Source/Core/DolphinQt/MainWindow.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
// Copyright 2014 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
#include "AboutDialog.h"
|
||||
#include "MainWindow.h"
|
||||
#include "ui_MainWindow.h"
|
||||
#include "Common/StdMakeUnique.h"
|
||||
|
||||
DMainWindow::DMainWindow(QWidget* p)
|
||||
: QMainWindow(p)
|
||||
{
|
||||
ui = std::make_unique<Ui::DMainWindow>();
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
DMainWindow::~DMainWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void DMainWindow::on_actWebsite_triggered()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/")));
|
||||
}
|
||||
|
||||
void DMainWindow::on_actOnlineDocs_triggered()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/docs/guides/")));
|
||||
}
|
||||
|
||||
void DMainWindow::on_actGitHub_triggered()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(QStringLiteral("https://github.com/dolphin-emu/dolphin/")));
|
||||
}
|
||||
|
||||
void DMainWindow::on_actAbout_triggered()
|
||||
{
|
||||
DAboutDialog dlg;
|
||||
dlg.exec();
|
||||
}
|
33
Source/Core/DolphinQt/MainWindow.h
Normal file
33
Source/Core/DolphinQt/MainWindow.h
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2014 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <QMainWindow>
|
||||
|
||||
// Predefinitions
|
||||
namespace Ui {
|
||||
class DMainWindow;
|
||||
}
|
||||
|
||||
class DMainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DMainWindow(QWidget* p = nullptr);
|
||||
~DMainWindow();
|
||||
|
||||
private slots:
|
||||
|
||||
// Help menu
|
||||
void on_actWebsite_triggered();
|
||||
void on_actOnlineDocs_triggered();
|
||||
void on_actGitHub_triggered();
|
||||
void on_actAbout_triggered();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::DMainWindow> ui;
|
||||
};
|
115
Source/Core/DolphinQt/MainWindow.ui
Normal file
115
Source/Core/DolphinQt/MainWindow.ui
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DMainWindow</class>
|
||||
<widget class="QMainWindow" name="DMainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>998</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dolphin</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<property name="unifiedTitleAndToolBarOnMac">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QStackedWidget" name="wgtCentral"/>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>998</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="mnuFile">
|
||||
<property name="title">
|
||||
<string>Fi&le</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="mnuEmulation">
|
||||
<property name="title">
|
||||
<string>E&mulation</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="mnuOptions">
|
||||
<property name="title">
|
||||
<string>Optio&ns</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="mnuTools">
|
||||
<property name="title">
|
||||
<string>Tools</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="mnuView">
|
||||
<property name="title">
|
||||
<string>&View</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="mnuHelp">
|
||||
<property name="title">
|
||||
<string>Help</string>
|
||||
</property>
|
||||
<addaction name="actWebsite"/>
|
||||
<addaction name="actOnlineDocs"/>
|
||||
<addaction name="actGitHub"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actAbout"/>
|
||||
</widget>
|
||||
<addaction name="mnuFile"/>
|
||||
<addaction name="mnuEmulation"/>
|
||||
<addaction name="mnuOptions"/>
|
||||
<addaction name="mnuTools"/>
|
||||
<addaction name="mnuView"/>
|
||||
<addaction name="mnuHelp"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<widget class="QToolBar" name="toolbar">
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<action name="actWebsite">
|
||||
<property name="text">
|
||||
<string>&Website</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actOnlineDocs">
|
||||
<property name="text">
|
||||
<string>&Online Documentation</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actGitHub">
|
||||
<property name="text">
|
||||
<string>&Dolphin at GitHub</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actAbout">
|
||||
<property name="text">
|
||||
<string>&About</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Reference in New Issue
Block a user