🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
UiPointMassForce.hpp
1#pragma once
2
3#include "AstGlobal.h"
4#include "AstGUI/UiObject.hpp"
5#include "AstGUI/UiDouble.hpp"
6#include "AstGUI/UiQuantity.hpp"
7#include <QVBoxLayout>
8#include <QHBoxLayout>
9#include <QLabel>
10#include <QComboBox>
11
12AST_NAMESPACE_BEGIN
13
14class PointMassForce;
15
16class AST_GUI_API UiPointMassForce: public UiObject
17{
18 Q_OBJECT
19public:
20 UiPointMassForce(Object* object, QWidget *parent = nullptr);
21 UiPointMassForce(QWidget *parent = nullptr);
22 ~UiPointMassForce() = default;
23
24 PointMassForce* getPointMassForce() const;
25 void setPointMassForce(PointMassForce* pointMass);
26 void refreshUi();
27 void apply();
28protected:
29 void setupUi();
30 void refreshGMSource();
31private slots:
32 void applyTo(PointMassForce* pointMass);
33 void onGMSourceChanged(int index);
34private:
35 // 布局
36 QVBoxLayout* mainLayout_{nullptr};
37
38 // 引力常数来源
39 QHBoxLayout* gmSourceLayout_{nullptr};
40 QLabel* gmSourceLabel_{nullptr};
41 QComboBox* gmSourceCombo_{nullptr};
42
43 // 指定引力常数
44 QHBoxLayout* specifiedGMLayout_{nullptr};
45 QLabel* specifiedGMLabel_{nullptr};
46 UiQuantity* specifiedGMEdit_{nullptr};
47};
48
49AST_NAMESPACE_END
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:86
点质量引力模型/
定义 PointMassForce.hpp:35
与对象关联的 QWidget
定义 UiObject.hpp:36
定义 UiPointMassForce.hpp:17
数量输入框
定义 UiQuantity.hpp:41