|
ComSquare
|
A SFML renderer inside a QT widget. More...
#include <QtSFML.hpp>
Public Member Functions | |
| void | createWindow (SNES &snes, int maxFPS) override |
| Use this function to create the window. More... | |
| 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. More... | |
| void | drawScreen () override |
| This function doesn't do anything because QT internally handle drawing to the screen. More... | |
| void | playAudio (std::span< int16_t > samples) override |
| Playing all samples from buffer. More... | |
| void | setWindowName (std::string &newWindowName) override |
| Set a new name to the window, if there is already a name it will be overwrite. More... | |
| QtSFML (QWidget *parentWidget) | |
| Constructor that return a SFML renderer inside a QT widget. More... | |
| QtSFML (const QtSFML &)=delete | |
| QtSFML & | operator= (const QtSFML &)=delete |
| ~QtSFML ()=default | |
Protected Attributes | |
| QtFullSFML * | _sfWidget = nullptr |
| The SFML widget. More... | |
Private Attributes | |
| QWidget * | _window |
| The main window that the app reside on. More... | |
A SFML renderer inside a QT widget.
|
explicit |
Constructor that return a SFML renderer inside a QT widget.
|
delete |
|
default |
|
overridevirtual |
Use this function to create the window.
| maxFPS | The number of FPS you aim to run on. |
Implements ComSquare::Renderer::IRenderer.
Reimplemented in ComSquare::Renderer::QtSFMLWindow.
|
overridevirtual |
This function doesn't do anything because QT internally handle drawing to the screen.
Implements ComSquare::Renderer::IRenderer.
|
overridevirtual |
Playing all samples from buffer.
| samples | Buffer containing samples |
Implements ComSquare::Renderer::IRenderer.
|
overridevirtual |
Add a pixel to the buffer to the coordinates x, y with the color rgba.
| X | horizontal index. |
| Y | vertical index. |
| rgba | The color of the pixel. |
Implements ComSquare::Renderer::IRenderer.
|
overridevirtual |
Set a new name to the window, if there is already a name it will be overwrite.
| newWindowName | new title for the window. |
Implements ComSquare::Renderer::IRenderer.
|
protected |
The SFML widget.
|
private |
The main window that the app reside on.
1.8.17