1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

qt: Use #pragma once, Q_SIGNALS, Q_SLOTS

This commit is contained in:
Nekotekina 2017-06-24 14:24:11 +03:00
parent dd553331df
commit ef21e2253f
36 changed files with 67 additions and 195 deletions

View File

@ -1,5 +1,4 @@
#ifndef BASIC_KEYBOARD_HANDLER_H
#define BASIC_KEYBOARD_HANDLER_H
#pragma once
#include "stdafx.h"
#include "Emu/Io/KeyboardHandler.h"
@ -22,5 +21,3 @@ public:
private:
QObject* m_target;
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef BASIC_MOUSE_HANDLER_H
#define BASIC_MOUSE_HANDLER_H
#pragma once
#include "stdafx.h"
#include "Emu/Io/MouseHandler.h"
@ -24,5 +23,3 @@ public:
private:
QObject* m_target;
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef MM_JOYSTICK_HANDLER_H
#define MM_JOYSTICK_HANDLER_H
#pragma once
#include "Emu/Io/PadHandler.h"
#include <Windows.h>
@ -71,5 +70,3 @@ private:
JOYINFOEX js_info;
JOYCAPS js_caps;
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef RPCS3_APP_H
#define RPCS3_APP_H
#pragma once
#include "stdafx.h"
@ -31,14 +30,14 @@ public:
/** Call this method before calling app.exec
*/
void Init();
signals:
Q_SIGNALS:
void OnEmulatorRun();
void OnEmulatorPause();
void OnEmulatorResume();
void OnEmulatorStop();
void OnEmulatorReady();
void RequestCallAfter(const std::function<void()>& func);
private slots:
private Q_SLOTS:
void OnChangeStyleSheetRequest(const QString& path);
void HandleCallAfter(const std::function<void()>& func);
void ResetPads();
@ -53,4 +52,3 @@ private:
main_window* RPCS3MainWin;
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef AUDIOTAB_H
#define AUDIOTAB_H
#pragma once
#include "emu_settings.h"
@ -13,10 +12,4 @@ class audio_tab : public QWidget
public:
explicit audio_tab(std::shared_ptr<emu_settings> xemu_settings, QWidget *parent = 0);
signals:
public slots:
};
#endif // AUDIOTAB_H

View File

@ -1,5 +1,4 @@
#ifndef AUTOPAUSESETTINGSDIALOG_H
#define AUTOPAUSESETTINGSDIALOG_H
#pragma once
#include "stdafx.h"
#include "Emu/System.h"
@ -40,9 +39,9 @@ public:
void LoadEntries(void);
void SaveEntries(void);
public slots :
public Q_SLOTS:
void OnRemove();
private slots :
private Q_SLOTS:
void ShowContextMenu(const QPoint &pos);
void keyPressEvent(QKeyEvent *event);
};
@ -61,10 +60,8 @@ class AutoPauseConfigDialog : public QDialog
public:
explicit AutoPauseConfigDialog(QWidget* parent, auto_pause_settings_dialog* apsd, bool newEntry, u32* entry);
private slots :
private Q_SLOTS:
void OnOk();
void OnCancel();
void OnUpdateValue();
};
#endif // AUTOPAUSESETTINGSDIALOG_H

View File

@ -1,5 +1,4 @@
#ifndef CGDISASMWINDOW_H
#define CGDISASMWINDOW_H
#pragma once
#include <QTextEdit>
#include <QDropEvent>
@ -11,7 +10,7 @@ class cg_disasm_window : public QWidget
{
Q_OBJECT
private slots:
private Q_SLOTS:
void ShowContextMenu(const QPoint &pos);
void ShowDisasm();
bool IsValidFile(const QMimeData& md, bool save = false);
@ -35,5 +34,3 @@ protected:
void dragMoveEvent(QDragMoveEvent* ev);
void dragLeaveEvent(QDragLeaveEvent* ev);
};
#endif // CGDISASMWINDOW_H

View File

@ -1,5 +1,4 @@
#ifndef CORETAB_H
#define CORETAB_H
#pragma once
#include "emu_settings.h"
@ -15,7 +14,7 @@ class core_tab : public QWidget
public:
explicit core_tab(std::shared_ptr<emu_settings> xSettings, QWidget *parent = 0);
public slots:
public Q_SLOTS:
void SaveSelectedLibraries();
private:
@ -25,5 +24,3 @@ private:
std::shared_ptr<emu_settings> xemu_settings;
};
#endif // CORETAB_H

View File

@ -1,5 +1,4 @@
#ifndef DEBUGGERFRAME_H
#define DEBUGGERFRAME_H
#pragma once
#include "stdafx.h"
#include "Emu/Memory/Memory.h"
@ -79,11 +78,11 @@ protected:
/** Override inherited method from Qt to allow signalling when close happened.*/
void closeEvent(QCloseEvent* event);
signals:
Q_SIGNALS:
void DebugFrameClosed();
public slots:
public Q_SLOTS:
void DoStep();
private slots:
private Q_SLOTS:
void OnSelectUnit();
void Show_Val();
void Show_PC();
@ -116,5 +115,3 @@ protected:
void wheelEvent(QWheelEvent* event);
void resizeEvent(QResizeEvent* event);
};
#endif // DEBUGGERFRAME_H

View File

@ -1,5 +1,4 @@
#ifndef EMU_SETTINGS_H
#define EMU_SETTINGS_H
#pragma once
#include "Utilities/File.h"
#include "Utilities/Log.h"
@ -124,7 +123,7 @@ public:
/** Sets the setting type to a given value.*/
void SetSetting(SettingsType type, const std::string& val);
public slots:
public Q_SLOTS:
/** Writes the unsaved settings to file. Used in settings dialog on accept.*/
void SaveSettings();
private:
@ -197,5 +196,3 @@ private:
YAML::Node currentSettings; // The current settings as a YAML node.
fs::file config; //! File to read/write the config settings.
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef GAMELISTFRAME_H
#define GAMELISTFRAME_H
#pragma once
#include "stdafx.h"
#include "Emu/GameInfo.h"
@ -58,14 +57,14 @@ public:
/** Saves settings. Public so that main frame can save this when a caching of column widths is needed for settings backup */
void SaveSettings();
public slots:
public Q_SLOTS:
/** Resize Gamelist Icons to size */
void ResizeIcons(const QSize& size, const int& idx);
void SetListMode(const bool& isList);
void SetToolBarVisible(const bool& showToolBar);
void SetCategoryActIcon(const int& id, const bool& active);
private slots:
private Q_SLOTS:
void Boot(int row);
void RemoveCustomConfiguration(int row);
void OnColClicked(int col);
@ -73,7 +72,7 @@ private slots:
void ShowContextMenu(const QPoint &pos);
void ShowSpecifiedContextMenu(const QPoint &pos, int index); // Different name because the notation for overloaded connects is messy
void doubleClickedSlot(const QModelIndex& index);
signals:
Q_SIGNALS:
void game_list_frameClosed();
void RequestIconPathSet(const std::string path);
void RequestAddRecentGame(const q_string_pair& entry);
@ -149,5 +148,3 @@ private:
uint m_games_per_row = 0;
};
#endif // GAMELISTFRAME_H

View File

@ -1,5 +1,4 @@
#ifndef GAME_LIST_GRID_H
#define GAME_LIST_GRID_H
#pragma once
#include "game_list_grid_delegate.h"
@ -32,5 +31,3 @@ public:
private:
game_list_grid_delegate* grid_item_delegate;
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef GRAPHICSTAB_H
#define GRAPHICSTAB_H
#pragma once
#include "emu_settings.h"
@ -14,13 +13,9 @@ class graphics_tab : public QWidget
public:
explicit graphics_tab(std::shared_ptr<emu_settings> xemu_settings, Render_Creator r_Creator, QWidget *parent = 0);
signals:
private:
std::shared_ptr<emu_settings> xemu_settings;
QString m_oldRender = "";
bool m_isD3D12 = false;
bool m_isVulkan = false;
};
#endif // GRAPHICSTAB_H

View File

@ -1,5 +1,4 @@
#ifndef GSFRAME_H
#define GSFRAME_H
#pragma once
#include "stdafx.h"
#include "Emu/RSX/GSRender.h"
@ -41,8 +40,6 @@ protected:
int client_height() override;
void hideEvent(QHideEvent* ev) override;
private slots:
private Q_SLOTS:
void HandleCursor(QWindow::Visibility visibility);
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef GUI_SETTINGS_H
#define GUI_SETTINGS_H
#pragma once
#include "Utilities/Log.h"
@ -133,7 +132,7 @@ public:
QStringList GetStylesheetEntries();
QStringList GetGameListCategoryFilters();
public slots:
public Q_SLOTS:
void Reset(bool removeMeta = false);
/** Write value to entry */
@ -153,5 +152,3 @@ private:
QSettings settings;
QDir settingsDir;
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef GUITAB_H
#define GUITAB_H
#pragma once
#include "gui_settings.h"
@ -21,13 +20,13 @@ class gui_tab : public QWidget
public:
explicit gui_tab(std::shared_ptr<gui_settings> guiSettings, QWidget *parent = 0);
public slots:
public Q_SLOTS:
void Accept();
signals:
Q_SIGNALS:
void GuiSettingsSyncRequest();
void GuiSettingsSaveRequest();
void GuiStylesheetRequest(const QString& path);
private slots:
private Q_SLOTS:
void OnResetDefault();
void OnBackupCurrentConfig();
void OnApplyConfig();
@ -44,5 +43,3 @@ private:
std::shared_ptr<gui_settings> xgui_settings;
};
#endif // GUITAB_H

View File

@ -1,5 +1,4 @@
#ifndef INPUTTAB_H
#define INPUTTAB_H
#pragma once
#include "emu_settings.h"
@ -13,10 +12,4 @@ class input_tab : public QWidget
public:
explicit input_tab(std::shared_ptr<emu_settings> xemu_settings, QWidget *parent = 0);
signals:
public slots:
};
#endif // INPUTTAB_H

View File

@ -1,6 +1,4 @@
#ifndef INSTRUCTIONEDITOR_H
#define INSTRUCTIONEDITOR_H
#pragma once
#include "stdafx.h"
#include "Emu/System.h"
@ -33,5 +31,3 @@ public:
void updatePreview();
};
#endif // !INSTRUCTIONEDITOR_H

View File

@ -1,5 +1,4 @@
#ifndef KERNELEXPLORER_H
#define KERNELEXPLORER_H
#pragma once
#include <QDialog>
#include <QVBoxLayout>
@ -15,8 +14,6 @@ class kernel_explorer : public QDialog
public:
kernel_explorer(QWidget* parent);
private slots:
private Q_SLOTS:
void Update();
};
#endif // KERNELEXPLORER_H

View File

@ -1,5 +1,4 @@
#ifndef LOGFRAME_H
#define LOGFRAME_H
#pragma once
#include "Utilities/File.h"
#include "Utilities/Log.h"
@ -23,12 +22,12 @@ public:
/** Loads from settings. Public so that main_window can call this easily. */
void LoadSettings();
signals:
Q_SIGNALS:
void log_frameClosed();
protected:
/** Override inherited method from Qt to allow signalling when close happened.*/
void closeEvent(QCloseEvent* event);
private slots:
private Q_SLOTS:
void UpdateUI();
private:
void SetLogLevel(logs::level lev);
@ -58,5 +57,3 @@ private:
std::shared_ptr<gui_settings> xgui_settings;
};
#endif // LOGFRAME_H

View File

@ -1,5 +1,4 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#pragma once
#ifdef _WIN32
#include <QWinTaskbarProgress>
@ -57,17 +56,17 @@ public:
void CreateThumbnailToolbar();
QIcon GetAppIcon();
signals:
Q_SIGNALS:
void RequestGlobalStylesheetChange(const QString& sheetFilePath);
public slots:
public Q_SLOTS:
void OnEmuStop();
void OnEmuRun();
void OnEmuResume();
void OnEmuPause();
void OnEmuReady();
private slots:
private Q_SLOTS:
void BootElf();
void BootGame();
void InstallPkg();
@ -150,5 +149,3 @@ private:
game_list_frame *gameListFrame;
std::shared_ptr<gui_settings> guiSettings;
};
#endif // MAINWINDOW_H

View File

@ -1,5 +1,4 @@
#ifndef MEMORYSTRINGSEARCHER_H
#define MEMORYSTRINGSEARCHER_H
#pragma once
#include "stdafx.h"
#include "Emu/Memory/Memory.h"
@ -22,8 +21,6 @@ class memory_string_searcher : public QDialog
public:
memory_string_searcher(QWidget* parent);
private slots:
private Q_SLOTS:
void OnSearch();
};
#endif // MEMORYSTRINGSEARCHER_H

View File

@ -1,5 +1,4 @@
#ifndef MEMORYVIEWER_H
#define MEMORYVIEWER_H
#pragma once
#include <QDialog>
#include <QLineEdit>
@ -55,5 +54,3 @@ public:
//Static methods
static void ShowImage(QWidget* parent, u32 addr, int mode, u32 sizex, u32 sizey, bool flipv);
};
#endif // !MEMORYVIEWER_H

View File

@ -1,5 +1,4 @@
#ifndef MISCTAB_H
#define MISCTAB_H
#pragma once
#include "emu_settings.h"
@ -14,5 +13,3 @@ class misc_tab : public QWidget
public:
explicit misc_tab(std::shared_ptr<emu_settings> xemu_settings, QWidget *parent = 0);
};
#endif // MISCTAB_H

View File

@ -1,5 +1,4 @@
#ifndef MSGDIALOG_H
#define MSGDIALOG_H
#pragma once
#include "stdafx.h"
#include "Emu/Memory/vm.h"
@ -103,5 +102,3 @@ private:
}
}
};
#endif // !MSGDIALOG_H

View File

@ -1,5 +1,4 @@
#ifndef NETWORKINGTAB_H
#define NETWORKINGTAB_H
#pragma once
#include "emu_settings.h"
@ -13,10 +12,4 @@ class networking_tab : public QWidget
public:
explicit networking_tab(std::shared_ptr<emu_settings> xemu_settings, QWidget *parent = 0);
signals:
public slots:
};
#endif // NETWORKINGTAB_H

View File

@ -1,5 +1,4 @@
#ifndef PADSETTINGSDIALOG_H
#define PADSETTINGSDIALOG_H
#pragma once
#include <QDialog>
#include <QEvent>
@ -91,7 +90,7 @@ class pad_settings_dialog : public QDialog, pad_buttons, PadHandlerBase
{
Q_OBJECT
private slots :
private Q_SLOTS:
void OnPadButtonClicked(int id);
private:
@ -112,5 +111,3 @@ public:
void LoadSettings();
const QString GetKeyName(const u32 keyCode);
};
#endif // PADSETTINGSDIALOG_H

View File

@ -1,5 +1,4 @@
#ifndef REGISTEREDITOR_H
#define REGISTEREDITOR_H
#pragma once
#include "stdafx.h"
#include "Emu/System.h"
@ -35,5 +34,3 @@ public:
private:
void OnOkay(const std::shared_ptr<cpu_thread>& _cpu);
};
#endif // REGISTEREDITOR_H

View File

@ -1,5 +1,4 @@
#ifndef RSXDEBUGGER_H
#define RSXDEBUGGER_H
#pragma once
#include "stdafx.h"
@ -112,12 +111,10 @@ public:
private:
QSignalMapper *signalMapper;
public slots:
public Q_SLOTS:
virtual void keyPressEvent(QKeyEvent* event);
virtual void wheelEvent(QWheelEvent* event);
virtual void OnClickDrawCalls();
virtual void SetFlags();
virtual void SetPrograms();
};
#endif // !RSXDEBUGGER_H

View File

@ -1,5 +1,4 @@
#ifndef SAVEDATADIALOG_H
#define SAVEDATADIALOG_H
#pragma once
#include "Emu/Cell/Modules/cellSaveData.h"
@ -8,6 +7,3 @@ class save_data_dialog : public SaveDialogBase
public:
virtual s32 ShowSaveDataList(std::vector<SaveDataEntry>& save_entries, s32 focused, vm::ptr<CellSaveDataListSet> listSet) override;
};
#endif // !SAVEDATADIALOG_H

View File

@ -1,5 +1,4 @@
#ifndef SAVEDATAUTILITY_H
#define SAVEDATAUTILITY_H
#pragma once
#include <QDialog>
#include <QHBoxLayout>
@ -52,7 +51,7 @@ class save_data_manage_dialog :public QDialog
QComboBox* m_sort_options;
unsigned int* m_sort_type;
private slots:
private Q_SLOTS:
void OnInfo();
void OnCopy();
void OnDelete();
@ -88,7 +87,7 @@ private:
QAction* infoAct;
void OnSort(int id);
private slots:
private Q_SLOTS:
void OnSelect();
void OnManage();
void OnEntryCopy();
@ -96,5 +95,3 @@ private slots:
void OnEntryInfo();
void ShowContextMenu(const QPoint &pos);
};
#endif // !SAVEDATAUTILITY_H

View File

@ -1,5 +1,4 @@
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#pragma once
#include "gui_settings.h"
#include "emu_settings.h"
@ -17,12 +16,10 @@ class settings_dialog : public QDialog
public:
explicit settings_dialog(std::shared_ptr<gui_settings> xSettings, Render_Creator r_Creator, QWidget *parent = 0, GameInfo *game = nullptr);
signals:
Q_SIGNALS:
void GuiSettingsSyncRequest();
void GuiStylesheetRequest(const QString& path);
void GuiSettingsSaveRequest();
private:
QTabWidget *tabWidget;
};
#endif // SETTINGSDIALOG_H

View File

@ -1,5 +1,4 @@
#ifndef SYSTEMTAB_H
#define SYSTEMTAB_H
#pragma once
#include "emu_settings.h"
@ -13,10 +12,4 @@ class system_tab : public QWidget
public:
explicit system_tab(std::shared_ptr<emu_settings> xemu_settings, QWidget *parent = 0);
signals:
public slots:
};
#endif // SYSTEMTAB_H

View File

@ -1,5 +1,4 @@
#ifndef TABLEITEMDELEGATE_H
#define TABLEITEMDELEGATE_H
#pragma once
#include <QItemDelegate>
@ -10,5 +9,3 @@ public:
explicit table_item_delegate(QObject *parent = 0) {}
virtual void drawFocus(QPainter * /*painter*/, const QStyleOptionViewItem & /*option*/, const QRect & /*rect*/) const {}
};
#endif // !TABLEITEMDELEGATE_H

View File

@ -1,5 +1,4 @@
#ifndef VFS_DIALOG_H
#define VFS_DIALOG_H
#pragma once
#include "gui_settings.h"
#include "emu_settings.h"
@ -19,6 +18,3 @@ private:
QTabWidget* tabs;
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef WELCOME_DIALOG_H
#define WELCOME_DIALOG_H
#pragma once
#include <QDialog>
#include <QKeyEvent>
@ -12,5 +11,3 @@ class welcome_dialog : public QDialog
public:
explicit welcome_dialog(QWidget* parent = nullptr);
};
#endif