Physics Simulation & Visualization Tool 0.1
A C++ physics simulation engine with real-time 3D visualization
Loading...
Searching...
No Matches
MainWindow.h
Go to the documentation of this file.
1#pragma once
2
3#include <QMainWindow>
4#include <QToolBar>
5#include <QLabel>
6#include <QTreeWidget>
7#include <QTableWidget>
8#include <memory>
9
10#include "SnapshotTableModel.h"
12
13class OpenGLWindow;
14class InspectorWidget;
15class HierarchyWidget;
16class FrameGraphPanel;
17class QMenu;
18
19class MainWindow : public QMainWindow {
20 Q_OBJECT
21
22public:
23 explicit MainWindow(QWidget* parent = nullptr);
25
26 OpenGLWindow* getGlWindow() { return glWindow; }
27
28private slots:
29 void onGLInitialized();
30 void onHierarchySelectionChanged(SceneObject* previous, SceneObject* current);
31 void showObjectContextMenu(const QPoint& pos, SceneObject* obj);
32
33private:
34 OpenGLWindow* glWindow;
35 std::unique_ptr<SceneManager> sceneManager;
36
37 QTreeWidgetItem* previousItem = nullptr;
38 QLabel* fpsLabel;
39 QLabel* cameraPositionLabel;
40 QLabel* selectedObjectLabel;
41 QLabel* selectedObjectPositionLabel;
42 QLabel* selectedObjectDistanceLabel;
43 QLabel* simulationStateLabel;
44 QLabel* renderClockStateLabel;
45 QLabel* cameraFollowLabel;
46 QMenu* viewMenu = nullptr;
47 SceneObject* selectedInfoObject = nullptr;
48
49 InspectorWidget* inspector;
50 HierarchyWidget* hierarchy;
51 SnapshotTableModel* snapshotModel;
52 FrameGraphPanel* frameGraphPanel;
53
54 void setupDockWidgets();
55 void setupFileMenu();
56 void setupPresetMenu();
57 void setupSettingMenu();
58 void setupMenuBar();
59 void loadAppSettings();
60 void updateStatusPanel();
61};
OpenGLWindow * getGlWindow()
Definition MainWindow.h:26