CCIMXDesktop
 
Loading...
Searching...
No Matches
SceneDrawer.h
1#ifndef SCENEDRAWER_H
2#define SCENEDRAWER_H
3
4#include "core/DifficultyType.h"
5#include <QList>
6#include <QRect>
7
8class Dinasour;
9class QPainter;
10class Obsticals;
11
17
23public:
24 SceneDrawer() = delete;
30
35 explicit SceneDrawer(const QRect& sceneRect);
36
41 void bind_painter(QPainter* p);
42
46 void drawSky();
47
53 void drawContent(int score, Difficulty type);
54
59 void drawDinasore(Dinasour* dinasour);
60
65 void drawObstical(const QList<Obsticals*>& obs);
66
70 void drawMainGround();
71
76 void drawFlowyGround(int current_speed);
77
82 void setDrawHello(bool st) { drawHello = st; }
83
84private:
85 QRect sceneRect;
86 QPainter* painter;
87 bool drawHello { true };
88 std::shared_ptr<GroundLineProviders> providers;
89
95 void drawSun(const QPointF& center, qreal radius);
96};
97
98#endif // SCENEDRAWER_H
A utility class to manage and render dynamic ground lines.
Definition GroundLineProviders.h:16
Base class for all obstacle objects in the game.
Definition Obsticals.h:15
Handles all rendering operations for the game scene.
Definition SceneDrawer.h:22
void drawSky()
Draws the sky background.
Definition SceneDrawer.cpp:19
void drawContent(int score, Difficulty type)
Draws game content (score and difficulty)
Definition SceneDrawer.cpp:53
void drawMainGround()
Draws the main ground line.
Definition SceneDrawer.cpp:108
void drawObstical(const QList< Obsticals * > &obs)
Draws all obstacles.
Definition SceneDrawer.cpp:101
void drawFlowyGround(int current_speed)
Draws the flowing ground effect.
Definition SceneDrawer.cpp:121
void bind_painter(QPainter *p)
Binds a QPainter for drawing operations.
Definition SceneDrawer.cpp:15
void drawDinasore(Dinasour *dinasour)
Draws the dinosaur character.
Definition SceneDrawer.cpp:96
void setDrawHello(bool st)
Sets whether to draw the hello message.
Definition SceneDrawer.h:82
Q_DISABLE_COPY_MOVE(SceneDrawer)
disable copy move object
Configuration constants related to the dinosaur figure.