🛰️航天仿真算法库 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 UiCelestialBody(const UiCelestialBody&) = delete;
33 UiCelestialBody& operator=(const UiCelestialBody&) = delete;
34
35 void refreshUi();
36 void apply();
37
38 void setCelestialBody(CelestialBody* body);
39 CelestialBody* getCelestialBody() const;
40
41signals:
42 void celestialBodyChanged(CelestialBody* body);
43
44private slots:
45 void onGravityModelDetails();
46 void onOrientationDetails();
47
48private:
49 // 基本信息
50 QLineEdit* nameEdit_{nullptr};
51
52 // 物理参数
53 UiQuantity* gmEdit_{nullptr};
54 QLabel* parentLabel_{nullptr};
55 QLabel* childrenLabel_{nullptr};
56
57 // 引力模型
58 QComboBox* gravityModelCombo_{nullptr};
59 QPushButton* gravityModelDetailsBtn_{nullptr};
60
61 // 形状
62 QComboBox* shapeCombo_{nullptr};
63 UiQuantity* semiMajorAxisEdit_{nullptr};
64 UiQuantity* semiIntermediateAxisEdit_{nullptr};
65 UiQuantity* semiMinorAxisEdit_{nullptr};
66
67 // 姿态
68 QComboBox* orientationCombo_{nullptr};
69 QPushButton* orientationDetailsBtn_{nullptr};
70
71 // 星历
72 QComboBox* ephemerisCombo_{nullptr};
73 QLabel* spiceIdLabel_{nullptr};
74};
75
76AST_NAMESPACE_END
天体
定义 CelestialBody.hpp:72
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:95
定义 UiCelestialBody.hpp:26
与对象关联的 QWidget
定义 UiObject.hpp:36
数量输入框
定义 UiQuantity.hpp:41