You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/nmNum/nmSubWxs/nmWxDFNGenerateDlg.h

47 lines
2.0 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef NMWXDFNGENERATEDLG_H
#define NMWXDFNGENERATEDLG_H
#include "iDlgBase.h"
#include "nmDfnGenerator.h"
class QSpinBox;
class QComboBox;
class QLineEdit;
class QLabel;
class QPushButton;
class nmDfnValueField;
// 随机生成参数窗口,只生成临时值记录,不绘图、不删除原工程数据。
class nmWxDFNGenerateDlg : public iDlgBase
{
Q_OBJECT
public:
// 复制所属分析的边界,整个生成过程不访问当前分析单例。
nmWxDFNGenerateDlg(const nmDfnBoundary& oBoundary, QWidget* pParent = nullptr);
// 释放字段状态,控件由 Qt 父对象释放。
~nmWxDFNGenerateDlg();
// 仅在窗口接受后读取完整生成结果。
const QVector<nmDfnRecord>& records() const;
public slots:
// 参数及整组生成均成功后接受窗口。
void accept();
private slots:
// 单位切换保留基准精度,然后重算操作可用状态。
void onUnitChanged();
// 无效输入禁用生成按钮,避免输入过程中弹出提示。
void updateState();
private:
// 创建几何和物性两组表单及标准底栏。
void initUI();
// 读取基准单位输入并检查范围顺序。
bool readOptions(nmDfnGenerationOptions& oOptions, double& dConductivity, double& dStorage);
nmDfnBoundary m_oBoundary; // 生成边界值快照。
QVector<nmDfnRecord> m_vecRecords; // 全部成功才替换的生成结果。
QSpinBox* m_pCountSpin; // 目标裂缝数量,1 至 1000。
QComboBox* m_pDistributionCombo; // 长度与角度共用的分布类型。
QComboBox* m_pFlowModelCombo; // 有限或无限导流模型。
QLineEdit* m_pStorageEdit; // 无量纲储能比输入。
QVector<nmDfnValueField*> m_vecFields; // 最小/最大长度、最小/最大角度、间距及导流能力。
QPushButton* m_pGenerateButton; // 参数有效时允许生成。
QLabel* m_pErrorLabel; // 生成失败时显示原因与放置数量。
};
#endif // NMWXDFNGENERATEDLG_H