2014-09-14 13:03:07 -06:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-09-14 18:44:07 -06:00
|
|
|
#include <memory>
|
2014-09-14 13:03:07 -06:00
|
|
|
#include <QMainWindow>
|
|
|
|
|
2014-11-02 11:53:48 -07:00
|
|
|
#include "Core/Core.h"
|
|
|
|
|
|
|
|
#include "DolphinQt/VideoInterface/RenderWidget.h"
|
|
|
|
|
2014-09-14 13:03:07 -06:00
|
|
|
// Predefinitions
|
2014-10-27 11:11:39 -06:00
|
|
|
namespace Ui
|
|
|
|
{
|
2014-09-14 13:03:07 -06:00
|
|
|
class DMainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class DMainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2014-10-18 09:07:17 -06:00
|
|
|
explicit DMainWindow(QWidget* parent_widget = nullptr);
|
2014-09-14 13:03:07 -06:00
|
|
|
~DMainWindow();
|
|
|
|
|
2014-11-02 11:53:48 -07:00
|
|
|
// DRenderWidget
|
|
|
|
void RenderWidgetSize(int& x_pos, int& y_pos, int& w, int& h);
|
|
|
|
bool RenderWidgetHasFocus();
|
|
|
|
DRenderWidget* GetRenderWidget() { return m_render_widget.get(); }
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void CoreStateChanged(Core::EState state);
|
|
|
|
|
2014-09-14 13:03:07 -06:00
|
|
|
private slots:
|
2014-11-02 11:53:48 -07:00
|
|
|
// Emulation
|
|
|
|
void StartGame(const QString filename);
|
|
|
|
void OnCoreStateChanged(Core::EState state);
|
|
|
|
|
|
|
|
// Main toolbar
|
|
|
|
void on_actOpen_triggered();
|
|
|
|
void on_actPlay_triggered();
|
|
|
|
void on_actStop_triggered();
|
2014-09-14 13:03:07 -06:00
|
|
|
|
|
|
|
// Help menu
|
|
|
|
void on_actWebsite_triggered();
|
|
|
|
void on_actOnlineDocs_triggered();
|
|
|
|
void on_actGitHub_triggered();
|
2014-10-25 07:21:05 -06:00
|
|
|
void on_actSystemInfo_triggered();
|
2014-09-14 13:03:07 -06:00
|
|
|
void on_actAbout_triggered();
|
|
|
|
|
2014-11-02 11:53:48 -07:00
|
|
|
// Misc.
|
|
|
|
void UpdateIcons();
|
|
|
|
|
2014-09-14 13:03:07 -06:00
|
|
|
private:
|
2014-10-25 07:21:05 -06:00
|
|
|
std::unique_ptr<Ui::DMainWindow> m_ui;
|
2014-11-02 11:53:48 -07:00
|
|
|
|
|
|
|
// Emulation
|
|
|
|
QString RequestBootFilename();
|
|
|
|
QString ShowFileDialog();
|
|
|
|
void DoStartPause();
|
|
|
|
|
|
|
|
std::unique_ptr<DRenderWidget> m_render_widget;
|
|
|
|
bool m_isStopping = false;
|
2014-09-14 13:03:07 -06:00
|
|
|
};
|
2014-11-02 11:53:48 -07:00
|
|
|
|
|
|
|
// Pointer to the only instance of DMainWindow, used by Host_*
|
|
|
|
extern DMainWindow* g_main_window;
|