2014-09-14 19:03:07 +00:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include <QDesktopServices>
|
|
|
|
#include <QUrl>
|
|
|
|
|
|
|
|
#include "ui_MainWindow.h"
|
2014-10-18 15:07:17 +00:00
|
|
|
|
2014-09-15 00:44:07 +00:00
|
|
|
#include "Common/StdMakeUnique.h"
|
2014-09-14 19:03:07 +00:00
|
|
|
|
2014-10-18 15:07:17 +00:00
|
|
|
#include "DolphinQt/AboutDialog.h"
|
|
|
|
#include "DolphinQt/MainWindow.h"
|
2014-10-25 13:21:05 +00:00
|
|
|
#include "DolphinQt/SystemInfo.h"
|
2014-10-18 15:07:17 +00:00
|
|
|
#include "DolphinQt/Utils/Resources.h"
|
|
|
|
#include "DolphinQt/Utils/Utils.h"
|
|
|
|
|
|
|
|
DMainWindow::DMainWindow(QWidget* parent_widget)
|
|
|
|
: QMainWindow(parent_widget)
|
2014-09-14 19:03:07 +00:00
|
|
|
{
|
2014-10-25 13:21:05 +00:00
|
|
|
m_ui = std::make_unique<Ui::DMainWindow>();
|
|
|
|
m_ui->setupUi(this);
|
2014-10-18 15:07:17 +00:00
|
|
|
|
|
|
|
Resources::Init();
|
2014-10-25 13:21:05 +00:00
|
|
|
m_ui->actOpen->setIcon(Resources::GetIcon(Resources::TOOLBAR_OPEN));
|
|
|
|
|
|
|
|
#ifdef Q_OS_MACX
|
|
|
|
m_ui->toolbar->setMovable(false);
|
|
|
|
#endif
|
2014-09-14 19:03:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DMainWindow::~DMainWindow()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void DMainWindow::on_actWebsite_triggered()
|
|
|
|
{
|
2014-10-18 15:07:17 +00:00
|
|
|
QDesktopServices::openUrl(QUrl(SL("https://dolphin-emu.org/")));
|
2014-09-14 19:03:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DMainWindow::on_actOnlineDocs_triggered()
|
|
|
|
{
|
2014-10-18 15:07:17 +00:00
|
|
|
QDesktopServices::openUrl(QUrl(SL("https://dolphin-emu.org/docs/guides/")));
|
2014-09-14 19:03:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void DMainWindow::on_actGitHub_triggered()
|
|
|
|
{
|
2014-10-18 15:07:17 +00:00
|
|
|
QDesktopServices::openUrl(QUrl(SL("https://github.com/dolphin-emu/dolphin/")));
|
2014-09-14 19:03:07 +00:00
|
|
|
}
|
|
|
|
|
2014-10-25 13:21:05 +00:00
|
|
|
void DMainWindow::on_actSystemInfo_triggered()
|
|
|
|
{
|
|
|
|
DSystemInfo* dlg = new DSystemInfo(this);
|
|
|
|
dlg->open();
|
|
|
|
}
|
|
|
|
|
2014-09-14 19:03:07 +00:00
|
|
|
void DMainWindow::on_actAbout_triggered()
|
|
|
|
{
|
2014-10-25 13:21:05 +00:00
|
|
|
DAboutDialog* dlg = new DAboutDialog(this);
|
|
|
|
dlg->open();
|
2014-09-14 19:03:07 +00:00
|
|
|
}
|