Play-/Source/ui_unix/mainwindow.h

75 lines
1.6 KiB
C
Raw Normal View History

2016-09-06 00:12:56 +01:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QLabel>
#include <QKeyEvent>
#include "AppConfig.h"
2016-07-02 03:12:06 +03:00
#include "PS2VM.h"
#include "PS2VM_Preferences.h"
2016-08-23 00:54:10 +01:00
#include "StatsManager.h"
2016-07-26 00:52:31 +01:00
#include "PH_HidUnix.h"
2016-09-06 00:12:56 +01:00
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
2016-07-01 05:28:39 +03:00
private:
void setOpenGlPanelSize();
2016-08-23 00:54:10 +01:00
void createStatusBar();
void initEmu();
2016-08-23 00:54:10 +01:00
void setupSoundHandler();
2016-07-01 05:21:58 +03:00
void Setupfpscounter();
void createOpenGlPanel();
2016-07-26 15:06:37 +01:00
void setupSaveLoadStateSlots();
QString saveStateInfo(int);
boost::filesystem::path GetStateDirectoryPath();
boost::filesystem::path GenerateStatePath(int);
void OnRunningStateChange();
2016-07-27 13:47:50 +01:00
void OnExecutableChange();
void UpdateUI();
2016-07-01 05:21:58 +03:00
2016-07-01 05:28:39 +03:00
Ui::MainWindow *ui;
2016-07-01 05:28:39 +03:00
QWindow* openglpanel;
2016-08-23 00:54:10 +01:00
QLabel* fpsLabel;
QLabel* dcLabel;
QLabel* stateLabel;
2016-08-23 00:54:10 +01:00
CStatsManager* StatsManager;
2016-07-26 00:52:31 +01:00
CPH_HidUnix* padhandler = nullptr;
2016-07-01 05:28:39 +03:00
QTimer *fpstimer = nullptr;
2016-07-02 03:12:06 +03:00
CPS2VM* g_virtualMachine = nullptr;
2016-07-26 00:52:31 +01:00
2016-07-01 05:28:39 +03:00
protected:
2016-07-26 00:22:08 +01:00
void closeEvent(QCloseEvent*) Q_DECL_OVERRIDE;
2016-07-01 05:28:39 +03:00
void showEvent(QShowEvent*) Q_DECL_OVERRIDE;
public slots:
2016-07-01 05:21:58 +03:00
void openGLWindow_resized();
2016-08-23 00:54:10 +01:00
void setFPS();
private slots:
void on_actionOpen_Game_triggered();
void on_actionBoot_ELF_triggered();
void on_actionExit_triggered();
2016-07-26 00:52:31 +01:00
void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *);
2016-08-23 00:54:10 +01:00
void on_actionSettings_triggered();
2016-07-26 15:06:37 +01:00
void saveState();
void loadState();
void on_actionPause_Resume_triggered();
2016-08-10 16:29:40 +01:00
void on_actionAbout_triggered();
2016-09-06 00:12:56 +01:00
};
#endif // MAINWINDOW_H