ComSquare
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ComSquare::Renderer::QtFullSFML Class Reference

The SFML window that manage the update. More...

#include <QtSFML.hpp>

Inheritance diagram for ComSquare::Renderer::QtFullSFML:
Collaboration diagram for ComSquare::Renderer::QtFullSFML:

Public Member Functions

void openRom ()
 Open the select rom dialog and load a new one if the option is selected. More...
 
void reset ()
 Action called when clicking on the reset button. More...
 
 QtFullSFML (SNES &snes, QWidget *parent, const QPoint &position, const QSize &size, int frameRate=0)
 
 QtFullSFML (const QtFullSFML &)=delete
 
QtFullSFMLoperator= (const QtFullSFML &)=delete
 
 ~QtFullSFML () override=default
 
- Public Member Functions inherited from ComSquare::Renderer::QtWidgetSFML
 QtWidgetSFML (QWidget *parent, const QPoint &position, const QSize &size, int frameRate=0)
 
 QtWidgetSFML (const QtWidgetSFML &)=delete
 
QtWidgetSFMLoperator= (const QtWidgetSFML &)=delete
 
 ~QtWidgetSFML () override=default
 
- Public Member Functions inherited from ComSquare::Renderer::SFRenderer
void setWindowName (std::string &newWindowName) override
 Set a new name to the window, if there is already a name it will be overwrite. More...
 
void drawScreen () override
 Update the screen by printing the buffer. 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 playAudio (std::span< int16_t > samples) override
 Playing all samples from buffer. More...
 
void getEvents ()
 Get the inputs from the Window. More...
 
void createWindow (SNES &snes, int maxFPS) override
 Use this function to create the window. More...
 
 SFRenderer (unsigned int height, unsigned int width)
 Constructor that return the window component of the SFML. More...
 
 SFRenderer (const SFRenderer &)=delete
 
SFRendereroperator= (const SFRenderer &)=delete
 
 ~SFRenderer ()
 

Private Member Functions

void onUpdate () override
 Function called to update this widget. More...
 

Private Attributes

SNES_snes
 The snes to update. More...
 

Additional Inherited Members

- Public Slots inherited from ComSquare::Renderer::QtWidgetSFML
- Public Attributes inherited from ComSquare::Renderer::SFRenderer
bool shouldExit = false
 Tells to the program if the window has been closed, and therefore if he should stop. More...
 
- Protected Attributes inherited from ComSquare::Renderer::SFRenderer
sf::RenderWindow _window
 The Renderer for the window. More...
 
sf::VideoMode _videoMode
 Video Mode containing the _height and _width of the window. More...
 
sf::Color * _pixelBuffer
 The image that contain all of the pixels. More...
 
sf::Sprite _sprite
 The sprite to render the array of pixels. More...
 
sf::Texture _texture
 The texture to render the array of pixels. More...
 
sf::SoundBuffer _soundBuffer
 The buffer containing samples to be played. More...
 
sf::Sound _sound
 the sound played More...
 

Detailed Description

The SFML window that manage the update.

Constructor & Destructor Documentation

◆ QtFullSFML() [1/2]

ComSquare::Renderer::QtFullSFML::QtFullSFML ( SNES snes,
QWidget *  parent,
const QPoint &  position,
const QSize &  size,
int  frameRate = 0 
)

◆ QtFullSFML() [2/2]

ComSquare::Renderer::QtFullSFML::QtFullSFML ( const QtFullSFML )
delete

◆ ~QtFullSFML()

ComSquare::Renderer::QtFullSFML::~QtFullSFML ( )
overridedefault

Member Function Documentation

◆ onUpdate()

void ComSquare::Renderer::QtFullSFML::onUpdate ( )
overrideprivatevirtual

Function called to update this widget.

Implements ComSquare::Renderer::QtWidgetSFML.

◆ openRom()

void ComSquare::Renderer::QtFullSFML::openRom ( )

Open the select rom dialog and load a new one if the option is selected.

◆ operator=()

QtFullSFML& ComSquare::Renderer::QtFullSFML::operator= ( const QtFullSFML )
delete

◆ reset()

void ComSquare::Renderer::QtFullSFML::reset ( )

Action called when clicking on the reset button.

Member Data Documentation

◆ _snes

SNES& ComSquare::Renderer::QtFullSFML::_snes
private

The snes to update.


The documentation for this class was generated from the following files: