mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-12-16 04:08:48 +00:00
Some checks are pending
🐧 Linux Builds / AppImage (push) Waiting to run
🐧 Linux Builds / Flatpak (push) Waiting to run
🍎 MacOS Builds / Defaults (push) Waiting to run
🖥️ Windows Builds / Lint VS Project Files (push) Waiting to run
🖥️ Windows Builds / SSE4 (push) Blocked by required conditions
🖥️ Windows Builds / AVX2 (push) Blocked by required conditions
🖥️ Windows Builds / CMake (push) Waiting to run
84 lines
1.7 KiB
C++
84 lines
1.7 KiB
C++
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
|
// SPDX-License-Identifier: GPL-3.0+
|
|
|
|
#pragma once
|
|
|
|
#include "ui_DebuggerWindow.h"
|
|
|
|
#include "DebugTools/DebugInterface.h"
|
|
|
|
#include <kddockwidgets/MainWindow.h>
|
|
#include <QtCore/QTimer>
|
|
|
|
class DockManager;
|
|
|
|
class DebuggerWindow : public KDDockWidgets::QtWidgets::MainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
DebuggerWindow(QWidget* parent);
|
|
|
|
static DebuggerWindow* getInstance();
|
|
static DebuggerWindow* createInstance();
|
|
static void destroyInstance();
|
|
static bool shouldShowOnStartup();
|
|
|
|
DockManager& dockManager();
|
|
|
|
void setupDefaultToolBarState();
|
|
void clearToolBarState();
|
|
void setupFonts();
|
|
void updateFontActions();
|
|
void saveFontSize();
|
|
int fontSize();
|
|
void updateTheme();
|
|
|
|
void saveWindowGeometry();
|
|
void restoreWindowGeometry();
|
|
bool shouldSaveWindowGeometry();
|
|
|
|
void updateFromSettings();
|
|
|
|
public slots:
|
|
void onVMStarting();
|
|
void onVMPaused();
|
|
void onVMResumed();
|
|
void onVMStopped();
|
|
|
|
void onAnalyse();
|
|
void onSettings();
|
|
void onGameSettings();
|
|
void onRunPause();
|
|
void onStepInto();
|
|
void onStepOver();
|
|
void onStepOut();
|
|
|
|
Q_SIGNALS:
|
|
// Only emitted if the pause wasn't a temporary one triggered by the
|
|
// breakpoint code.
|
|
void onVMActuallyPaused();
|
|
|
|
protected:
|
|
void changeEvent(QEvent* event) override;
|
|
void closeEvent(QCloseEvent* event) override;
|
|
|
|
private:
|
|
DebugInterface* currentCPU();
|
|
|
|
Ui::DebuggerWindow m_ui;
|
|
|
|
DockManager* m_dock_manager;
|
|
|
|
QByteArray m_default_toolbar_state;
|
|
QTimer* m_refresh_timer = nullptr;
|
|
|
|
int m_font_size;
|
|
static const constexpr int MINIMUM_FONT_SIZE = 5;
|
|
static const constexpr int MAXIMUM_FONT_SIZE = 30;
|
|
|
|
bool m_is_updating_theme = false;
|
|
};
|
|
|
|
extern DebuggerWindow* g_debugger_window;
|