Qt: Remove named slot declarations

Knocks 70KB or so off the release binary, ~0.8%.
pull/3568/head
Stenzek 1 month ago
parent 577863077e
commit 339f4252ec
No known key found for this signature in database

@ -18,16 +18,15 @@ public:
AchievementLoginDialog(QWidget* parent, Achievements::LoginRequestReason reason);
~AchievementLoginDialog();
private Q_SLOTS:
void loginClicked();
void cancelClicked();
void processLoginResult(bool result, const QString& message);
private:
void connectUi();
void enableUI(bool enabled);
bool canEnableLoginButton() const;
void loginClicked();
void cancelClicked();
void processLoginResult(bool result, const QString& message);
Ui::AchievementLoginDialog m_ui;
QPushButton* m_login;
Achievements::LoginRequestReason m_reason;

@ -2,9 +2,11 @@
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
#pragma once
#include <QtWidgets/QWidget>
#include "ui_achievementsettingswidget.h"
#include <QtWidgets/QWidget>
class SettingsWindow;
class AchievementSettingsWidget : public QWidget
@ -15,7 +17,9 @@ public:
explicit AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~AchievementSettingsWidget();
private Q_SLOTS:
private:
void updateLoginState();
void updateEnableState();
void onHardcoreModeStateChanged();
void onAchievementsNotificationDurationSliderChanged();
@ -24,9 +28,6 @@ private Q_SLOTS:
void onViewProfilePressed();
void onAchievementsRefreshed(quint32 id, const QString& game_info_string);
private:
void updateLoginState();
Ui::AchievementSettingsWidget m_ui;
SettingsWindow* m_dialog;

@ -20,11 +20,6 @@ public:
Q_SIGNALS:
void onShowDebugOptionsChanged(bool enabled);
private Q_SLOTS:
void onLogChannelsButtonClicked();
void onAnyLogSinksChanged();
void onShowDebugOptionsStateChanged();
private:
struct TweakOption
{
@ -55,12 +50,16 @@ private:
};
};
void addTweakOptions();
void onResetToDefaultClicked();
void onLogChannelsButtonClicked();
void onAnyLogSinksChanged();
void onShowDebugOptionsStateChanged();
SettingsWindow* m_dialog;
Ui::AdvancedSettingsWidget m_ui;
QVector<TweakOption> m_tweak_options;
void addTweakOptions();
void onResetToDefaultClicked();
};

@ -21,7 +21,10 @@ public:
AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~AudioSettingsWidget();
private Q_SLOTS:
private:
AudioBackend getEffectiveBackend() const;
void resetVolume(bool fast_forward);
void onStretchModeChanged();
void updateDriverNames();
@ -35,10 +38,6 @@ private Q_SLOTS:
void onStretchSettingsClicked();
private:
AudioBackend getEffectiveBackend() const;
void resetVolume(bool fast_forward);
Ui::AudioSettingsWidget m_ui;
SettingsWindow* m_dialog;
u32 m_output_device_latency = 0;

@ -29,6 +29,9 @@ public:
explicit AutoUpdaterWindow(QWidget* parent = nullptr);
~AutoUpdaterWindow();
void queueUpdateCheck(bool display_errors);
void queueGetLatestRelease();
static bool isSupported();
static bool canInstallUpdate();
static QStringList getTagList();
@ -40,21 +43,16 @@ public:
Q_SIGNALS:
void updateCheckCompleted();
public Q_SLOTS:
void queueUpdateCheck(bool display_errors);
void queueGetLatestRelease();
protected:
void closeEvent(QCloseEvent* event) override;
private Q_SLOTS:
private:
void httpPollTimerPoll();
void downloadUpdateClicked();
void skipThisUpdateClicked();
void remindMeLaterClicked();
protected:
void closeEvent(QCloseEvent* event) override;
private:
void reportError(const std::string_view msg);
bool ensureHttpReady();

@ -27,12 +27,11 @@ public:
bool per_game);
static void setDropDownValue(QComboBox* cb, const std::optional<std::string>& name, bool per_game);
private Q_SLOTS:
private:
void refreshList();
void onPIODeviceTypeChanged();
void onPIOImagePathBrowseClicked();
private:
Ui::BIOSSettingsWidget m_ui;
SettingsWindow* m_dialog;

@ -12,18 +12,16 @@ class ColorPickerButton : public QPushButton
public:
ColorPickerButton(QWidget* parent);
Q_SIGNALS:
void colorChanged(quint32 new_color);
public Q_SLOTS:
quint32 color();
void setColor(quint32 rgb);
private Q_SLOTS:
void onClicked();
Q_SIGNALS:
void colorChanged(quint32 new_color);
private:
void updateBackgroundColor();
void onClicked();
u32 m_color = 0;
};

@ -17,16 +17,15 @@ public:
explicit ConsoleSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~ConsoleSettingsWidget();
private Q_SLOTS:
private:
void calculateCPUClockValue();
void onFastBootChanged();
void updateRecompilerICacheEnabled();
void onEnableCPUClockSpeedControlChecked(int state);
void onCPUClockSpeedValueChanged(int value);
void updateCPUClockSpeedLabel();
private:
void calculateCPUClockValue();
Ui::ConsoleSettingsWidget m_ui;
SettingsWindow* m_dialog;

@ -40,15 +40,6 @@ public:
static bool doMultipleDeviceAutomaticBinding(QWidget* parent, ControllerSettingsWindow* parent_dialog, u32 port);
private Q_SLOTS:
void onTypeChanged();
void onAutomaticBindingClicked();
void onClearBindingsClicked();
void onBindingsClicked();
void onSettingsClicked();
void onMacrosClicked();
void onMultipleDeviceAutomaticBindingTriggered();
private:
void populateControllerTypes();
void populateWidgets();
@ -58,6 +49,14 @@ private:
void doDeviceAutomaticBinding(const QString& device);
void saveAndRefresh();
void onTypeChanged();
void onAutomaticBindingClicked();
void onClearBindingsClicked();
void onBindingsClicked();
void onSettingsClicked();
void onMacrosClicked();
void onMultipleDeviceAutomaticBindingTriggered();
Ui::ControllerBindingWidget m_ui;
ControllerSettingsWindow* m_dialog;
@ -106,17 +105,16 @@ public:
QString getSummary() const;
private Q_SLOTS:
void onPressureChanged();
void onDeadzoneChanged();
void onSetFrequencyClicked();
void updateBinds();
private:
void modFrequency(s32 delta);
void updateFrequency();
void updateFrequencyText();
void onPressureChanged();
void onDeadzoneChanged();
void onSetFrequencyClicked();
void updateBinds();
Ui::ControllerMacroEditWidget m_ui;
ControllerMacroWidget* m_parent;
@ -137,10 +135,9 @@ public:
explicit ControllerCustomSettingsWidget(ControllerBindingWidget* parent);
~ControllerCustomSettingsWidget();
private Q_SLOTS:
private:
void restoreDefaults();
private:
ControllerBindingWidget* m_parent;
};

@ -9,12 +9,12 @@
#include "core/types.h"
#include <QtCore/QAbstractListModel>
#include <QtCore/QList>
#include <QtCore/QPair>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtWidgets/QDialog>
#include <QtCore/QAbstractListModel>
#include <array>
#include <string>
@ -67,6 +67,8 @@ public:
void switchProfile(const std::string_view name);
void setCategory(Category category);
// Helper functions for updating setting values globally or in the profile.
bool getBoolValue(const char* section, const char* key, bool default_value) const;
s32 getIntValue(const char* section, const char* key, s32 default_value) const;
@ -81,20 +83,6 @@ Q_SIGNALS:
void windowClosed();
void inputProfileSwitched();
public Q_SLOTS:
void setCategory(Category category);
private Q_SLOTS:
void onCategoryCurrentRowChanged(int row);
void onCurrentProfileChanged(int index);
void onNewProfileClicked();
void onApplyProfileClicked();
void onDeleteProfileClicked();
void onRestoreDefaultsClicked();
void onCopyGlobalSettingsClicked();
void createWidgets();
protected:
void closeEvent(QCloseEvent* event) override;
@ -104,6 +92,16 @@ private:
std::array<bool, 2> getEnabledMultitaps() const;
void createWidgets();
void onCategoryCurrentRowChanged(int row);
void onCurrentProfileChanged(int index);
void onNewProfileClicked();
void onApplyProfileClicked();
void onDeleteProfileClicked();
void onRestoreDefaultsClicked();
void onCopyGlobalSettingsClicked();
Ui::ControllerSettingsWindow m_ui;
INISettingsInterface* m_editing_settings_interface = nullptr;

@ -30,14 +30,6 @@ Q_SIGNALS:
protected:
void closeEvent(QCloseEvent* ev);
private Q_SLOTS:
void onDownloadStatus(const QString& text);
void onDownloadProgress(int value, int range);
void onDownloadComplete();
void onStartClicked();
void onCloseClicked();
void updateEnabled();
private:
class CoverDownloadThread : public QtAsyncProgressThread
{
@ -56,6 +48,13 @@ private:
void startThread();
void cancelThread();
void onDownloadStatus(const QString& text);
void onDownloadProgress(int value, int range);
void onDownloadComplete();
void onStartClicked();
void onCloseClicked();
void updateEnabled();
Ui::CoverDownloadWindow m_ui;
std::unique_ptr<CoverDownloadThread> m_thread;
Timer m_last_refresh_time;

@ -63,10 +63,9 @@ public:
u32 getAddress() const { return m_address; }
CPU::BreakpointType getType() const { return m_type; }
private Q_SLOTS:
private:
void okClicked();
private:
Ui::DebuggerAddBreakpointDialog m_ui;
u32 m_address = 0;
CPU::BreakpointType m_type = CPU::BreakpointType::Execute;

@ -33,7 +33,25 @@ Q_SIGNALS:
protected:
void closeEvent(QCloseEvent* event);
private Q_SLOTS:
private:
void setupAdditionalUi();
void connectSignals();
void disconnectSignals();
void createModels();
void setUIEnabled(bool enabled, bool allow_pause);
void saveCurrentState();
void setMemoryViewRegion(Bus::MemoryRegion region);
void toggleBreakpoint(VirtualMemoryAddress address);
void clearBreakpoints();
bool tryFollowLoadStore(VirtualMemoryAddress address);
void scrollToPC(bool center);
void scrollToCodeAddress(VirtualMemoryAddress address, bool center);
bool scrollToMemoryAddress(VirtualMemoryAddress address);
void refreshBreakpointList();
void refreshBreakpointList(const CPU::BreakpointList& bps);
void addBreakpoint(CPU::BreakpointType type, u32 address);
void removeBreakpoint(CPU::BreakpointType type, u32 address);
void onSystemStarted();
void onSystemDestroyed();
void onSystemPaused();
@ -64,25 +82,6 @@ private Q_SLOTS:
void onMemorySearchTriggered();
void onMemorySearchStringChanged(const QString&);
private:
void setupAdditionalUi();
void connectSignals();
void disconnectSignals();
void createModels();
void setUIEnabled(bool enabled, bool allow_pause);
void saveCurrentState();
void setMemoryViewRegion(Bus::MemoryRegion region);
void toggleBreakpoint(VirtualMemoryAddress address);
void clearBreakpoints();
bool tryFollowLoadStore(VirtualMemoryAddress address);
void scrollToPC(bool center);
void scrollToCodeAddress(VirtualMemoryAddress address, bool center);
bool scrollToMemoryAddress(VirtualMemoryAddress address);
void refreshBreakpointList();
void refreshBreakpointList(const CPU::BreakpointList& bps);
void addBreakpoint(CPU::BreakpointType type, u32 address);
void removeBreakpoint(CPU::BreakpointType type, u32 address);
Ui::DebuggerWindow m_ui;
DebuggerRegistersModel* m_registers_model;

@ -17,7 +17,9 @@ public:
explicit EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~EmulationSettingsWidget();
private Q_SLOTS:
private:
void fillComboBoxWithEmulationSpeeds(QComboBox* cb, float global_value);
void onEmulationSpeedIndexChanged(int index);
void onFastForwardSpeedIndexChanged(int index);
void onTurboSpeedIndexChanged(int index);
@ -26,9 +28,6 @@ private Q_SLOTS:
void updateSkipDuplicateFramesEnabled();
void updateRewind();
private:
void fillComboBoxWithEmulationSpeeds(QComboBox* cb, float global_value);
Ui::EmulationSettingsWidget m_ui;
SettingsWindow* m_dialog;

@ -43,7 +43,7 @@ public:
bool hasCodeWithName(const std::string_view name) const;
void disableAllCheats();
private Q_SLOTS:
private:
void onEnableCheatsChanged(Qt::CheckState state);
void onSortCheatsToggled(bool checked);
void onSearchFilterChanged(const QString& text);
@ -60,7 +60,6 @@ private Q_SLOTS:
void onClearClicked();
void reloadList();
private:
bool shouldLoadFromDatabase() const;
void checkForMasterDisable();
@ -97,7 +96,7 @@ public:
CheatCodeEditorDialog(GameCheatSettingsWidget* parent, Cheats::CodeInfo* code, const QStringList& group_names);
~CheatCodeEditorDialog() override;
private Q_SLOTS:
private:
void onGroupSelectedIndexChanged(int index);
void saveClicked();
@ -106,7 +105,6 @@ private Q_SLOTS:
void onRangeMaxChanged(int value);
void onEditChoiceClicked();
private:
void setupAdditionalUi(const QStringList& group_names);
void fillUi();
@ -127,11 +125,10 @@ public:
Cheats::CodeOptionList getNewOptions() const;
private Q_SLOTS:
private:
void onAddClicked();
void onRemoveClicked();
void onSaveClicked();
private:
Ui::GameCheatCodeChoiceEditorDialog m_ui;
};

@ -20,10 +20,14 @@ public:
bool addExcludedPath(const QString& path);
void refreshExclusionList();
public Q_SLOTS:
void addSearchDirectory(QWidget* parent_widget);
private Q_SLOTS:
private:
void addPathToTable(const std::string& path, bool recursive);
void refreshDirectoryList();
void addSearchDirectory(const QString& path, bool recursive);
void removeSearchDirectory(const QString& path);
void onDirectoryListContextMenuRequested(const QPoint& point);
void onAddSearchDirectoryButtonClicked();
void onRemoveSearchDirectoryButtonClicked();
@ -35,11 +39,5 @@ private Q_SLOTS:
void onScanForNewGamesClicked();
void onRescanAllGamesClicked();
private:
void addPathToTable(const std::string& path, bool recursive);
void refreshDirectoryList();
void addSearchDirectory(const QString& path, bool recursive);
void removeSearchDirectory(const QString& path);
Ui::GameListSettingsWidget m_ui;
};

@ -182,10 +182,6 @@ public:
protected:
void wheelEvent(QWheelEvent* e) override;
private Q_SLOTS:
void onHeaderContextMenuRequested(const QPoint& point);
void saveColumnSortSettings();
private:
void setFixedColumnWidth(int column, int width);
void setFixedColumnWidths();
@ -193,6 +189,9 @@ private:
void loadColumnVisibilitySettings();
void loadColumnSortSettings();
void onHeaderContextMenuRequested(const QPoint& point);
void saveColumnSortSettings();
GameListModel* m_model = nullptr;
GameListSortModel* m_sort_model = nullptr;
};
@ -210,7 +209,6 @@ public:
void adjustZoom(float delta);
public Q_SLOTS:
void updateLayout();
protected:
@ -252,6 +250,15 @@ public:
const GameList::Entry* getSelectedEntry() const;
void showGameList();
void showGameGrid();
void setMergeDiscSets(bool enabled);
void setShowLocalizedTitles(bool enabled);
void setShowGameIcons(bool enabled);
void setShowCoverTitles(bool enabled);
void refreshGridCovers();
void focusSearchWidget();
Q_SIGNALS:
void refreshProgress(const QString& status, int current, int total);
void refreshComplete();
@ -262,7 +269,13 @@ Q_SIGNALS:
void addGameDirectoryRequested();
private Q_SLOTS:
protected:
bool event(QEvent* e) override;
private:
void setViewMode(int stack_index);
void updateBackground(bool reload_image);
void onRefreshProgress(const QString& status, int current, int total, int entry_count, float time);
void onRefreshComplete();
@ -278,23 +291,6 @@ private Q_SLOTS:
void onGridViewContextMenuRequested(const QPoint& point);
void onSearchReturnPressed();
public Q_SLOTS:
void showGameList();
void showGameGrid();
void setMergeDiscSets(bool enabled);
void setShowLocalizedTitles(bool enabled);
void setShowGameIcons(bool enabled);
void setShowCoverTitles(bool enabled);
void refreshGridCovers();
void focusSearchWidget();
protected:
bool event(QEvent* e) override;
private:
void setViewMode(int stack_index);
void updateBackground(bool reload_image);
Ui::GameListWidget m_ui;
GameListModel* m_model = nullptr;

@ -23,10 +23,9 @@ public:
bool disallowed_for_achievements, bool enabled, SettingsWindow* dialog, QWidget* parent);
~GamePatchDetailsWidget();
private Q_SLOTS:
private:
void onEnabledStateChanged(Qt::CheckState state);
private:
Ui::GamePatchDetailsWidget m_ui;
SettingsWindow* m_dialog;
std::string m_name;
@ -40,15 +39,13 @@ public:
GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent);
~GamePatchSettingsWidget();
public Q_SLOTS:
void disableAllPatches();
private Q_SLOTS:
void onReloadClicked();
private:
void reloadList();
void onReloadClicked();
Ui::GamePatchSettingsWidget m_ui;
SettingsWindow* m_dialog;
};

@ -25,14 +25,6 @@ public:
void reloadGameSettings();
private Q_SLOTS:
void onSeparateDiscSettingsChanged(Qt::CheckState state);
void onCustomLanguageChanged(int language);
void onCompatibilityCommentsClicked();
void onInputProfileChanged(int index);
void onEditInputProfileClicked();
void onComputeHashClicked();
private:
void populateUi(const GameList::Entry* entry);
void setCustomTitle(const std::string& text);
@ -41,6 +33,13 @@ private:
void populateTracksInfo();
void onSeparateDiscSettingsChanged(Qt::CheckState state);
void onCustomLanguageChanged(int language);
void onCompatibilityCommentsClicked();
void onInputProfileChanged(int index);
void onEditInputProfileClicked();
void onComputeHashClicked();
Ui::GameSummaryWidget m_ui;
SettingsWindow* m_dialog;

@ -23,10 +23,17 @@ public:
static void populateUpscalingModes(QComboBox* cb, int max_scale);
public Q_SLOTS:
void onShowDebugSettingsChanged(bool enabled);
private Q_SLOTS:
private:
static constexpr int TAB_INDEX_RENDERING = 0;
static constexpr int TAB_INDEX_ADVANCED = 1;
static constexpr int TAB_INDEX_PGXP = 2;
static constexpr int TAB_INDEX_OSD = 3;
static constexpr int TAB_INDEX_CAPTURE = 4;
static constexpr int TAB_INDEX_TEXTURE_REPLACEMENTS = 5;
static constexpr int TAB_INDEX_DEBUGGING = 6;
void updateRendererDependentOptions();
void updatePGXPSettingsEnabled();
@ -47,15 +54,6 @@ private Q_SLOTS:
void onGPUThreadChanged();
private:
static constexpr int TAB_INDEX_RENDERING = 0;
static constexpr int TAB_INDEX_ADVANCED = 1;
static constexpr int TAB_INDEX_PGXP = 2;
static constexpr int TAB_INDEX_OSD = 3;
static constexpr int TAB_INDEX_CAPTURE = 4;
static constexpr int TAB_INDEX_TEXTURE_REPLACEMENTS = 5;
static constexpr int TAB_INDEX_DEBUGGING = 6;
void setupAdditionalUi();
void removePlatformSpecificUi();

@ -52,10 +52,8 @@ private:
void createUi();
void createButtons();
private Q_SLOTS:
void setFilter(const QString& filter);
private:
ControllerSettingsWindow* m_dialog;
QScrollArea* m_scroll_area = nullptr;
Container* m_container = nullptr;

@ -21,13 +21,6 @@ public:
std::string key_name, std::vector<std::string> bindings, QWidget* parent);
~InputBindingDialog();
protected Q_SLOTS:
void onAddBindingButtonClicked();
void onRemoveBindingButtonClicked();
void onClearBindingsButtonClicked();
void onInputListenTimerTimeout();
void inputManagerHookCallback(InputBindingKey key, float value);
protected:
enum : u32
{
@ -53,6 +46,12 @@ protected:
void onDeadzoneChanged(int value);
void onResetSensitivityClicked();
void onAddBindingButtonClicked();
void onRemoveBindingButtonClicked();
void onClearBindingsButtonClicked();
void onInputListenTimerTimeout();
void inputManagerHookCallback(InputBindingKey key, float value);
Ui::InputBindingDialog m_ui;
SettingsInterface* m_sif;

@ -27,15 +27,9 @@ public:
void initialize(SettingsInterface* sif, InputBindingInfo::Type bind_type, std::string section_name,
std::string key_name);
public Q_SLOTS:
void clearBinding();
void reloadBinding();
protected Q_SLOTS:
void onClicked();
void onInputListenTimerTimeout();
void inputManagerHookCallback(InputBindingKey key, float value);
protected:
enum : u32
{
@ -58,6 +52,10 @@ protected:
void hookInputManager();
void unhookInputManager();
void onClicked();
void onInputListenTimerTimeout();
void inputManagerHookCallback(InputBindingKey key, float value);
SettingsInterface* m_sif = nullptr;
InputBindingInfo::Type m_bind_type = InputBindingInfo::Type::Unknown;
std::string m_section_name;
@ -83,15 +81,13 @@ public:
void setKey(ControllerSettingsWindow* dialog, std::string section_name, std::string key_name);
public Q_SLOTS:
void clearBinding();
protected Q_SLOTS:
void onClicked();
protected:
virtual void mouseReleaseEvent(QMouseEvent* e) override;
void onClicked();
private:
std::string m_section_name;
std::string m_key_name;

@ -22,13 +22,12 @@ public:
Q_SIGNALS:
void themeChanged();
private Q_SLOTS:
void onRenderToSeparateWindowChanged();
void onLanguageChanged();
private:
void setupAdditionalUi();
void onRenderToSeparateWindowChanged();
void onLanguageChanged();
Ui::InterfaceSettingsWidget m_ui;
SettingsWindow* m_dialog;

@ -19,13 +19,6 @@ public:
bool tryOpenFile(const QString& path, Error* error = nullptr);
private Q_SLOTS:
void onOpenFileClicked();
void onDirectoryItemClicked(QTreeWidgetItem* item, int column);
void onFileItemActivated(QTreeWidgetItem* item, int column);
void onFileItemSelectionChanged();
void onFileContextMenuRequested(const QPoint& pos);
private:
void enableUi(bool enabled);
void enableExtractButtons(bool enabled);
@ -35,6 +28,12 @@ private:
void onExtractClicked(IsoReader::ReadMode mode);
void extractFile(const QString& path, IsoReader::ReadMode mode);
void onOpenFileClicked();
void onDirectoryItemClicked(QTreeWidgetItem* item, int column);
void onFileItemActivated(QTreeWidgetItem* item, int column);
void onFileItemSelectionChanged();
void onFileContextMenuRequested(const QPoint& pos);
QTreeWidgetItem* findDirectoryItemForPath(const QString& path, QTreeWidgetItem* parent = nullptr) const;
Ui::ISOBrowserWindow m_ui;

@ -29,33 +29,31 @@ public:
static void populateFilterMenu(QMenu* menu);
private:
void createUi();
void updateLogLevelUi();
void setLogLevel(Log::Level level);
static void logCallback(void* pUserParam, Log::MessageCategory cat, const char* functionName,
std::string_view message);
protected:
void closeEvent(QCloseEvent* event);
void changeEvent(QEvent* event);
private Q_SLOTS:
void onClearTriggered();
void onSaveTriggered();
void appendMessage(const QLatin1StringView& channel, quint32 cat, const QString& message);
void realAppendMessage(const QLatin1StringView& channel, quint32 cat, const QString& message);
private:
static constexpr int DEFAULT_WIDTH = 750;
static constexpr int DEFAULT_HEIGHT = 400;
static constexpr int MAX_LINES = 1000;
static constexpr int BLOCK_UPDATES_THRESHOLD = 100;
void createUi();
void updateLogLevelUi();
void setLogLevel(Log::Level level);
void onClearTriggered();
void onSaveTriggered();
void appendMessage(const QLatin1StringView& channel, quint32 cat, const QString& message);
void realAppendMessage(const QLatin1StringView& channel, quint32 cat, const QString& message);
void saveSize();
void restoreSize();
static void logCallback(void* pUserParam, Log::MessageCategory cat, const char* functionName,
std::string_view message);
QPlainTextEdit* m_text;
QMenu* m_level_menu;

@ -114,7 +114,6 @@ public:
SettingsWindow* getSettingsWindow();
ControllerSettingsWindow* getControllerSettingsWindow();
public Q_SLOTS:
/// Updates debug menu visibility (hides if disabled).
void updateDebugMenuVisibility();
@ -140,7 +139,88 @@ public Q_SLOTS:
void onRAIntegrationMenuChanged();
private Q_SLOTS:
protected:
void closeEvent(QCloseEvent* event) override;
void changeEvent(QEvent* event) override;
void dragEnterEvent(QDragEnterEvent* event) override;
void dropEvent(QDropEvent* event) override;
void moveEvent(QMoveEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
#ifdef _WIN32
bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override;
#endif
private:
/// Initializes the window. Call once at startup.
void initialize();
void setupAdditionalUi();
void connectSignals();
void updateToolbarActions();
void updateToolbarIconStyle();
void updateToolbarArea();
void updateEmulationActions(bool starting, bool running, bool cheevos_challenge_mode);
void updateShortcutActions(bool starting);
void updateStatusBarWidgetVisibility();
void updateWindowTitle();
void updateWindowState();
void setProgressBar(int current, int total);
void clearProgressBar();
QWidget* getDisplayContainer() const;
bool isShowingGameList() const;
bool isRenderingFullscreen() const;
bool isRenderingToMain() const;
bool shouldHideMouseCursor() const;
bool shouldHideMainWindow() const;
void switchToGameListView();
void switchToEmulationView();
void saveDisplayWindowGeometryToConfig();
void restoreDisplayWindowGeometryFromConfig();
bool wantsDisplayWidget() const;
void createDisplayWidget(bool fullscreen, bool render_to_main);
void destroyDisplayWidget(bool show_game_list);
void updateDisplayWidgetCursor();
void updateDisplayRelatedActions(bool has_surface, bool fullscreen);
void updateGameListRelatedActions();
void exitFullscreen(bool wait_for_completion);
void doSettings(const char* category = nullptr);
void openGamePropertiesForCurrentGame(const char* category = nullptr);
void doControllerSettings(ControllerSettingsWindow::Category category = ControllerSettingsWindow::Category::Count);
void onViewChangeGameListBackgroundTriggered();
void onViewClearGameListBackgroundTriggered();
std::string getDeviceDiscPath(const QString& title);
void setGameListEntryCoverImage(const GameList::Entry* entry);
void clearGameListEntryPlayTime(const GameList::Entry* entry);
void updateTheme();
void reloadThemeSpecificImages();
void onSettingsThemeChanged();
void destroySubWindows();
void registerForDeviceNotifications();
void unregisterForDeviceNotifications();
void notifyRAIntegrationOfWindowChange();
/// Fills menu with save state info and handlers.
void populateGameListContextMenu(const GameList::Entry* entry, QWidget* parent_window, QMenu* menu);
void populateLoadStateMenu(std::string_view game_serial, QMenu* menu);
void populateSaveStateMenu(std::string_view game_serial, QMenu* menu);
const GameList::Entry* resolveDiscSetEntry(const GameList::Entry* entry,
std::unique_lock<std::recursive_mutex>& lock);
std::shared_ptr<SystemBootParameters> getSystemBootParameters(std::string file);
std::optional<bool> promptForResumeState(const std::string& save_state_path);
void startFile(std::string path, std::optional<std::string> save_path, std::optional<bool> fast_boot);
void startFileOrChangeDisc(const QString& path);
void promptForDiscChange(const QString& path);
std::optional<WindowInfo> acquireRenderWindow(RenderAPI render_api, bool fullscreen, bool exclusive_fullscreen,
bool surfaceless, Error* error);
void displayResizeRequested(qint32 width, qint32 height);
@ -231,88 +311,6 @@ private Q_SLOTS:
void onDebugLogChannelsMenuAboutToShow();
void openCPUDebugger();
protected:
void closeEvent(QCloseEvent* event) override;
void changeEvent(QEvent* event) override;
void dragEnterEvent(QDragEnterEvent* event) override;
void dropEvent(QDropEvent* event) override;
void moveEvent(QMoveEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
#ifdef _WIN32
bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override;
#endif
private:
/// Initializes the window. Call once at startup.
void initialize();
void setupAdditionalUi();
void connectSignals();
void updateToolbarActions();
void updateToolbarIconStyle();
void updateToolbarArea();
void updateEmulationActions(bool starting, bool running, bool cheevos_challenge_mode);
void updateShortcutActions(bool starting);
void updateStatusBarWidgetVisibility();
void updateWindowTitle();
void updateWindowState();
void setProgressBar(int current, int total);
void clearProgressBar();
QWidget* getDisplayContainer() const;
bool isShowingGameList() const;
bool isRenderingFullscreen() const;
bool isRenderingToMain() const;
bool shouldHideMouseCursor() const;
bool shouldHideMainWindow() const;
void switchToGameListView();
void switchToEmulationView();
void saveDisplayWindowGeometryToConfig();
void restoreDisplayWindowGeometryFromConfig();
bool wantsDisplayWidget() const;
void createDisplayWidget(bool fullscreen, bool render_to_main);
void destroyDisplayWidget(bool show_game_list);
void updateDisplayWidgetCursor();
void updateDisplayRelatedActions(bool has_surface, bool fullscreen);
void updateGameListRelatedActions();
void exitFullscreen(bool wait_for_completion);
void doSettings(const char* category = nullptr);
void openGamePropertiesForCurrentGame(const char* category = nullptr);
void doControllerSettings(ControllerSettingsWindow::Category category = ControllerSettingsWindow::Category::Count);
void onViewChangeGameListBackgroundTriggered();
void onViewClearGameListBackgroundTriggered();
std::string getDeviceDiscPath(const QString& title);
void setGameListEntryCoverImage(const GameList::Entry* entry);
void clearGameListEntryPlayTime(const GameList::Entry* entry);
void updateTheme();
void reloadThemeSpecificImages();
void onSettingsThemeChanged();
void destroySubWindows();
void registerForDeviceNotifications();
void unregisterForDeviceNotifications();
void notifyRAIntegrationOfWindowChange();
/// Fills menu with save state info and handlers.
void populateGameListContextMenu(const GameList::Entry* entry, QWidget* parent_window, QMenu* menu);
void populateLoadStateMenu(std::string_view game_serial, QMenu* menu);
void populateSaveStateMenu(std::string_view game_serial, QMenu* menu);
const GameList::Entry* resolveDiscSetEntry(const GameList::Entry* entry,
std::unique_lock<std::recursive_mutex>& lock);
std::shared_ptr<SystemBootParameters> getSystemBootParameters(std::string file);
std::optional<bool> promptForResumeState(const std::string& save_state_path);
void startFile(std::string path, std::optional<std::string> save_path, std::optional<bool> fast_boot);
void startFileOrChangeDisc(const QString& path);
void promptForDiscChange(const QString& path);
Ui::MainWindow m_ui;
GameListWidget* m_game_list_widget = nullptr;

@ -34,15 +34,6 @@ public:
protected:
bool event(QEvent* event) override;
private Q_SLOTS:
void onCardASelectionChanged();
void onCardBSelectionChanged();
void onCardContextMenuRequested(const QPoint& pos);
void doCopyFile();
void doDeleteFile();
void doUndeleteFile();
void incrementAnimationFrame();
private:
struct Card
{
@ -88,6 +79,14 @@ private:
void updateAnimationTimerActive();
void onCardASelectionChanged();
void onCardBSelectionChanged();
void onCardContextMenuRequested(const QPoint& pos);
void doCopyFile();
void doDeleteFile();
void doUndeleteFile();
void incrementAnimationFrame();
Ui::MemoryCardEditorDialog m_ui;
QPushButton* m_deleteFile;
QPushButton* m_undeleteFile;
@ -114,12 +113,11 @@ public:
static std::string promptForNewName(QWidget* parent, std::string_view old_name);
private Q_SLOTS:
void updateSimplifiedFieldsFromFullName();
void updateFullNameFromSimplifiedFields();
private:
void setupAdditionalUi();
void updateSimplifiedFieldsFromFullName();
void updateFullNameFromSimplifiedFields();
Ui::MemoryCardRenameFileDialog m_ui;
};

@ -29,7 +29,13 @@ Q_SIGNALS:
protected:
void closeEvent(QCloseEvent* event);
private Q_SLOTS:
private:
enum : int
{
MAX_DISPLAYED_SCAN_RESULTS = 5000,
SCAN_INTERVAL = 100,
};
void onSystemStarted();
void onSystemDestroyed();
@ -48,13 +54,6 @@ private Q_SLOTS:
void updateScanValue();
void updateScanUi();
private:
enum : int
{
MAX_DISPLAYED_SCAN_RESULTS = 5000,
SCAN_INTERVAL = 100,
};
void setupAdditionalUi();
void connectUi();
void enableUi(bool enabled);

@ -27,6 +27,9 @@ public:
void scrollToAddress(size_t address);
void setFont(const QFont& font);
void saveCurrentData();
void forceRefresh();
protected:
void paintEvent(QPaintEvent* event);
void resizeEvent(QResizeEvent* event);
@ -34,13 +37,6 @@ protected:
void mouseMoveEvent(QMouseEvent* event);
void keyPressEvent(QKeyEvent* event);
public Q_SLOTS:
void saveCurrentData();
void forceRefresh();
private Q_SLOTS:
void adjustContent();
private:
static constexpr size_t INVALID_SELECTED_ADDRESS = ~static_cast<size_t>(0);
@ -52,6 +48,7 @@ private:
void setSelection(size_t new_selection, bool new_ascii);
void expandCurrentDataToInclude(size_t offset);
void adjustScrollToInclude(size_t offset);
void adjustContent();
void* m_data;
size_t m_data_size;

@ -33,16 +33,6 @@ public:
PostProcessingChainConfigWidget(SettingsWindow* dialog, QWidget* parent, const char* section);
~PostProcessingChainConfigWidget();
private Q_SLOTS:
void onAddButtonClicked();
void onRemoveButtonClicked();
void onClearButtonClicked();
void onMoveUpButtonClicked();
void onMoveDownButtonClicked();
void onReloadButtonClicked();
void onSelectedShaderChanged();
void triggerSettingsReload();
private:
SettingsInterface& getSettingsInterfaceToUpdate();
void commitSettingsUpdate();
@ -54,6 +44,15 @@ private:
void updateList(const SettingsInterface& si);
void updateList();
void onAddButtonClicked();
void onRemoveButtonClicked();
void onClearButtonClicked();
void onMoveUpButtonClicked();
void onMoveDownButtonClicked();
void onReloadButtonClicked();
void onSelectedShaderChanged();
void triggerSettingsReload();
SettingsWindow* m_dialog;
Ui::PostProcessingChainConfigWidget m_ui;
@ -72,13 +71,12 @@ public:
u32 stage_index, std::vector<PostProcessing::ShaderOption> options);
~PostProcessingShaderConfigWidget();
private Q_SLOTS:
void onResetDefaultsClicked();
private:
void createUi();
void updateConfigForOption(const PostProcessing::ShaderOption& option);
void onResetDefaultsClicked();
QGridLayout* m_layout;
PostProcessingChainConfigWidget* m_widget;
@ -97,13 +95,12 @@ public:
PostProcessingOverlayConfigWidget(SettingsWindow* dialog, QWidget* parent);
~PostProcessingOverlayConfigWidget();
private Q_SLOTS:
private:
void triggerSettingsReload();
void onOverlayNameCurrentIndexChanged(int index);
void onImagePathBrowseClicked();
void onExportCustomConfigClicked();
private:
Ui::PostProcessingOverlayConfigWidget m_ui;
SettingsWindow* m_dialog;
};

@ -167,7 +167,7 @@ Q_SIGNALS:
/// Big Picture UI requests.
void onCoverDownloaderOpenRequested();
public Q_SLOTS:
public:
void setDefaultSettings(bool system = true, bool controller = true);
void applySettings(bool display_osd_messages = false);
void reloadGameSettings(bool display_osd_messages = false);
@ -217,8 +217,12 @@ public Q_SLOTS:
void startControllerTest();
void setGPUThreadRunIdle(bool active);
void updateFullscreenUITheme();
void runOnEmuThread(const std::function<void()>& callback);
private Q_SLOTS:
protected:
void run() override;
private:
void stopInThread();
void onDisplayWindowMouseButtonEvent(int button, bool pressed);
void onDisplayWindowMouseWheelEvent(float dx, float dy);
@ -228,13 +232,7 @@ private Q_SLOTS:
void doBackgroundControllerPoll();
void processAuxiliaryRenderWindowInputEvent(void* userdata, quint32 event, quint32 param1, quint32 param2,
quint32 param3);
public Q_SLOTS:
void runOnEmuThread(const std::function<void()>& callback);
protected:
void run() override;
private:
void createBackgroundControllerPollTimer();
void destroyBackgroundControllerPollTimer();
void confirmActionIfMemoryCardBusy(const QString& action, bool cancel_resume_on_accept,
@ -295,15 +293,13 @@ public:
// NOTE: Should only be called on EmuThread.
void enumerateDevices();
public Q_SLOTS:
void onDeviceConnected(const InputBindingKey& key, const QString& identifier, const QString& device_name,
const QStringList& vibration_motors);
void onDeviceDisconnected(const InputBindingKey& key, const QString& identifier);
private Q_SLOTS:
private:
void resetLists(const DeviceList& devices, const QStringList& motors);
private:
DeviceList m_devices;
QStringList m_vibration_motors;
};

@ -33,9 +33,6 @@ public:
void MakeVisible();
private Q_SLOTS:
void dialogCancelled();
private:
static constexpr int MINIMUM_WIDTH = 500;
static constexpr int MINIMUM_HEIGHT_WITHOUT_CANCEL = 70;
@ -43,6 +40,8 @@ private:
void checkForDelayedShow();
void dialogCancelled();
QProgressDialog m_dialog;
Timer m_show_timer;
float m_show_delay;
@ -68,6 +67,9 @@ public:
bool ModalConfirmation(const std::string_view message) override;
void ModalInformation(const std::string_view message) override;
void start();
void join();
Q_SIGNALS:
void titleUpdated(const QString& title);
void statusUpdated(const QString& status);
@ -75,10 +77,6 @@ Q_SIGNALS:
void threadStarting();
void threadFinished();
public Q_SLOTS:
void start();
void join();
protected:
virtual void runAsync() = 0;
void run() final;

@ -24,15 +24,14 @@ public:
ALWAYS_INLINE const std::string& getSelectedDiscPath() { return m_selected_path; }
private Q_SLOTS:
private:
void populateList(const GameDatabase::DiscSetEntry* dsentry, bool localized_titles);
void onListItemActivated(const QTreeWidgetItem* item);
void updateStartEnabled();
void onSelectClicked();
void onCancelClicked();
private:
void populateList(const GameDatabase::DiscSetEntry* dsentry, bool localized_titles);
Ui::SelectDiscDialog m_ui;
std::string m_selected_path;
};

@ -108,18 +108,11 @@ public:
void setGameTitle(std::string_view title);
bool hasGameTrait(GameDatabase::Trait trait);
Q_SIGNALS:
void settingsResetToDefaults();
public Q_SLOTS:
void setCategory(const char* category);
void setCategoryRow(int index);
private Q_SLOTS:
void onCategoryCurrentRowChanged(int row);
void onRestoreDefaultsClicked();
void onCopyGlobalSettingsClicked();
void onClearSettingsClicked();
Q_SIGNALS:
void settingsResetToDefaults();
protected:
void closeEvent(QCloseEvent* event) override;
@ -138,6 +131,11 @@ private:
void addWidget(QWidget* widget, QString title, QString icon, QString help_text);
bool handleWheelEvent(QWheelEvent* event);
void onCategoryCurrentRowChanged(int row);
void onRestoreDefaultsClicked();
void onCopyGlobalSettingsClicked();
void onClearSettingsClicked();
Ui::SettingsWindow m_ui;
std::unique_ptr<INISettingsInterface> m_sif;

@ -25,25 +25,6 @@ public:
SetupWizardDialog();
~SetupWizardDialog();
private Q_SLOTS:
bool canShowNextPage();
void previousPage();
void nextPage();
void confirmCancel();
void themeChanged();
void languageChanged();
void refreshBiosList();
void onDirectoryListContextMenuRequested(const QPoint& point);
void onAddSearchDirectoryButtonClicked();
void onRemoveSearchDirectoryButtonClicked();
void onSearchDirectoryListSelectionChanged();
void refreshDirectoryList();
void doMultipleDeviceAutomaticBinding(u32 port, QLabel* update_label);
private:
enum Page : u32
{
@ -69,13 +50,30 @@ private:
void updatePageLabels(int prev_page);
void updatePageButtons();
bool canShowNextPage();
void previousPage();
void nextPage();
void confirmCancel();
void themeChanged();
void languageChanged();
void refreshBiosList();
void onDirectoryListContextMenuRequested(const QPoint& point);
void onAddSearchDirectoryButtonClicked();
void onRemoveSearchDirectoryButtonClicked();
void onSearchDirectoryListSelectionChanged();
void refreshDirectoryList();
void doMultipleDeviceAutomaticBinding(u32 port, QLabel* update_label);
void addPathToTable(const std::string& path, bool recursive);
QString findCurrentDeviceForPort(u32 port) const;
void openAutomaticMappingMenu(u32 port, QLabel* update_label);
void doDeviceAutomaticBinding(u32 port, QLabel* update_label, const QString& device);
private Q_SLOTS:
void onGraphicsAspectRatioChanged();
void onAchievementsLoginLogoutClicked();
void onAchievementsViewProfileClicked();

Loading…
Cancel
Save