mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 22:56:52 +01:00
Fixes to the About dialog & add the SystemInfo dialog.
Also fix the build on Mac OS X.
This commit is contained in:
parent
51700a2b68
commit
69cd8229d8
@ -5,29 +5,27 @@
|
|||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include "AboutDialog.h"
|
|
||||||
#include "ui_AboutDialog.h"
|
#include "ui_AboutDialog.h"
|
||||||
|
|
||||||
#include "Common/Common.h"
|
#include "Common/Common.h"
|
||||||
#include "Common/StdMakeUnique.h"
|
#include "Common/StdMakeUnique.h"
|
||||||
|
|
||||||
DAboutDialog::DAboutDialog(QWidget* p)
|
#include "DolphinQt/AboutDialog.h"
|
||||||
: QDialog(p)
|
#include "DolphinQt/Utils/Utils.h"
|
||||||
|
|
||||||
|
DAboutDialog::DAboutDialog(QWidget* parent_widget)
|
||||||
|
: QDialog(parent_widget)
|
||||||
{
|
{
|
||||||
ui = std::make_unique<Ui::DAboutDialog>();
|
setWindowModality(Qt::WindowModal);
|
||||||
ui->setupUi(this);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
ui->label->setText(ui->label->text().arg(QLatin1String(scm_desc_str),
|
|
||||||
QStringLiteral("2014"),
|
m_ui = std::make_unique<Ui::DAboutDialog>();
|
||||||
QLatin1String(scm_branch_str),
|
m_ui->setupUi(this);
|
||||||
QLatin1String(scm_rev_git_str),
|
m_ui->label->setText(m_ui->label->text().arg(SC(scm_desc_str),
|
||||||
QStringLiteral(__DATE__),
|
SL("2014"), SC(scm_branch_str), SC(scm_rev_git_str),
|
||||||
QStringLiteral(__TIME__)));
|
SL(__DATE__), SL(__TIME__)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DAboutDialog::~DAboutDialog()
|
DAboutDialog::~DAboutDialog()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void DAboutDialog::on_label_linkActivated(const QString &link)
|
|
||||||
{
|
|
||||||
QDesktopServices::openUrl(QUrl(link));
|
|
||||||
}
|
|
||||||
|
@ -17,12 +17,9 @@ class DAboutDialog : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DAboutDialog(QWidget* p = nullptr);
|
explicit DAboutDialog(QWidget* parent_widget = nullptr);
|
||||||
~DAboutDialog();
|
~DAboutDialog();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void on_label_linkActivated(const QString& link);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Ui::DAboutDialog> ui;
|
std::unique_ptr<Ui::DAboutDialog> m_ui;
|
||||||
};
|
};
|
||||||
|
@ -6,57 +6,39 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>375</width>
|
<width>504</width>
|
||||||
<height>534</height>
|
<height>458</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</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">
|
<property name="windowTitle">
|
||||||
<string>About Dolphin</string>
|
<string>About Dolphin</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><big><b>Dolphin</b></big> %1<br>
|
<string><big><b>Dolphin</b></big> %1<br>
|
||||||
© 2003-%2 Dolphin Team<br>
|
© 2003-%2 Dolphin Team<br>
|
||||||
Branch: %3<br>
|
Branch: %3<br>
|
||||||
Revision: %4<br>
|
Revision: %4<br>
|
||||||
Compiled: %5 @ %6<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>
|
Dolphin is a GameCube/Wii emulator, which was originally written by<br>F|RES and ector. Today Dolphin is an open source project with many<br> contributors, too many to list. If interested, just go check out <a href="https://github.com/dolphin-emu/dolphin">the project<br>page</a>.<br>
|
||||||
<br>
|
<br>
|
||||||
Special thanks to Bushing, Costis, CrowTRobo, Marcan, Segher, Titanik, or9, and Hotquik for their reverse engineering and docs/demos.<br>
|
Special thanks to Bushing, Costis, CrowTRobo, Marcan, Segher, Titanik,<br>or9, and Hotquik for their reverse engineering and docs/demos.<br>
|
||||||
<br>
|
<br>
|
||||||
Big thanks to Gilles Mouchard whose Microlib PPC emulator gave our development a kickstart.<br>
|
Big thanks to Gilles Mouchard whose Microlib PPC emulator gave our<br> development a kickstart.<br>
|
||||||
<br>
|
<br>
|
||||||
Thanks to Frank Wille for his PowerPC disassembler, which or9 and we modified to include Gekko specifics.<br>
|
Thanks to Frank Wille for his PowerPC disassembler, which or9 and we<br> modified to include Gekko specifics.<br>
|
||||||
<br>
|
<br>
|
||||||
Thanks to hcs/destop for their GC ADPCM decoder.<br>
|
Thanks to hcs/destop for their GC ADPCM decoder.<br>
|
||||||
<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>
|
We are not affiliated with Nintendo in any way. GameCube and Wii are<br> trademarks of Nintendo. This emulator should not be used to play games<br>you do not legally own.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::RichText</enum>
|
<enum>Qt::RichText</enum>
|
||||||
@ -64,12 +46,12 @@ We are not affiliated with Nintendo in any way. GameCube and Wii are trademarks
|
|||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
@ -7,21 +7,35 @@ set(CMAKE_AUTOMOC ON)
|
|||||||
set(SRCS
|
set(SRCS
|
||||||
AboutDialog.cpp
|
AboutDialog.cpp
|
||||||
AboutDialog.h
|
AboutDialog.h
|
||||||
|
Host.cpp
|
||||||
Main.cpp
|
Main.cpp
|
||||||
MainWindow.cpp
|
MainWindow.cpp
|
||||||
MainWindow.h
|
MainWindow.h
|
||||||
Host.cpp
|
SystemInfo.cpp
|
||||||
Utils/Resources.cpp
|
Utils/Resources.cpp
|
||||||
Utils/Utils.cpp
|
Utils/Utils.cpp
|
||||||
VideoInterface/VideoInterface.cpp)
|
VideoInterface/VideoInterface.cpp
|
||||||
|
)
|
||||||
|
|
||||||
set(UIS
|
set(UIS
|
||||||
AboutDialog.ui
|
AboutDialog.ui
|
||||||
MainWindow.ui)
|
MainWindow.ui
|
||||||
|
SystemInfo.ui
|
||||||
|
)
|
||||||
|
|
||||||
set(LIBS core uicommon)
|
set(LIBS core uicommon)
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
# Link against OS X system frameworks.
|
||||||
|
list(APPEND LIBS
|
||||||
|
${APPKIT_LIBRARY}
|
||||||
|
${AU_LIBRARY}
|
||||||
|
${COREAUDIO_LIBRARY}
|
||||||
|
${COREFUND_LIBRARY}
|
||||||
|
${CORESERV_LIBRARY}
|
||||||
|
${IOK_LIBRARY}
|
||||||
|
${FORCEFEEDBACK}
|
||||||
|
)
|
||||||
set(DOLPHINQT_BINARY DolphinQt)
|
set(DOLPHINQT_BINARY DolphinQt)
|
||||||
else()
|
else()
|
||||||
set(DOLPHINQT_BINARY dolphin-emu-qt)
|
set(DOLPHINQT_BINARY dolphin-emu-qt)
|
||||||
|
@ -61,11 +61,14 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="AboutDialog.h" />
|
<QtMoc Include="AboutDialog.h" />
|
||||||
<QtMoc Include="MainWindow.h" />
|
<QtMoc Include="MainWindow.h" />
|
||||||
|
<QtMoc Include="SystemInfo.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!--TODO figure out how to get QtMoc to add outputs to ClCompile's inputs...-->
|
<!--TODO figure out how to get QtMoc to add outputs to ClCompile's inputs...-->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="$(QtMocOutPrefix)AboutDialog.cpp" />
|
<ClCompile Include="$(QtMocOutPrefix)AboutDialog.cpp" />
|
||||||
<ClCompile Include="$(QtMocOutPrefix)MainWindow.cpp" />
|
<ClCompile Include="$(QtMocOutPrefix)MainWindow.cpp" />
|
||||||
|
<ClCompile Include="$(QtMocOutPrefix)SystemInfo.cpp" />
|
||||||
|
<ClCompile Include="SystemInfo.cpp" />
|
||||||
<ClCompile Include="Utils\Resources.cpp" />
|
<ClCompile Include="Utils\Resources.cpp" />
|
||||||
<ClCompile Include="Utils\Utils.cpp" />
|
<ClCompile Include="Utils\Utils.cpp" />
|
||||||
<ClCompile Include="VideoInterface\VideoInterface.cpp" />
|
<ClCompile Include="VideoInterface\VideoInterface.cpp" />
|
||||||
|
@ -14,10 +14,12 @@
|
|||||||
<ClCompile Include="Utils\Utils.cpp">
|
<ClCompile Include="Utils\Utils.cpp">
|
||||||
<Filter>Utils</Filter>
|
<Filter>Utils</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="SystemInfo.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="AboutDialog.h" />
|
<QtMoc Include="AboutDialog.h" />
|
||||||
<QtMoc Include="MainWindow.h" />
|
<QtMoc Include="MainWindow.h" />
|
||||||
|
<QtMoc Include="SystemInfo.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtUi Include="*.ui" />
|
<QtUi Include="*.ui" />
|
||||||
|
@ -11,17 +11,22 @@
|
|||||||
|
|
||||||
#include "DolphinQt/AboutDialog.h"
|
#include "DolphinQt/AboutDialog.h"
|
||||||
#include "DolphinQt/MainWindow.h"
|
#include "DolphinQt/MainWindow.h"
|
||||||
|
#include "DolphinQt/SystemInfo.h"
|
||||||
#include "DolphinQt/Utils/Resources.h"
|
#include "DolphinQt/Utils/Resources.h"
|
||||||
#include "DolphinQt/Utils/Utils.h"
|
#include "DolphinQt/Utils/Utils.h"
|
||||||
|
|
||||||
DMainWindow::DMainWindow(QWidget* parent_widget)
|
DMainWindow::DMainWindow(QWidget* parent_widget)
|
||||||
: QMainWindow(parent_widget)
|
: QMainWindow(parent_widget)
|
||||||
{
|
{
|
||||||
ui = std::make_unique<Ui::DMainWindow>();
|
m_ui = std::make_unique<Ui::DMainWindow>();
|
||||||
ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
Resources::Init();
|
Resources::Init();
|
||||||
ui->actOpen->setIcon(Resources::GetIcon(Resources::TOOLBAR_OPEN));
|
m_ui->actOpen->setIcon(Resources::GetIcon(Resources::TOOLBAR_OPEN));
|
||||||
|
|
||||||
|
#ifdef Q_OS_MACX
|
||||||
|
m_ui->toolbar->setMovable(false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DMainWindow::~DMainWindow()
|
DMainWindow::~DMainWindow()
|
||||||
@ -43,8 +48,14 @@ void DMainWindow::on_actGitHub_triggered()
|
|||||||
QDesktopServices::openUrl(QUrl(SL("https://github.com/dolphin-emu/dolphin/")));
|
QDesktopServices::openUrl(QUrl(SL("https://github.com/dolphin-emu/dolphin/")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DMainWindow::on_actSystemInfo_triggered()
|
||||||
|
{
|
||||||
|
DSystemInfo* dlg = new DSystemInfo(this);
|
||||||
|
dlg->open();
|
||||||
|
}
|
||||||
|
|
||||||
void DMainWindow::on_actAbout_triggered()
|
void DMainWindow::on_actAbout_triggered()
|
||||||
{
|
{
|
||||||
DAboutDialog dlg;
|
DAboutDialog* dlg = new DAboutDialog(this);
|
||||||
dlg.exec();
|
dlg->open();
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,9 @@ private slots:
|
|||||||
void on_actWebsite_triggered();
|
void on_actWebsite_triggered();
|
||||||
void on_actOnlineDocs_triggered();
|
void on_actOnlineDocs_triggered();
|
||||||
void on_actGitHub_triggered();
|
void on_actGitHub_triggered();
|
||||||
|
void on_actSystemInfo_triggered();
|
||||||
void on_actAbout_triggered();
|
void on_actAbout_triggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Ui::DMainWindow> ui;
|
std::unique_ptr<Ui::DMainWindow> m_ui;
|
||||||
};
|
};
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>996</width>
|
<width>992</width>
|
||||||
<height>596</height>
|
<height>592</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -31,8 +31,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>996</width>
|
<width>992</width>
|
||||||
<height>21</height>
|
<height>24</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="mnuFile">
|
<widget class="QMenu" name="mnuFile">
|
||||||
@ -69,6 +69,7 @@
|
|||||||
<addaction name="actOnlineDocs"/>
|
<addaction name="actOnlineDocs"/>
|
||||||
<addaction name="actGitHub"/>
|
<addaction name="actGitHub"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actSystemInfo"/>
|
||||||
<addaction name="actAbout"/>
|
<addaction name="actAbout"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="mnuMovie">
|
<widget class="QMenu" name="mnuMovie">
|
||||||
@ -87,7 +88,7 @@
|
|||||||
<widget class="QStatusBar" name="statusbar"/>
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
<widget class="QToolBar" name="toolbar">
|
<widget class="QToolBar" name="toolbar">
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>toolBar</string>
|
<string>Toolbar</string>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
<enum>TopToolBarArea</enum>
|
<enum>TopToolBarArea</enum>
|
||||||
@ -119,11 +120,19 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actOpen">
|
<action name="actOpen">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Open</string>
|
<string>&Open</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Open file...</string>
|
<string>Open file...</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+O</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actSystemInfo">
|
||||||
|
<property name="text">
|
||||||
|
<string>&System Information</string>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
106
Source/Core/DolphinQt/SystemInfo.cpp
Normal file
106
Source/Core/DolphinQt/SystemInfo.cpp
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
// Copyright 2014 Dolphin Emulator Project
|
||||||
|
// Licensed under GPLv2
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <QClipboard>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
|
#include "ui_SystemInfo.h"
|
||||||
|
|
||||||
|
#include "Common/Common.h"
|
||||||
|
#include "Common/CPUDetect.h"
|
||||||
|
#include "Common/StdMakeUnique.h"
|
||||||
|
|
||||||
|
#include "DolphinQt/SystemInfo.h"
|
||||||
|
#include "DolphinQt/Utils/Utils.h"
|
||||||
|
|
||||||
|
DSystemInfo::DSystemInfo(QWidget* parent_widget) :
|
||||||
|
QDialog(parent_widget)
|
||||||
|
{
|
||||||
|
setWindowModality(Qt::WindowModal);
|
||||||
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
|
m_ui = std::make_unique<Ui::DSystemInfo>();
|
||||||
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
|
UpdateSystemInfo();
|
||||||
|
|
||||||
|
QPushButton* btn = m_ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||||
|
connect(btn, SIGNAL(pressed()), this, SLOT(btnCopy_pressed()));
|
||||||
|
}
|
||||||
|
|
||||||
|
DSystemInfo::~DSystemInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void DSystemInfo::btnCopy_pressed()
|
||||||
|
{
|
||||||
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
clipboard->setText(m_ui->txtSysInfo->toPlainText());
|
||||||
|
}
|
||||||
|
|
||||||
|
void DSystemInfo::UpdateSystemInfo()
|
||||||
|
{
|
||||||
|
QString sysinfo;
|
||||||
|
|
||||||
|
sysinfo += SL("System\n===========================\n");
|
||||||
|
sysinfo += SL("OS: %1\n").arg(GetOS());
|
||||||
|
sysinfo += SL("CPU: %1, %2 cores\n").arg(QString::fromStdString(cpu_info.Summarize()))
|
||||||
|
.arg(QThread::idealThreadCount());
|
||||||
|
|
||||||
|
sysinfo += SL("\nDolphin\n===========================\n");
|
||||||
|
sysinfo += SL("SCM: branch %1, rev %2\n").arg(SC(scm_branch_str)).arg(SC(scm_rev_git_str));
|
||||||
|
sysinfo += SL("Compiled: %1, %2\n").arg(SL(__DATE__)).arg(SL(__TIME__));
|
||||||
|
|
||||||
|
sysinfo += SL("\nGUI\n===========================\n");
|
||||||
|
sysinfo += SL("Compiled for Qt: %1\n").arg(SL(QT_VERSION_STR));
|
||||||
|
sysinfo += SL("Running on Qt: %1").arg(SC(qVersion()));
|
||||||
|
|
||||||
|
m_ui->txtSysInfo->setPlainText(sysinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString DSystemInfo::GetOS()
|
||||||
|
{
|
||||||
|
QString ret;
|
||||||
|
/* DON'T REORDER WITHOUT READING Qt DOCS! */
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
ret += SL("Windows ");
|
||||||
|
switch (QSysInfo::WindowsVersion) {
|
||||||
|
case QSysInfo::WV_VISTA: ret += SL("Vista"); break;
|
||||||
|
case QSysInfo::WV_WINDOWS7: ret += SL("7"); break;
|
||||||
|
case QSysInfo::WV_WINDOWS8: ret += SL("8"); break;
|
||||||
|
default: ret += SL("(unknown)"); break;
|
||||||
|
}
|
||||||
|
#elif defined(Q_OS_MAC)
|
||||||
|
ret += SL("Mac OS X ");
|
||||||
|
switch (QSysInfo::MacintoshVersion) {
|
||||||
|
case QSysInfo::MV_10_7: ret += SL("10.7"); break;
|
||||||
|
case QSysInfo::MV_10_8: ret += SL("10.8"); break;
|
||||||
|
case QSysInfo::MV_10_9: ret += SL("10.9"); break;
|
||||||
|
default: ret += SL("(unknown)"); break;
|
||||||
|
}
|
||||||
|
#elif defined(Q_OS_LINUX)
|
||||||
|
ret += SL("Linux");
|
||||||
|
#elif defined(Q_OS_FREEBSD)
|
||||||
|
ret += SL("FreeBSD");
|
||||||
|
#elif defined(Q_OS_OPENBSD)
|
||||||
|
ret += SL("OpenBSD");
|
||||||
|
#elif defined(Q_OS_NETBSD)
|
||||||
|
ret += SL("NetBSD");
|
||||||
|
#elif defined(Q_OS_BSD4)
|
||||||
|
ret += SL("Other BSD");
|
||||||
|
#elif defined(Q_OS_UNIX)
|
||||||
|
ret += SL("Unix");
|
||||||
|
#else
|
||||||
|
ret += SL("Unknown");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(Q_WS_X11) || defined(Q_OS_X11)
|
||||||
|
ret += SL(" X11");
|
||||||
|
#elif defined(Q_WS_WAYLAND)
|
||||||
|
ret += SL(" Wayland");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
31
Source/Core/DolphinQt/SystemInfo.h
Normal file
31
Source/Core/DolphinQt/SystemInfo.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// Copyright 2014 Dolphin Emulator Project
|
||||||
|
// Licensed under GPLv2
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui
|
||||||
|
{
|
||||||
|
class DSystemInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DSystemInfo : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit DSystemInfo(QWidget* parent_widget = nullptr);
|
||||||
|
~DSystemInfo();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void btnCopy_pressed();
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::unique_ptr<Ui::DSystemInfo> m_ui;
|
||||||
|
|
||||||
|
void UpdateSystemInfo();
|
||||||
|
QString GetOS();
|
||||||
|
};
|
71
Source/Core/DolphinQt/SystemInfo.ui
Normal file
71
Source/Core/DolphinQt/SystemInfo.ui
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>DSystemInfo</class>
|
||||||
|
<widget class="QDialog" name="DSystemInfo">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>446</width>
|
||||||
|
<height>298</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>System Information</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QPlainTextEdit" name="txtSysInfo">
|
||||||
|
<property name="readOnly">
|
||||||
|
<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::Close</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>DSystemInfo</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>DSystemInfo</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@ -8,7 +8,11 @@
|
|||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
// Shorter version of QStringLiteral(str)
|
// Use this to encapsulate ASCII string literals
|
||||||
#define SL(str) QStringLiteral(str)
|
#define SL(str) QStringLiteral(str)
|
||||||
|
|
||||||
|
// Use this to encapsulate string constants and functions that
|
||||||
|
// return "char*"s
|
||||||
|
#define SC(str) QString::fromLatin1(str)
|
||||||
|
|
||||||
QString NiceSizeFormat(s64 size);
|
QString NiceSizeFormat(s64 size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user