dolphin/Source/Core/DolphinQt/MainWindow.h

74 lines
1.4 KiB
C
Raw Normal View History

// Copyright 2014 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
2014-09-15 00:44:07 +00:00
#include <memory>
#include <QMainWindow>
#include "Core/Core.h"
2014-11-11 02:41:17 +00:00
#include "DolphinQt/GameList/GameTracker.h"
#include "DolphinQt/VideoInterface/RenderWidget.h"
// Predefinitions
2014-10-27 17:11:39 +00:00
namespace Ui
{
class DMainWindow;
}
class DMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit DMainWindow(QWidget* parent_widget = nullptr);
~DMainWindow();
// DRenderWidget
2014-11-29 14:30:35 +00:00
bool RenderWidgetHasFocus() const { return m_render_widget->isActiveWindow(); }
DRenderWidget* GetRenderWidget() { return m_render_widget.get(); }
signals:
void CoreStateChanged(Core::EState state);
private slots:
// Emulation
void StartGame(const QString filename);
void OnCoreStateChanged(Core::EState state);
// Main toolbar
void OnOpen();
void OnPlay();
void OnStop();
2014-11-11 02:41:17 +00:00
// View menu
void OnGameListStyleChanged();
// Help menu
void OnOpenWebsite();
void OnOpenDocs();
void OnOpenGitHub();
void OnOpenSystemInfo();
void OnOpenAbout();
// Misc.
void UpdateIcons();
private:
std::unique_ptr<Ui::DMainWindow> m_ui;
2014-11-11 02:41:17 +00:00
DGameTracker* m_game_tracker;
// Emulation
QString RequestBootFilename();
QString ShowFileDialog();
void DoStartPause();
std::unique_ptr<DRenderWidget> m_render_widget;
bool m_isStopping = false;
};
// Pointer to the only instance of DMainWindow, used by Host_*
extern DMainWindow* g_main_window;