obliteration/gui/launch_settings.hpp
Putta Khunchalee 2cac7fbd0b
Some checks are pending
Development Build / Build (push) Waiting to run
Development Build / Update PRs (push) Waiting to run
Implements UI to start debug (#1015)
2024-10-04 20:48:26 +02:00

59 lines
1.3 KiB
C++

#pragma once
#include "core.h"
#include <QList>
#ifndef __APPLE__
#include <QVulkanInstance>
#endif
#include <QWidget>
class CpuSettings;
#ifndef __APPLE__
class DisplayDevice;
#endif
class DisplaySettings;
class GameListModel;
class ProfileList;
class QComboBox;
class QLayout;
class QTableView;
class LaunchSettings final : public QWidget {
Q_OBJECT
public:
#ifdef __APPLE__
LaunchSettings(ProfileList *profiles, GameListModel *games, QWidget *parent = nullptr);
#else
LaunchSettings(
ProfileList *profiles,
GameListModel *games,
QList<VkPhysicalDevice> &&vkDevices,
QWidget *parent = nullptr);
#endif
~LaunchSettings() override;
Profile *currentProfile() const;
#ifndef __APPLE__
DisplayDevice *currentDisplayDevice() const;
#endif
signals:
void saveClicked(Profile *p);
void startClicked(const QString &debugAddr);
private:
#ifdef __APPLE__
QWidget *buildSettings(GameListModel *games);
#else
QWidget *buildSettings(GameListModel *games, QList<VkPhysicalDevice> &&vkDevices);
#endif
QLayout *buildActions(ProfileList *profiles);
void requestGamesContextMenu(const QPoint &pos);
void profileChanged(int index);
DisplaySettings *m_display;
CpuSettings *m_cpu;
QTableView *m_games;
QComboBox *m_profiles;
};