2014-09-14 13:03:07 -06: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 09:07:17 -06:00
|
|
|
|
2014-09-14 18:44:07 -06:00
|
|
|
#include "Common/StdMakeUnique.h"
|
2014-09-14 13:03:07 -06:00
|
|
|
|
2014-10-18 09:07:17 -06:00
|
|
|
#include "DolphinQt/AboutDialog.h"
|
|
|
|
#include "DolphinQt/MainWindow.h"
|
2014-10-25 07:21:05 -06:00
|
|
|
#include "DolphinQt/SystemInfo.h"
|
2014-10-18 09:07:17 -06:00
|
|
|
#include "DolphinQt/Utils/Resources.h"
|
|
|
|
#include "DolphinQt/Utils/Utils.h"
|
|
|
|
|
|
|
|
DMainWindow::DMainWindow(QWidget* parent_widget)
|
|
|
|
: QMainWindow(parent_widget)
|
2014-09-14 13:03:07 -06:00
|
|
|
{
|
2014-10-25 07:21:05 -06:00
|
|
|
m_ui = std::make_unique<Ui::DMainWindow>();
|
|
|
|
m_ui->setupUi(this);
|
2014-10-18 09:07:17 -06:00
|
|
|
|
|
|
|
Resources::Init();
|
2014-10-25 07:21:05 -06:00
|
|
|
m_ui->actOpen->setIcon(Resources::GetIcon(Resources::TOOLBAR_OPEN));
|
|
|
|
|
|
|
|
#ifdef Q_OS_MACX
|
|
|
|
m_ui->toolbar->setMovable(false);
|
|
|
|
#endif
|
2014-09-14 13:03:07 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
DMainWindow::~DMainWindow()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void DMainWindow::on_actWebsite_triggered()
|
|
|
|
{
|
2014-10-18 09:07:17 -06:00
|
|
|
QDesktopServices::openUrl(QUrl(SL("https://dolphin-emu.org/")));
|
2014-09-14 13:03:07 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
void DMainWindow::on_actOnlineDocs_triggered()
|
|
|
|
{
|
2014-10-18 09:07:17 -06:00
|
|
|
QDesktopServices::openUrl(QUrl(SL("https://dolphin-emu.org/docs/guides/")));
|
2014-09-14 13:03:07 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
void DMainWindow::on_actGitHub_triggered()
|
|
|
|
{
|
2014-10-18 09:07:17 -06:00
|
|
|
QDesktopServices::openUrl(QUrl(SL("https://github.com/dolphin-emu/dolphin/")));
|
2014-09-14 13:03:07 -06:00
|
|
|
}
|
|
|
|
|
2014-10-25 07:21:05 -06:00
|
|
|
void DMainWindow::on_actSystemInfo_triggered()
|
|
|
|
{
|
|
|
|
DSystemInfo* dlg = new DSystemInfo(this);
|
|
|
|
dlg->open();
|
|
|
|
}
|
|
|
|
|
2014-09-14 13:03:07 -06:00
|
|
|
void DMainWindow::on_actAbout_triggered()
|
|
|
|
{
|
2014-10-25 07:21:05 -06:00
|
|
|
DAboutDialog* dlg = new DAboutDialog(this);
|
|
|
|
dlg->open();
|
2014-09-14 13:03:07 -06:00
|
|
|
}
|