🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
UiSweepVariableList.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstAnalyzer/SweepStudy.hpp"
25#include <QWidget>
26
27class QTableWidget;
28class QPushButton;
29
30AST_NAMESPACE_BEGIN
31
32class Expr;
33
35class AST_GUI_API UiSweepVariableList : public QWidget
36{
37 Q_OBJECT
38public:
39 explicit UiSweepVariableList(QWidget* parent = nullptr);
41 UiSweepVariableList& operator=(const UiSweepVariableList&) = delete;
42
44 void setStudy(SweepStudy* study);
45
47 void refreshTable();
48
49private slots:
50 void onAddVariable();
51 void onRemoveVariable();
52 void onCellChanged(int row, int col);
53 void onExprClicked(int row);
54
55private:
56 void setupUi();
57
59 SweepStudy* study() const;
60
62 Expr* browseExpression(QWidget* parent);
63
64 // ---- 列索引 ----
65 enum VarCol {
66 VAR_NAME = 0,
67 VAR_START,
68 VAR_STEP,
69 VAR_END,
70 VAR_EXPR,
71 VAR_COUNT
72 };
73
74 WeakPtr<SweepStudy> study_{};
75
76 QTableWidget* table_{};
77 QPushButton* addBtn_{};
78 QPushButton* removeBtn_{};
79};
80
81AST_NAMESPACE_END
表达式基类
定义 Expr.hpp:40
遍历搜索分析器(参数化扫描),对变量进行嵌套循环遍历并执行仿真命令
定义 SweepStudy.hpp:92
扫参变量表格,以表格行内编辑方式管理 SweepVariable 列表
定义 UiSweepVariableList.hpp:36
弱引用指针
定义 WeakPtr.hpp:35