-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharenaWindow.h
More file actions
102 lines (73 loc) · 2.15 KB
/
Copy patharenaWindow.h
File metadata and controls
102 lines (73 loc) · 2.15 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef ARENAWINDOW_H
#define ARENAWINDOW_H
#include <QMainWindow>
// Mohsen
#include <QGraphicsScene>
#include <QMouseEvent>
#include <QGraphicsSceneMouseEvent>
#include <QEvent>
#include <QPainter>
#include "ui/renderarea.h"
#include "ui/worldmodel.h"
#include <QGridLayout>
namespace Ui {
class ArenaWindow;
}
/**
* @class arenaWindow
* @brief The arenaWindow class provides the main window for the arena GUI.
*
* This class handles the user interface and logic for interacting with the arena environment.
*/
class ArenaWindow : public QMainWindow
{
Q_OBJECT
public:
// explicit ArenaWindow( WorldModel *wm = nullptr);
explicit ArenaWindow(QWidget *parent = nullptr, WorldModel* wm = nullptr, QString title = "Arena Window");
/**
* @brief Destructor for arenaWindow.
*/
~ArenaWindow();
// void changeScreenBG(QColor color);
void toggleFullScreen(bool goFullScreen);
// void changeSceneRect(QRect rect);
// void fitSceneRect();
// void setFromImage(QPixmap pics);
void toggleGrabMouse(bool isGrab);
// void drawPoint(QPoint pnt);
// void removePic();
RenderArea *_renderArea;
// void paintEvent(QPaintEvent *);
private slots:
public slots:
// void refresh();
// void paintEvent(QPaintEvent *);
private:
Ui::ArenaWindow *ui;
QGraphicsScene *scene;
QGridLayout *testGrid;
WorldModel* _wm;
// void mouseMoveEvent(QMouseEvent *ev);
void mousePressEvent(QMouseEvent *ev);
void mouseMoveEvent(QMouseEvent *ev);
void mouseReleaseEvent(QMouseEvent *ev);
// void leaveEvent(QEvent *);
int ms_x, ms_y;
bool mouseGrab = true;
int mouseVer = 2; // ver1: rightclick > leftclick, ver2: drag and drop
bool isDragged = false;
// User Interface
// QBrush *brush_tmp;
// QBrush brush_tmp2;
// QBrush *brush_field ,*brush_goals, *brush_ball, *brush_yrobot,*brush_brobot,*brush_test,
// *brush_astarNode, *brush_astarResult ,*brush_marking ,*brush_debug , *brush_pass;
// QTimer _timer;
signals:
// void mouse_pressed();
void mouse_Pos();
// void mouse_Left();
void moving(QPoint);
void moveDone();
};
#endif // ARENAWINDOW_H