Physics Simulation & Visualization Tool 0.1
A C++ physics simulation engine with real-time 3D visualization
Loading...
Searching...
No Matches
PhysicsInspectorWidget.h
Go to the documentation of this file.
1#pragma once
2#include <vector>
3#include <QFormLayout>
4#include "IInspectorSection.h"
5#include "InspectorRow.h"
6
7class SceneObject;
8namespace Physics { class PhysicsBody; }
9
11 Q_OBJECT
12public:
13 explicit PhysicsInspectorWidget(QWidget* parent = nullptr);
14
15 void load(SceneObject* object) override;
16 void unload() override;
17 void refresh() override;
18
19private:
20 SceneObject* selectedObject = nullptr;
21 QFormLayout* layout;
22 std::vector<InspectorRow> rows;
23
24 void createUiComponents();
25
26 // Helper to safely get the body (returns nullptr if selectedObject is null)
27 Physics::PhysicsBody* getBody() const;
28};
Interface for inspector panel sections in the editor UI.
Abstract base class for inspector panel sections.
void refresh() override
Updates UI widgets from the current object's state.
void load(SceneObject *object) override
Loads and binds this section to a scene object.
void unload() override
Unloads the current object and clears section state.