|
|
|
@ -5,8 +5,10 @@
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
#include <qnumeric.h>
|
|
|
|
|
|
|
|
|
|
|
|
nmWxGridDlg::nmWxGridDlg(double *pPebiGridControl):
|
|
|
|
nmWxGridDlg::nmWxGridDlg(double *pPebiGridControl):
|
|
|
|
m_pPebiGridControl(pPebiGridControl),
|
|
|
|
m_pPebiGridControl(pPebiGridControl),
|
|
|
|
@ -20,6 +22,13 @@ nmWxGridDlg::nmWxGridDlg(double *pPebiGridControl):
|
|
|
|
|
|
|
|
|
|
|
|
void nmWxGridDlg::on_save()
|
|
|
|
void nmWxGridDlg::on_save()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// 无效文本转换为零;保存前统一拦截非正数和非有限值,保留原有网格设置。
|
|
|
|
|
|
|
|
if (!qIsFinite(m_dPebiGridControlTmp) || m_dPebiGridControlTmp <= 0.0) {
|
|
|
|
|
|
|
|
QMessageBox::warning(this, tr("Input Error"),
|
|
|
|
|
|
|
|
tr("Grid size must be a finite number greater than zero."));
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 保存PEBI GridControl, GridType固定为PEBI, 仅在界面展示.
|
|
|
|
// 保存PEBI GridControl, GridType固定为PEBI, 仅在界面展示.
|
|
|
|
if (m_pPebiGridControl != NULL) {
|
|
|
|
if (m_pPebiGridControl != NULL) {
|
|
|
|
*m_pPebiGridControl = m_dPebiGridControlTmp;
|
|
|
|
*m_pPebiGridControl = m_dPebiGridControlTmp;
|
|
|
|
|