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.
41 lines
1.5 KiB
C++
41 lines
1.5 KiB
C++
#ifndef NMWXDFNEXPORTDLG_H
|
|
#define NMWXDFNEXPORTDLG_H
|
|
#include "iDlgBase.h"
|
|
#include "nmDfnData.h"
|
|
class QComboBox;
|
|
class QRadioButton;
|
|
class QLineEdit;
|
|
class QPushButton;
|
|
class QLabel;
|
|
|
|
// 导出调用方传入的 DFN 值快照,主窗口未确认的工作数据也可独立导出。
|
|
class nmWxDFNExportDlg : public iDlgBase
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
// 复制待导出记录,文件写入时不读取当前分析单例。
|
|
nmWxDFNExportDlg(const QVector<nmDfnRecord>& vecRecords, QWidget* pParent = nullptr);
|
|
// 控件和数据副本随窗口释放。
|
|
~nmWxDFNExportDlg();
|
|
public slots:
|
|
// 输出成功后才接受,失败时保留窗口和具体错误。
|
|
void accept();
|
|
private slots:
|
|
// 选择 CSV/TXT 输出位置,使用标准文件覆盖确认。
|
|
void onBrowseClicked();
|
|
// 联动目标控件和确定按钮的可用状态。
|
|
void updateState();
|
|
private:
|
|
// 创建输出精度、目标及标准底栏。
|
|
void initUI();
|
|
QVector<nmDfnRecord> m_vecRecords; // 待导出的完整精度值快照。
|
|
QComboBox* m_pPrecisionCombo; // 完整精度或六位有效数字。
|
|
QRadioButton* m_pClipboardRadio; // 写入剪贴板文本。
|
|
QRadioButton* m_pFileRadio; // 写入 UTF-8 CSV/TXT 文件。
|
|
QLineEdit* m_pFilePathEdit; // 输出文件路径。
|
|
QPushButton* m_pBrowseButton; // 选择文件路径。
|
|
QPushButton* m_pOkButton; // 输出条件满足时可用。
|
|
QLabel* m_pErrorLabel; // 文件写入或数据错误。
|
|
};
|
|
#endif // NMWXDFNEXPORTDLG_H
|