PCB Environment: /home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/UI/Window.hpp Source File

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
9class QTimer;
10class QLabel;
11class QTabWidget;
12class ActionTab;
13class BrowserTab;
14class ViewTab;
15class ParameterTab;
16class PCBoard;
17class UIApplication;
18class UIActions;
19
20 class Window : public QWidget
21{
22 Q_OBJECT
23
24public:
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
40public slots:
41 void terminate();
42
43private:
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
54inline 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