🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
UiThirdBodyForce.hpp
1#pragma once
2
3#include "AstGlobal.h"
4#include "AstGUI/UiObject.hpp"
5#include "AstGUI/UiFilePath.hpp"
6#include "AstGUI/UiInteger.hpp"
7#include "AstGUI/UiDouble.hpp"
8#include "AstGUI/UiQuantity.hpp"
9#include "AstGUI/UiGravityForce.hpp"
10#include "AstGUI/UiPointMassForce.hpp"
11#include <QVBoxLayout>
12#include <QHBoxLayout>
13#include <QGridLayout>
14#include <QLabel>
15#include <QCheckBox>
16#include <QComboBox>
17#include <QGroupBox>
18
19AST_NAMESPACE_BEGIN
20
21class ThirdBodyForce;
22class CelestialBody;
23
24class AST_GUI_API UiThirdBodyForce: public UiObject
25{
26 Q_OBJECT
27public:
28 UiThirdBodyForce(Object* object, QWidget *parent = nullptr);
29 UiThirdBodyForce(QWidget *parent = nullptr);
30 ~UiThirdBodyForce() = default;
31 UiThirdBodyForce(const UiThirdBodyForce&) = delete;
32 UiThirdBodyForce& operator=(const UiThirdBodyForce&) = delete;
33
34 ThirdBodyForce* getThirdBodyForce() const;
35 void setThirdBodyForce(ThirdBodyForce* thirdBody);
36 void refreshUi();
37 void apply();
38protected:
39 void setupUi();
40 void refreshEphemerisSource();
41 void refreshAttractionType();
42 void refreshCelestialBodies();
43private slots:
44 void applyTo(ThirdBodyForce* thirdBody);
45 void onModeChanged(int index);
46private:
47 // 布局
48 QVBoxLayout* mainLayout_{nullptr};
49
50 // 基本信息
51 QHBoxLayout* thirdBodyLayout_{nullptr};
52 QLabel* thirdBodyLabel_{nullptr};
53 QComboBox* thirdBodyCombo_{nullptr};
54 QLabel* modeLabel_{nullptr};
55 QComboBox* modeCombo_{nullptr};
56
57 // 星历来源
58 QHBoxLayout* ephemerisLayout_{nullptr};
59 QLabel* ephemerisLabel_{nullptr};
60 QComboBox* ephemerisCombo_{nullptr};
61
62 // 引力场配置
63 QWidget* gravityFieldWidget_{nullptr};
64 QVBoxLayout* gravityFieldLayout_{nullptr};
65 UiGravityForce* gravityForceWidget_{nullptr};
66
67 // 点质量配置
68 QWidget* pointMassWidget_{nullptr};
69 QVBoxLayout* pointMassLayout_{nullptr};
70 UiPointMassForce* pointMassForceWidget_{nullptr};
71
72
73};
74
75AST_NAMESPACE_END
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:95
三体引力模型
定义 ThirdBodyForce.hpp:41
定义 UiGravityForce.hpp:22
与对象关联的 QWidget
定义 UiObject.hpp:36
定义 UiPointMassForce.hpp:17
定义 UiThirdBodyForce.hpp:25