Physics Simulation & Visualization Tool
0.1
A C++ physics simulation engine with real-time 3D visualization
Loading...
Searching...
No Matches
ForcesInspectorWidget.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
7
class
SceneObject
;
8
namespace
Physics
{
class
PhysicsBody; }
9
10
class
ForcesInspectorWidget
:
public
IInspectorSection
{
11
Q_OBJECT
12
public
:
13
explicit
ForcesInspectorWidget
(QWidget* parent =
nullptr
);
14
15
void
load
(
SceneObject
*
object
)
override
;
16
void
unload
()
override
;
17
void
refresh
()
override
;
18
19
private
:
20
SceneObject
* selectedObject =
nullptr
;
21
QFormLayout* layout;
22
std::vector<InspectorRow> rows;
23
24
Physics::PhysicsBody
* getBody()
const
;
25
26
void
clearRows();
27
};
IInspectorSection.h
Interface for inspector panel sections in the editor UI.
InspectorRow.h
ForcesInspectorWidget
Definition
ForcesInspectorWidget.h:10
ForcesInspectorWidget::load
void load(SceneObject *object) override
Loads and binds this section to a scene object.
Definition
ForcesInspectorWidget.cpp:17
ForcesInspectorWidget::refresh
void refresh() override
Updates UI widgets from the current object's state.
Definition
ForcesInspectorWidget.cpp:83
ForcesInspectorWidget::unload
void unload() override
Unloads the current object and clears section state.
Definition
ForcesInspectorWidget.cpp:77
IInspectorSection
Abstract base class for inspector panel sections.
Definition
IInspectorSection.h:43
Physics::PhysicsBody
Definition
PhysicsBody.h:43
SceneObject
Definition
SceneObject.h:22
Physics
Definition
SceneObject.h:17
src
ui
inspector
ForcesInspectorWidget.h
Generated by
1.9.8