Go to the documentation of this file.
7 #include <QtWidgets/QWidget>
8 #include <SFML/Graphics/RenderWindow.hpp>
9 #include <QtCore/QTimer>
10 #include <QtWidgets/QMainWindow>
11 #include <QtWidgets/QGridLayout>
28 #ifdef DEBUGGER_ENABLED
29 void enableDebugCPU();
32 void enableRamViewer();
34 void enableHeaderViewer();
36 void enableDebugAPU();
38 void enableDebugBus();
40 void enableCgramViewer();
42 void enableRegisterViewer();
44 void enableTileViewer();
50 QtFullSFML(
SNES &snes, QWidget* parent,
const QPoint& position,
const QSize& size,
int frameRate = 0);
72 void putPixel(
unsigned y,
unsigned x, uint32_t rgba)
override;
77 void playAudio(std::span<int16_t> samples)
override;
82 explicit QtSFML(QWidget *parentWidget);
void setWindowName(std::string &newWindowName) override
Set a new name to the window, if there is already a name it will be overwrite.
Definition: QtSFML.cpp:46
QtSFML & operator=(const QtSFML &)=delete
QtFullSFML * _sfWidget
The SFML widget.
Definition: QtSFML.hpp:63
void createWindow(SNES &snes, int maxFPS) override
Use this function to create the window.
Definition: QtSFML.cpp:29
~QtFullSFML() override=default
Definition: IRenderer.hpp:13
void playAudio(std::span< int16_t > samples) override
Playing all samples from buffer.
Definition: QtSFML.cpp:39
The SFML window that manage the update.
Definition: QtSFML.hpp:19
QWidget * _window
The main window that the app reside on.
Definition: QtSFML.hpp:60
Container of all the components of the SNES.
Definition: SNES.hpp:32
QtSFML(QWidget *parentWidget)
Constructor that return a SFML renderer inside a QT widget.
Definition: QtSFML.cpp:23
QtSFMLWindow(int height, int width)
Constructor that return a SFML renderer inside a QT window.
Definition: QtSFML.cpp:128
void reset()
Action called when clicking on the reset button.
Definition: QtSFML.cpp:81
A SFML renderer inside a QT widget.
Definition: QtSFML.hpp:57
void onUpdate() override
Function called to update this widget.
Definition: QtSFML.cpp:56
void openRom()
Open the select rom dialog and load a new one if the option is selected.
Definition: QtSFML.cpp:73
void putPixel(unsigned y, unsigned x, uint32_t rgba) override
Add a pixel to the buffer to the coordinates x, y with the color rgba.
Definition: QtSFML.cpp:34
Definition: IRenderer.hpp:15
QtSFMLWindow & operator=(const QtSFMLWindow &)=delete
void createWindow(SNES &snes, int maxFPS) override
Use this function to create the window.
Definition: QtSFML.cpp:135
void drawScreen() override
This function doesn't do anything because QT internally handle drawing to the screen.
Definition: QtSFML.cpp:44
SNES & _snes
The snes to update.
Definition: QtSFML.hpp:22
QtFullSFML(SNES &snes, QWidget *parent, const QPoint &position, const QSize &size, int frameRate=0)
Definition: QtSFML.cpp:51
QMainWindow _window
The main window that the app reside on.
Definition: QtSFML.hpp:91
QtFullSFML & operator=(const QtFullSFML &)=delete
Definition: QtSFML.hpp:88