CCIMXDesktop
 
Loading...
Searching...
No Matches
DinasourFrameFetcher Class Reference

Provides frame data for the dinosaur character based on its state. More...

#include <FigureFrameFetcher.h>

Inheritance diagram for DinasourFrameFetcher:
FrameProvider

Public Types

enum class  State { NORMAL , LAY }
 States the dinosaur character can be in. More...
 

Public Member Functions

void set_frame_state (State s)
 Sets the current frame state.
 
 DinasourFrameFetcher (const QString &valid_base_path, QObject *parent)
 Constructs the dinosaur frame fetcher with a valid base path.
 
QRect & src_bounding_rect () override
 Returns the current source bounding rectangle.
 
- Public Member Functions inherited from FrameProvider
 FrameProvider (const QString &valid_base_path, QObject *parent)
 Constructs a FrameProvider with initial path.
 
virtual ~FrameProvider ()
 Destructor.
 
void append_src (const QString &valid_base_path)
 Adds a single source path.
 
void append_srcs (const QStringList &valid_base_paths)
 Adds multiple source paths.
 
void lock_src (const QString &valid_base_path)
 Locks to a specific source path.
 
void terminate_flow ()
 Stops frame updates.
 
void resume_flow ()
 Resumes frame updates.
 
void manual_shuffle_once ()
 Manually triggers one frame shuffle.
 
QPixmap & src_pixmap ()
 Gets current source pixmap.
 

Detailed Description

Provides frame data for the dinosaur character based on its state.

Member Enumeration Documentation

◆ State

enum class DinasourFrameFetcher::State
strong

States the dinosaur character can be in.

Enumerator
NORMAL 

Normal standing/running state.

LAY 

Crouching/laying state.

Constructor & Destructor Documentation

◆ DinasourFrameFetcher()

DinasourFrameFetcher::DinasourFrameFetcher ( const QString &  valid_base_path,
QObject *  parent 
)
explicit

Constructs the dinosaur frame fetcher with a valid base path.

Parameters
valid_base_pathBase path to the frame resources.
parentThe parent QObject.

Member Function Documentation

◆ set_frame_state()

void DinasourFrameFetcher::set_frame_state ( State  s)
inline

Sets the current frame state.

Parameters
sThe new state.

◆ src_bounding_rect()

QRect & DinasourFrameFetcher::src_bounding_rect ( )
overridevirtual

Returns the current source bounding rectangle.

Returns
Reference to the QRect representing the bounding rect.

Implements FrameProvider.


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