PCB Environment 2

Loading...
Searching...
No Matches
Window.hpp
1
2#ifndef GYM_PCB_UI_WINDOW_H
3#define GYM_PCB_UI_WINDOW_H
4
5#include "GLWidget.hpp"
6#include <QWidget>
7#include <QEvent>
8
9 class QTimer;
10 class QLabel;
11 class QTabWidget;
12 class ActionTab;
13 class BrowserTab;
14 class ViewTab;
15 class ParameterTab;
16 class PCBoard;
17 class UIApplication;
18 class UIActions;
19
20 class Window : public QWidget
21{
22 Q_OBJECT
23
24 public:
25 Window(UIApplication&);
26 ~Window();
27
28 ActionTab *getActionTab() const { return mActionTab; }
29 ParameterTab *getParameterTab() const { return mParamTab; }
30
31 GLWidget *getGLWidget() const { return GLWidget::getInstance(); }
32
33 void setPCB(const std::shared_ptr<PCBoard>&);
34
35 UIApplication *getApplication() const { return &mUIA; }
36
37 void keyPressEvent(QKeyEvent *) override;
38 void keyReleaseEvent(QKeyEvent *) override;
39
40 public slots:
41 void terminate();
42
43 private:
44 UIApplication &mUIA;
45 std::unique_ptr<UIActions> mActions;
46 std::unique_ptr<QTabWidget> mTabContainer;
47 ActionTab *mActionTab;
48 BrowserTab *mBrowserTab;
49 ViewTab *mViewTab;
50 ParameterTab *mParamTab;
51 std::unique_ptr<QTimer> mTimer;
52};
53
54 inline void Window::terminate()
55{
56 std::exit(0);
57}
58
59#endif // GYM_PCB_UI_WINDOW_H
ActionTab
Definition ActionTab.hpp:35
BrowserTab
Definition BrowserTab.hpp:13
GLWidget
Definition GLWidget.hpp:34
PCBoard
Definition PCBoard.hpp:36
ParameterTab
Definition ParameterTab.hpp:16
UIActions
WARNING: The non-async UIActions functions are expected to be non-concurrent.
Definition Actions.hpp:48
UIApplication
Definition Application.hpp:41
ViewTab
Definition ViewTab.hpp:30