mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-23 12:26:56 +02:00
clean up launcher helpers
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
#ifndef LAUNCHER_INCLUDE_COMMON_H_
|
||||
#define LAUNCHER_INCLUDE_COMMON_H_
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
#include <QArgument>
|
||||
#include <QObject>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
#define KYTY_QT_CLASS_NO_COPY(name) \
|
||||
public: \
|
||||
name(const name&) = delete; /* NOLINT(bugprone-macro-parentheses) */ \
|
||||
name& operator=(const name&) = delete; /* NOLINT(bugprone-macro-parentheses) */ \
|
||||
name(name&&) noexcept = delete; /* NOLINT(bugprone-macro-parentheses) */ \
|
||||
name& operator=(name&&) noexcept = delete; /* NOLINT(bugprone-macro-parentheses) */
|
||||
|
||||
#endif /* LAUNCHER_INCLUDE_COMMON_H_ */
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef COMPATIBILITY_DATABASE_H
|
||||
#define COMPATIBILITY_DATABASE_H
|
||||
|
||||
#include "common.h"
|
||||
#include "configuration.h"
|
||||
|
||||
#include <QMap>
|
||||
@@ -15,7 +14,6 @@ struct CompatibilityEntry {
|
||||
|
||||
class CompatibilityDatabase: public QObject {
|
||||
Q_OBJECT
|
||||
KYTY_QT_CLASS_NO_COPY(CompatibilityDatabase);
|
||||
|
||||
public:
|
||||
explicit CompatibilityDatabase(bool local, QObject* parent = nullptr);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#ifndef LAUNCHER_INCLUDE_CONFIGURATION_H_
|
||||
#define LAUNCHER_INCLUDE_CONFIGURATION_H_
|
||||
|
||||
#include "common.h"
|
||||
#include "common/emulatorConfig.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QChar>
|
||||
#include <QMetaEnum>
|
||||
#include <QMetaType>
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef CONFIGURATION_EDIT_DIALOG_H
|
||||
#define CONFIGURATION_EDIT_DIALOG_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
@@ -22,7 +20,6 @@ class ConfigurationEditDialog;
|
||||
|
||||
class ConfigurationEditDialog: public QDialog {
|
||||
Q_OBJECT
|
||||
KYTY_QT_CLASS_NO_COPY(ConfigurationEditDialog);
|
||||
|
||||
public:
|
||||
explicit ConfigurationEditDialog(Configuration& info, QWidget* parent = nullptr);
|
||||
@@ -31,7 +28,6 @@ public:
|
||||
static void WriteSettings(QSettings& s);
|
||||
static void ReadSettings(QSettings& s);
|
||||
|
||||
void SetTitle(const QString& str);
|
||||
void SetGameDirectories(const QStringList& dirs);
|
||||
[[nodiscard]] QStringList GetGameDirectories() const;
|
||||
|
||||
@@ -55,8 +51,6 @@ protected:
|
||||
|
||||
/*slots:*/
|
||||
|
||||
void update_info();
|
||||
void adjust_size();
|
||||
void save();
|
||||
void clear();
|
||||
void add_game_directory();
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef CONFIGURATION_ITEM_H
|
||||
#define CONFIGURATION_ITEM_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
@@ -23,8 +21,6 @@ public:
|
||||
void Update();
|
||||
bool operator<(const QTreeWidgetItem& other) const override;
|
||||
|
||||
KYTY_QT_CLASS_NO_COPY(ConfigurationItem);
|
||||
|
||||
Configuration& GetInfo() { return *m_info; }
|
||||
[[nodiscard]] const Configuration& GetInfo() const { return *m_info; }
|
||||
// void SetInfo(Configuration* info);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef CONFIGURATION_LIST_WIDGET_H
|
||||
#define CONFIGURATION_LIST_WIDGET_H
|
||||
|
||||
#include "common.h"
|
||||
#include "configuration.h"
|
||||
|
||||
#include <QMap>
|
||||
@@ -14,7 +13,6 @@ class CompatibilityDatabase;
|
||||
class QEvent;
|
||||
class QTreeWidgetItem;
|
||||
class QPoint;
|
||||
class MainDialog;
|
||||
|
||||
namespace Ui {
|
||||
class ConfigurationListWidget;
|
||||
@@ -22,27 +20,20 @@ class ConfigurationListWidget;
|
||||
|
||||
class ConfigurationListWidget: public QWidget {
|
||||
Q_OBJECT
|
||||
KYTY_QT_CLASS_NO_COPY(ConfigurationListWidget);
|
||||
|
||||
public:
|
||||
explicit ConfigurationListWidget(QWidget* parent = nullptr);
|
||||
~ConfigurationListWidget() override;
|
||||
|
||||
void SetRunEnabled(bool flag) { m_run_enabled = flag; }
|
||||
[[nodiscard]] bool IsRunEnabled() const { return m_run_enabled; }
|
||||
void SetRunEnabled(bool flag) { m_run_enabled = flag; }
|
||||
|
||||
[[nodiscard]] const ConfigurationItem* GetSelectedItem() const { return m_selected_item; }
|
||||
ConfigurationItem* GetSelectedItem() { return m_selected_item; }
|
||||
|
||||
void SetMainDialog(MainDialog* main_dialog) { m_main_dialog = main_dialog; }
|
||||
MainDialog* GetMainDialog() { return m_main_dialog; }
|
||||
|
||||
[[nodiscard]] const QString& GetSettingsFile() const { return m_settings_file; }
|
||||
[[nodiscard]] const QStringList& GetGameDirectories() const { return m_game_dirs; }
|
||||
[[nodiscard]] const QStringList& GetHostInputMapping() const {
|
||||
return m_global_info.host_input_mapping;
|
||||
}
|
||||
[[nodiscard]] bool CanViewSelectedTrophies() const;
|
||||
|
||||
bool EnsureGameDirectory();
|
||||
void ScanGameDirectory();
|
||||
@@ -66,8 +57,6 @@ protected slots:
|
||||
void delete_configuartion();
|
||||
void edit_global_settings();
|
||||
void edit_input_mapping();
|
||||
void run_configuration();
|
||||
void list_currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
|
||||
void list_itemDoubleClicked(QTreeWidgetItem* witem, int column);
|
||||
void show_context_menu(const QPoint& pos);
|
||||
void open_game_folder();
|
||||
@@ -84,7 +73,6 @@ private:
|
||||
ConfigurationItem* m_selected_item = nullptr;
|
||||
bool m_run_enabled = true;
|
||||
Ui::ConfigurationListWidget* m_ui = nullptr;
|
||||
MainDialog* m_main_dialog = nullptr;
|
||||
QString m_settings_file;
|
||||
QStringList m_game_dirs;
|
||||
Configuration m_global_info;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef MAIN_DIALOG_H
|
||||
#define MAIN_DIALOG_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
|
||||
@@ -15,11 +13,9 @@ class QResizeEvent;
|
||||
class Configuration;
|
||||
class MainDialog: public QDialog {
|
||||
Q_OBJECT
|
||||
KYTY_QT_CLASS_NO_COPY(MainDialog);
|
||||
|
||||
signals:
|
||||
void Start();
|
||||
void Quit();
|
||||
void Resize();
|
||||
|
||||
public:
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#ifndef MANDATORY_LINEEDIT_H
|
||||
#define MANDATORY_LINEEDIT_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <QLineEdit>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
class QPaintEvent;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef PATCHES_DIALOG_H
|
||||
#define PATCHES_DIALOG_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
|
||||
@@ -16,8 +14,6 @@ public:
|
||||
explicit PatchesDialog(const Configuration& game, QWidget* parent = nullptr);
|
||||
~PatchesDialog() override = default;
|
||||
|
||||
KYTY_QT_CLASS_NO_COPY(PatchesDialog);
|
||||
|
||||
[[nodiscard]] static bool IsSupportedTitleId(const QString& title_id);
|
||||
[[nodiscard]] static QString PatchPlanPath(const QString& title_id);
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef TROPHY_VIEWER_DIALOG_H
|
||||
#define TROPHY_VIEWER_DIALOG_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class QTabWidget;
|
||||
@@ -10,8 +8,6 @@ class QWidget;
|
||||
|
||||
class Configuration;
|
||||
class TrophyViewerDialog: public QDialog {
|
||||
KYTY_QT_CLASS_NO_COPY(TrophyViewerDialog);
|
||||
|
||||
public:
|
||||
explicit TrophyViewerDialog(QWidget* parent = nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user