🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
UiCelestialBody.hpp
浏览该文件的文档.
1
9
10#pragma once
11
12#include "AstGlobal.h"
13#include "AstGUI/UiObject.hpp"
14#include "AstGUI/UiQuantity.hpp"
15
16class QLineEdit;
17class QComboBox;
18class QLabel;
19class QPushButton;
20
21AST_NAMESPACE_BEGIN
22
23class CelestialBody;
24
25class AST_GUI_API UiCelestialBody: public UiObject
26{
27 Q_OBJECT
28public:
29 UiCelestialBody(Object* object, QWidget* parent = nullptr);
30 UiCelestialBody(QWidget* parent = nullptr);
31 ~UiCelestialBody() = default;
32
33 void refreshUi();
34 void apply();
35
36 void setCelestialBody(CelestialBody* body);
37 CelestialBody* getCelestialBody() const;
38
39signals:
40 void celestialBodyChanged(CelestialBody* body);
41
42private slots:
43 void onGravityModelDetails();
44 void onOrientationDetails();
45
46private:
47 // 基本信息
48 QLineEdit* nameEdit_{nullptr};
49
50 // 物理参数
51 UiQuantity* gmEdit_{nullptr};
52 QLabel* parentLabel_{nullptr};
53 QLabel* childrenLabel_{nullptr};
54
55 // 引力模型
56 QComboBox* gravityModelCombo_{nullptr};
57 QPushButton* gravityModelDetailsBtn_{nullptr};
58
59 // 形状
60 QComboBox* shapeCombo_{nullptr};
61 UiQuantity* semiMajorAxisEdit_{nullptr};
62 UiQuantity* semiIntermediateAxisEdit_{nullptr};
63 UiQuantity* semiMinorAxisEdit_{nullptr};
64
65 // 姿态
66 QComboBox* orientationCombo_{nullptr};
67 QPushButton* orientationDetailsBtn_{nullptr};
68
69 // 星历
70 QComboBox* ephemerisCombo_{nullptr};
71 QLabel* spiceIdLabel_{nullptr};
72};
73
74AST_NAMESPACE_END
天体
定义 CelestialBody.hpp:52
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:86
定义 UiCelestialBody.hpp:26
与对象关联的 QWidget
定义 UiObject.hpp:36
数量输入框
定义 UiQuantity.hpp:41