🛰️航天仿真算法库 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
32 ThirdBodyForce* getThirdBodyForce() const;
33 void setThirdBodyForce(ThirdBodyForce* thirdBody);
34 void refreshUi();
35 void apply();
36protected:
37 void setupUi();
38 void refreshEphemerisSource();
39 void refreshAttractionType();
40 void refreshCelestialBodies();
41private slots:
42 void applyTo(ThirdBodyForce* thirdBody);
43 void onModeChanged(int index);
44private:
45 // 布局
46 QVBoxLayout* mainLayout_{nullptr};
47
48 // 基本信息
49 QHBoxLayout* thirdBodyLayout_{nullptr};
50 QLabel* thirdBodyLabel_{nullptr};
51 QComboBox* thirdBodyCombo_{nullptr};
52 QLabel* modeLabel_{nullptr};
53 QComboBox* modeCombo_{nullptr};
54
55 // 星历来源
56 QHBoxLayout* ephemerisLayout_{nullptr};
57 QLabel* ephemerisLabel_{nullptr};
58 QComboBox* ephemerisCombo_{nullptr};
59
60 // 引力场配置
61 QWidget* gravityFieldWidget_{nullptr};
62 QVBoxLayout* gravityFieldLayout_{nullptr};
63 UiGravityForce* gravityForceWidget_{nullptr};
64
65 // 点质量配置
66 QWidget* pointMassWidget_{nullptr};
67 QVBoxLayout* pointMassLayout_{nullptr};
68 UiPointMassForce* pointMassForceWidget_{nullptr};
69
70
71};
72
73AST_NAMESPACE_END
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:86
三体引力模型
定义 ThirdBodyForce.hpp:48
定义 UiGravityForce.hpp:22
与对象关联的 QWidget
定义 UiObject.hpp:36
定义 UiPointMassForce.hpp:17
定义 UiThirdBodyForce.hpp:25