-
Notifications
You must be signed in to change notification settings - Fork 0
/
textview.h
41 lines (36 loc) · 1.14 KB
/
textview.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef TEXTVIEW_H
#define TEXTVIEW_H
#include "model.h"
#include "protagonisttextview.h"
#include "penemytextview.h"
#include "enemytextview.h"
#include "environmenttextview.h"
#include "healthpacktextview.h"
#include "xenemytextview.h"
class TextView: public QObject
{
Q_OBJECT
public:
TextView(std::shared_ptr<Model> &m);
void initTextView();
void draw();
void redraw();
signals:
void redraw_textbrowser(QString str);
public slots:
//protag slots
void updateProtagPosition(int x,int y);
//xenemy slots
void updateXEnemyTV_slot(int oldX,int oldY,int newX,int newY,std::string xenemy);//receive signal from xenemytextview class
private:
std::shared_ptr<Model> model;
std::shared_ptr<ProtagonistTextView> tvProtag;
std::vector<std::shared_ptr<EnemyTextView>> tvEnemies;
std::vector<std::shared_ptr<PEnemyTextView>> tvPEnemies;
std::vector<std::shared_ptr<XEnemyTextView>> tvXEnemies;
std::vector<std::shared_ptr<EnvironmentTextView>> tvEnvironments;
std::vector<std::shared_ptr<HealthPackTextView>> tvHealthPacks;
int rows,cols;
std::vector<std::string> tiles;
};
#endif // TEXTVIEW_H