2019-12-31 06:17:17 +00:00
|
|
|
#pragma once
|
|
|
|
#include <QtCore/QThread>
|
|
|
|
#include <QtWidgets/QLabel>
|
|
|
|
#include <QtWidgets/QMainWindow>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "settingsdialog.h"
|
|
|
|
#include "ui_mainwindow.h"
|
|
|
|
|
2020-01-24 04:49:47 +00:00
|
|
|
class QLabel;
|
|
|
|
|
2019-12-31 06:17:17 +00:00
|
|
|
class GameList;
|
|
|
|
class GameListWidget;
|
|
|
|
class QtHostInterface;
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit MainWindow(QtHostInterface* host_interface);
|
|
|
|
~MainWindow();
|
|
|
|
|
2020-01-06 06:27:39 +00:00
|
|
|
private Q_SLOTS:
|
2019-12-31 06:17:17 +00:00
|
|
|
void onEmulationStarting();
|
|
|
|
void onEmulationStarted();
|
|
|
|
void onEmulationStopped();
|
|
|
|
void onEmulationPaused(bool paused);
|
2020-01-06 06:27:39 +00:00
|
|
|
void toggleFullscreen();
|
2020-01-24 04:49:51 +00:00
|
|
|
void recreateDisplayWidget(bool create_device_context);
|
2020-01-24 04:49:47 +00:00
|
|
|
void onPerformanceCountersUpdated(float speed, float fps, float vps, float average_frame_time,
|
|
|
|
float worst_frame_time);
|
2019-12-31 06:17:17 +00:00
|
|
|
|
|
|
|
void onStartDiscActionTriggered();
|
2020-01-24 04:50:40 +00:00
|
|
|
void onChangeDiscFromFileActionTriggered();
|
|
|
|
void onChangeDiscFromGameListActionTriggered();
|
2019-12-31 06:17:17 +00:00
|
|
|
void onStartBiosActionTriggered();
|
|
|
|
void onOpenDirectoryActionTriggered();
|
|
|
|
void onExitActionTriggered();
|
|
|
|
void onGitHubRepositoryActionTriggered();
|
|
|
|
void onIssueTrackerActionTriggered();
|
|
|
|
void onAboutActionTriggered();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setupAdditionalUi();
|
|
|
|
void connectSignals();
|
|
|
|
void updateEmulationActions(bool starting, bool running);
|
|
|
|
void switchToGameListView();
|
|
|
|
void switchToEmulationView();
|
|
|
|
void doSettings(SettingsDialog::Category category = SettingsDialog::Category::Count);
|
2020-01-24 04:49:51 +00:00
|
|
|
void updateDebugMenuGPURenderer();
|
2020-01-24 04:50:42 +00:00
|
|
|
void populateLoadSaveStateMenus(QString game_code);
|
2019-12-31 06:17:17 +00:00
|
|
|
|
|
|
|
Ui::MainWindow m_ui;
|
|
|
|
|
|
|
|
QtHostInterface* m_host_interface = nullptr;
|
|
|
|
|
|
|
|
std::unique_ptr<GameList> m_game_list;
|
|
|
|
GameListWidget* m_game_list_widget = nullptr;
|
2020-01-06 04:08:00 +00:00
|
|
|
QWidget* m_display_widget = nullptr;
|
2019-12-31 06:17:17 +00:00
|
|
|
|
2020-01-24 04:49:47 +00:00
|
|
|
QLabel* m_status_speed_widget = nullptr;
|
|
|
|
QLabel* m_status_fps_widget = nullptr;
|
|
|
|
QLabel* m_status_frame_time_widget = nullptr;
|
|
|
|
|
2019-12-31 06:17:17 +00:00
|
|
|
SettingsDialog* m_settings_dialog = nullptr;
|
|
|
|
|
|
|
|
bool m_emulation_running = false;
|
|
|
|
};
|